emacs/dired: don't enable dired-git-info in ranger

It won't correctly disable on `C-c C-e`, but it does work find if
enabled manually.

Also: refactors +dired-enable-git-info-h and map! call

Relevant to #2106
This commit is contained in:
Henrik Lissner 2019-11-24 14:16:46 -05:00
parent 768d5b718c
commit b8c0126f8c
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 9 additions and 10 deletions

View file

@ -7,10 +7,9 @@
(mapc #'kill-buffer (doom-buffers-in-mode 'dired-mode))
(message "Killed all dired buffers"))
;;;###autoload
(defun +dired-enable-git-info-h ()
(if (and
(not (file-remote-p default-directory))
(locate-dominating-file "." ".git"))
(dired-git-info-mode 1)))
"Enable `dired-git-info-mode' in git repos."
(and (not (file-remote-p default-directory))
(locate-dominating-file "." ".git")
(dired-git-info-mode 1)))