diff options
author | Guangxiong Lin <[email protected]> | 2022-04-22 21:05:39 +0800 |
---|---|---|
committer | Guangxiong Lin <[email protected]> | 2022-04-22 21:05:39 +0800 |
commit | b26c3e86b3ca6de3b2fd937327687659aaec042f (patch) | |
tree | 951c24c38d8f50eb0430ccd46a5830df8b09d6e1 | |
parent | 73fcd631323a6edf241abf04fe27121a92411f92 (diff) | |
download | dotfiles-b26c3e86b3ca6de3b2fd937327687659aaec042f.tar.gz dotfiles-b26c3e86b3ca6de3b2fd937327687659aaec042f.tar.bz2 dotfiles-b26c3e86b3ca6de3b2fd937327687659aaec042f.zip |
Autoload magit (emacs)
-rw-r--r-- | .emacs.d/lisp/init-git.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/.emacs.d/lisp/init-git.el b/.emacs.d/lisp/init-git.el index c47dcf9..3c3acf2 100644 --- a/.emacs.d/lisp/init-git.el +++ b/.emacs.d/lisp/init-git.el @@ -1,13 +1,14 @@ -(gx/maybe-require-package 'magit) +(when (gx/maybe-require-package 'magit) + (autoload #'magit-status "magit-status" nil t)) (with-eval-after-load 'evil (evil-define-key 'normal 'global - (kbd "<leader>gs") 'magit)) + (kbd "<leader>gs") #'magit-status)) (setq magit-refresh-status-buffer nil) (when (gx/maybe-require-package 'git-gutter) - (add-hook 'after-init-hook 'global-git-gutter-mode 'append)) + (add-hook 'after-init-hook #'global-git-gutter-mode 'append)) (with-eval-after-load 'git-gutter (gx/diminish 'git-gutter-mode)) |