all repos — archive/dotfiles @ bbf952dce8bfa1e6c6fffb576d93f5fad7bb24b4

Superseded by nixfiles

Emacs: Make git-gutter look nicer
Alan Pearce alan@alanpearce.eu
Mon, 22 May 2017 16:51:47 +0200
commit

bbf952dce8bfa1e6c6fffb576d93f5fad7bb24b4

parent

7846fd944c13a09578316924a1365a5b369a96b7

1 files changed, 17 insertions(+), 3 deletions(-)

jump to
M emacs/.emacs.d/init.orgemacs/.emacs.d/init.org
@@ -172,7 +172,10 @@ :ensure eziam-theme   :defines (eziam-scale-headings)
   :config (progn
             (setq eziam-scale-headings nil)
-            (load-theme 'eziam-light t)))
+            (load-theme 'eziam-light t)
+            (set-face-foreground 'git-gutter-fr:added "#96a4ab")
+            (set-face-foreground 'git-gutter-fr:modified "#96a4ab")
+            (set-face-foreground 'git-gutter-fr:deleted "#96a4ab")))
 #+END_SRC
 
 Highlighting quasi-quoted expressions in lisps is quite useful, but I
@@ -575,8 +578,19 @@ :defer 2   :diminish git-gutter-mode
   :config (progn
             (global-git-gutter-mode 1)
-            (set-face-foreground 'git-gutter:modified "grey")
-            (setq git-gutter-fr:side 'right-fringe)))
+            ;; places the git gutter outside the margins.
+            (setq-default fringes-outside-margins t)
+            ;; thin fringe bitmaps
+            (fringe-helper-define 'git-gutter-fr:added '(center repeated)
+              "XXX.....")
+            (fringe-helper-define 'git-gutter-fr:modified '(center repeated)
+              "XXX.....")
+            (fringe-helper-define 'git-gutter-fr:deleted 'bottom
+              "X......."
+              "XX......"
+              "XXX....."
+              "XXXX....")
+            (setq git-gutter-fr:side 'left-fringe)))
 #+END_SRC
 
 ** magit