Dim .gitignore files (mostly) in dired
This commit is contained in:
parent
8565654433
commit
7f7ede201b
5
init.el
5
init.el
|
@ -269,7 +269,7 @@
|
|||
compilation-scroll-output t))
|
||||
|
||||
(setup dired
|
||||
(:also-load dired-x +dired)
|
||||
(:require dired-x +dired)
|
||||
(:straight dired+)
|
||||
(:option dired-recursive-copies 'always
|
||||
dired-recursive-deletes 'always
|
||||
|
@ -293,7 +293,8 @@
|
|||
"j" #'+dired-goto-file)
|
||||
(:hook #'dired-hide-details-mode
|
||||
#'hl-line-mode
|
||||
#'lin-mode)
|
||||
#'lin-mode
|
||||
#'+dired-dim-git-ignores)
|
||||
(:+key "C-x C-j" #'dired-jump)
|
||||
(dolist (refresh-after-func '(dired-do-flagged-delete))
|
||||
(advice-add refresh-after-func :after #'revert-buffer))
|
||||
|
|
|
@ -15,5 +15,15 @@
|
|||
(push-mark)))
|
||||
(dired-goto-file file))
|
||||
|
||||
;;; [[https://www.reddit.com/r/emacs/comments/u2lf9t/weekly_tips_tricks_c_thread/i4n9aoa/?context=3][Dim files in .gitignore]]
|
||||
|
||||
(defun +dired-dim-git-ignores ()
|
||||
"Dim out .gitignore contents"
|
||||
(require 'vc)
|
||||
(when-let ((ignores (vc-default-ignore-completion-table 'git ".gitignore"))
|
||||
(exts (make-local-variable 'completion-ignored-extensions)))
|
||||
(dolist (item ignores)
|
||||
(add-to-list exts item))))
|
||||
|
||||
(provide '+dired)
|
||||
;;; +dired.el ends here
|
||||
|
|
Loading…
Reference in New Issue