Minor refactors
This commit is contained in:
parent
eb2e2b2a4f
commit
a2714f414a
2 changed files with 13 additions and 16 deletions
|
@ -17,9 +17,9 @@
|
|||
;; disable modules, and to reduce the effort required to maintain our copy of
|
||||
;; `evil-collection-list' (now I can just copy it from time to time).
|
||||
|
||||
(when (and (featurep! +everywhere)
|
||||
doom-interactive-mode
|
||||
(not doom-reloading-p))
|
||||
(when (and doom-interactive-mode
|
||||
(not doom-reloading-p)
|
||||
(featurep! +everywhere))
|
||||
|
||||
(setq evil-collection-company-use-tng (featurep! :completion company +tng)
|
||||
;; must be set before evil/evil-collection is loaded
|
||||
|
|
|
@ -51,23 +51,20 @@ 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 'local)))))))
|
||||
|
||||
;; 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.
|
||||
;; Disable in Org mode, as per syl20bnr/spacemacs#10555 and
|
||||
;; syohex/emacs-git-gutter#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 image-mode pdf-view-mode))
|
||||
:config
|
||||
(set-popup-rule! "^\\*git-gutter" :select nil :size '+popup-shrink-to-fit)
|
||||
|
||||
;; Only enable the backends that are available, so it doesn't have to check
|
||||
;; when opening each buffer.
|
||||
(setq git-gutter:handled-backends '(git))
|
||||
(dolist (backend '(hg svn bzr))
|
||||
(when (executable-find (symbol-name backend))
|
||||
(add-to-list 'git-gutter:handled-backends backend)))
|
||||
|
||||
(set-popup-rule! "^\\*git-gutter" :select nil :size '+popup-shrink-to-fit)
|
||||
(setq git-gutter:handled-backends
|
||||
(cons 'git (cl-remove-if-not #'executable-find (list 'hg 'svn 'bzr)
|
||||
:key #'symbol-name)))
|
||||
|
||||
;; Update git-gutter on focus (in case I was using git externally)
|
||||
(add-hook 'focus-in-hook #'git-gutter:update-all-windows)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue