aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2022-04-22 21:05:39 +0800
committerGuangxiong Lin <[email protected]>2022-04-22 21:05:39 +0800
commitb26c3e86b3ca6de3b2fd937327687659aaec042f (patch)
tree951c24c38d8f50eb0430ccd46a5830df8b09d6e1
parent73fcd631323a6edf241abf04fe27121a92411f92 (diff)
downloaddotfiles-b26c3e86b3ca6de3b2fd937327687659aaec042f.tar.gz
dotfiles-b26c3e86b3ca6de3b2fd937327687659aaec042f.tar.bz2
dotfiles-b26c3e86b3ca6de3b2fd937327687659aaec042f.zip
Autoload magit (emacs)
-rw-r--r--.emacs.d/lisp/init-git.el7
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))