fix(vc-gutter): respect diff-hl-disable-on-remote in dired
Neither `diff-hl-dired-mode` or `diff-hl-dired-mode-unless-remote` respect diff-hl-disable-on-remote, so added my own enabler hook.
This commit is contained in:
parent
a8b836dac3
commit
7c5d8641a1
1 changed files with 9 additions and 1 deletions
|
@ -60,11 +60,19 @@
|
|||
;;; diff-hl
|
||||
|
||||
(use-package! diff-hl
|
||||
:hook (dired-mode . diff-hl-dired-mode)
|
||||
:hook (doom-first-file . global-diff-hl-mode)
|
||||
:hook (vc-dir-mode . turn-on-diff-hl-mode)
|
||||
:hook (diff-hl-mode . diff-hl-flydiff-mode)
|
||||
:commands diff-hl-stage-current-hunk diff-hl-revert-hunk diff-hl-next-hunk diff-hl-previous-hunk
|
||||
:init
|
||||
(add-hook! 'dired-mode-hook
|
||||
(defun +vc-gutter-enable-maybe-h ()
|
||||
"Conditionally enable `diff-hl-dired-mode' in dired buffers.
|
||||
Respects `diff-hl-disable-on-remote'."
|
||||
(unless (and diff-hl-disable-on-remote
|
||||
(file-remote-p default-directory))
|
||||
(diff-hl-dired-mode +1))))
|
||||
|
||||
:config
|
||||
(set-popup-rule! "^\\*diff-hl" :select nil :size '+popup-shrink-to-fit)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue