aboutsummaryrefslogtreecommitdiff
path: root/.emacs.d
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d')
-rw-r--r--.emacs.d/lisp/init-git.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/.emacs.d/lisp/init-git.el b/.emacs.d/lisp/init-git.el
index f7e4246..8a427dd 100644
--- a/.emacs.d/lisp/init-git.el
+++ b/.emacs.d/lisp/init-git.el
@@ -6,4 +6,16 @@
(setq magit-refresh-status-buffer nil)
+(when (gx/maybe-require-package 'git-gutter)
+ (add-hook 'after-init-hook 'global-git-gutter-mode))
+
+(with-eval-after-load 'git-gutter
+ (gx/diminish 'git-gutter-mode))
+
+(with-eval-after-load 'evil
+ (evil-define-key 'normal 'git-gutter-mode
+ (kbd "]c") 'git-gutter:next-hunk
+ (kbd "[c") 'git-gutter:previous-hunk
+ (kbd "<leader><SPC>g") 'git-gutter:popup-hunk))
+
(provide 'init-git)