Fix projectile on Windows failing to index anything with ripgrep
Due to unescaped glob arguments. Fixes #2897, and possibly #1803
This commit is contained in:
parent
f998c912c1
commit
b51c4fc8b3
2 changed files with 6 additions and 3 deletions
|
@ -146,7 +146,7 @@ c) are not valid projectile projects."
|
||||||
;; .gitignore. This is recommended in the projectile docs.
|
;; .gitignore. This is recommended in the projectile docs.
|
||||||
((executable-find doom-projectile-fd-binary)
|
((executable-find doom-projectile-fd-binary)
|
||||||
(setq projectile-generic-command
|
(setq projectile-generic-command
|
||||||
(format "%s . --color=never --type file --type symlink --follow -0 -H -E .git"
|
(format "%s . -0 -H -E .git --color=never --type file --type symlink --follow"
|
||||||
doom-projectile-fd-binary)
|
doom-projectile-fd-binary)
|
||||||
projectile-git-command projectile-generic-command
|
projectile-git-command projectile-generic-command
|
||||||
projectile-git-submodule-command nil
|
projectile-git-submodule-command nil
|
||||||
|
@ -158,7 +158,9 @@ c) are not valid projectile projects."
|
||||||
(setq projectile-generic-command
|
(setq projectile-generic-command
|
||||||
(concat "rg -0 --files --follow --color=never --hidden"
|
(concat "rg -0 --files --follow --color=never --hidden"
|
||||||
(cl-loop for dir in projectile-globally-ignored-directories
|
(cl-loop for dir in projectile-globally-ignored-directories
|
||||||
concat (format " --glob '!%s'" dir)))
|
concat " --glob "
|
||||||
|
concat (shell-quote-argument (concat "!" dir)))
|
||||||
|
(if IS-WINDOWS " --path-separator /"))
|
||||||
projectile-git-command projectile-generic-command
|
projectile-git-command projectile-generic-command
|
||||||
projectile-git-submodule-command nil
|
projectile-git-submodule-command nil
|
||||||
;; ensure Windows users get rg's benefits
|
;; ensure Windows users get rg's benefits
|
||||||
|
|
|
@ -270,7 +270,8 @@ evil-ex-specific constructs, so we disable it solely in evil-ex."
|
||||||
((executable-find "rg")
|
((executable-find "rg")
|
||||||
(append (list "rg" "--files" "--follow" "--color=never" "--hidden" "--no-messages")
|
(append (list "rg" "--files" "--follow" "--color=never" "--hidden" "--no-messages")
|
||||||
(cl-loop for dir in projectile-globally-ignored-directories
|
(cl-loop for dir in projectile-globally-ignored-directories
|
||||||
collect "--glob" and collect (concat "!" dir))
|
collect "--glob"
|
||||||
|
collect (concat "!" dir))
|
||||||
(if IS-WINDOWS (list "--path-separator" "/"))))
|
(if IS-WINDOWS (list "--path-separator" "/"))))
|
||||||
((cons find-program args)))
|
((cons find-program args)))
|
||||||
(unless (listp args)
|
(unless (listp args)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue