diff options
author | Guangxiong Lin <[email protected]> | 2022-03-17 21:42:23 +0800 |
---|---|---|
committer | Guangxiong Lin <[email protected]> | 2022-03-17 21:42:23 +0800 |
commit | 7cec4a29e17865f93cd06eccf9d5ad87165ac198 (patch) | |
tree | 0e52f7bd7234c206ad246b4cb5f89e1ae6886dd6 /.emacs.d | |
parent | 51968f2dfff581a94cd599a49223d8439950aec1 (diff) | |
download | dotfiles-7cec4a29e17865f93cd06eccf9d5ad87165ac198.tar.gz dotfiles-7cec4a29e17865f93cd06eccf9d5ad87165ac198.tar.bz2 dotfiles-7cec4a29e17865f93cd06eccf9d5ad87165ac198.zip |
Add git-gutter (emacs)
Diffstat (limited to '.emacs.d')
-rw-r--r-- | .emacs.d/lisp/init-git.el | 12 |
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) |