ui/vc-gutter: disable git-gutter in some modes
Disabling git-gutter in fundamental-mode theoretically reduces the number of times git-gutter is initialized (because it has to switch to and from fundamental-mode once, sometimes twice, when changing major modes). git-gutter also has trouble with org-indent-mode, so we disable it there. And it isn't useful in image-mode.
This commit is contained in:
parent
b01606e99b
commit
7058facf9d
1 changed files with 9 additions and 0 deletions
|
@ -50,6 +50,15 @@ is deferred until the file is saved. Respects `git-gutter:disabled-modes'."
|
|||
(git-gutter-mode +1)
|
||||
(remove-hook 'after-save-hook #'+vc-gutter-init-maybe-h t))))))
|
||||
|
||||
;; Disable in Org mode, as per
|
||||
;; <https://github.com/syl20bnr/spacemacs/issues/10555> and
|
||||
;; <https://github.com/syohex/emacs-git-gutter/issues/24>. Apparently, the
|
||||
;; mode-enabling function for global minor modes gets called for new buffers
|
||||
;; while they are still in `fundamental-mode', before a major mode has been
|
||||
;; assigned. I don't know why this is the case, but adding `fundamental-mode'
|
||||
;; here fixes the issue.
|
||||
(setq git-gutter:disabled-modes '(fundamental-mode org-mode image-mode))
|
||||
|
||||
;; standardize default fringe width
|
||||
(if (fboundp 'fringe-mode) (fringe-mode '4))
|
||||
:config
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue