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
|
;; 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).
|
;; `evil-collection-list' (now I can just copy it from time to time).
|
||||||
|
|
||||||
(when (and (featurep! +everywhere)
|
(when (and doom-interactive-mode
|
||||||
doom-interactive-mode
|
(not doom-reloading-p)
|
||||||
(not doom-reloading-p))
|
(featurep! +everywhere))
|
||||||
|
|
||||||
(setq evil-collection-company-use-tng (featurep! :completion company +tng)
|
(setq evil-collection-company-use-tng (featurep! :completion company +tng)
|
||||||
;; must be set before evil/evil-collection is loaded
|
;; 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)
|
(git-gutter-mode +1)
|
||||||
(remove-hook 'after-save-hook #'+vc-gutter-init-maybe-h 'local)))))))
|
(remove-hook 'after-save-hook #'+vc-gutter-init-maybe-h 'local)))))))
|
||||||
|
|
||||||
;; Disable in Org mode, as per
|
;; Disable in Org mode, as per syl20bnr/spacemacs#10555 and
|
||||||
;; <https://github.com/syl20bnr/spacemacs/issues/10555> and
|
;; syohex/emacs-git-gutter#24. Apparently, the mode-enabling function for
|
||||||
;; <https://github.com/syohex/emacs-git-gutter/issues/24>. Apparently, the
|
;; global minor modes gets called for new buffers while they are still in
|
||||||
;; mode-enabling function for global minor modes gets called for new buffers
|
;; `fundamental-mode', before a major mode has been assigned. I don't know why
|
||||||
;; while they are still in `fundamental-mode', before a major mode has been
|
;; this is the case, but adding `fundamental-mode' here fixes the issue.
|
||||||
;; 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))
|
(setq git-gutter:disabled-modes '(fundamental-mode image-mode pdf-view-mode))
|
||||||
:config
|
: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
|
;; Only enable the backends that are available, so it doesn't have to check
|
||||||
;; when opening each buffer.
|
;; when opening each buffer.
|
||||||
(setq git-gutter:handled-backends '(git))
|
(setq git-gutter:handled-backends
|
||||||
(dolist (backend '(hg svn bzr))
|
(cons 'git (cl-remove-if-not #'executable-find (list 'hg 'svn 'bzr)
|
||||||
(when (executable-find (symbol-name backend))
|
:key #'symbol-name)))
|
||||||
(add-to-list 'git-gutter:handled-backends backend)))
|
|
||||||
|
|
||||||
(set-popup-rule! "^\\*git-gutter" :select nil :size '+popup-shrink-to-fit)
|
|
||||||
|
|
||||||
;; Update git-gutter on focus (in case I was using git externally)
|
;; Update git-gutter on focus (in case I was using git externally)
|
||||||
(add-hook 'focus-in-hook #'git-gutter:update-all-windows)
|
(add-hook 'focus-in-hook #'git-gutter:update-all-windows)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue