tools/dired: faster dired in remote buffers

This commit is contained in:
Henrik Lissner 2017-04-16 11:56:37 -04:00
parent 5485ebe451
commit 4f3b235c0a

View file

@ -43,6 +43,13 @@
:after dired
:config
(setq dired-k-style 'git)
(defun +dired*dired-k-highlight (orig-fn &rest args)
"Butt out if the requested directory is remote (i.e. through tramp)."
(unless (file-remote-p default-directory)
(apply orig-fn args)))
(advice-add 'dired-k--highlight :around '+dired*dired-k-highlight)
(add-hook 'dired-initial-position-hook 'dired-k)
(add-hook 'dired-after-readin-hook #'dired-k-no-revert))