diff --git a/modules/tools/dired/config.el b/modules/tools/dired/config.el index 067230c53..81c323316 100644 --- a/modules/tools/dired/config.el +++ b/modules/tools/dired/config.el @@ -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))