fix(ivy): omit hidden files in counsel-file-jump

385e60cd26 was a bit hasty. Rather than disregard all ignore files, we
should simply exclude projectile-globally-ignored-directories entries
from the file list. This is a stop-gap measure while I work on a better,
more general solution for all our :completion modules.

Amend: 385e60cd26
Ref: https://www.reddit.com/r/emacs/comments/tj0na6/moving_from_doom_to_vanilla/?utm_source=share&utm_medium=web2x&context=3
Ref: #6210
This commit is contained in:
Henrik Lissner 2022-03-22 04:14:11 +01:00
parent aed2972d74
commit 8455bcf6b4
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -287,10 +287,13 @@ results buffer.")
:override #'counsel--find-return-list :override #'counsel--find-return-list
(cl-destructuring-bind (find-program . args) (cl-destructuring-bind (find-program . args)
(cond ((when-let (fd (executable-find (or doom-projectile-fd-binary "fd") t)) (cond ((when-let (fd (executable-find (or doom-projectile-fd-binary "fd") t))
(append (list fd "-H" "-I" "--color=never" "--type" "file" "--type" "symlink" "--follow") (append (list fd "--hidden" "--type" "file" "--type" "symlink" "--follow" "--color=never")
(cl-loop for dir in projectile-globally-ignored-directories
collect "--exclude"
collect dir)
(if IS-WINDOWS '("--path-separator=/"))))) (if IS-WINDOWS '("--path-separator=/")))))
((executable-find "rg" t) ((executable-find "rg" t)
(append (list "rg" "--files" "--follow" "--color=never" "--hidden" "-g!.git" "--no-messages") (append (list "rg" "--hidden" "--files" "--follow" "--color=never" "--no-messages")
(cl-loop for dir in projectile-globally-ignored-directories (cl-loop for dir in projectile-globally-ignored-directories
collect "--glob" collect "--glob"
collect (concat "!" dir)) collect (concat "!" dir))