From 8455bcf6b40035c9a901727f15328a34f229015d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 22 Mar 2022 04:14:11 +0100 Subject: [PATCH] fix(ivy): omit hidden files in counsel-file-jump 385e60cd26bd 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: 385e60cd26bd Ref: https://www.reddit.com/r/emacs/comments/tj0na6/moving_from_doom_to_vanilla/?utm_source=share&utm_medium=web2x&context=3 Ref: #6210 --- modules/completion/ivy/config.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index bedbc073a..e56d5fffe 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -287,10 +287,13 @@ results buffer.") :override #'counsel--find-return-list (cl-destructuring-bind (find-program . args) (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=/"))))) ((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 collect "--glob" collect (concat "!" dir))