Index projects with ripgrep/fd on Windows

This commit is contained in:
Henrik Lissner 2019-06-18 14:43:15 +02:00
parent f2d7c5625d
commit fd1b31667e
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -105,17 +105,18 @@ c) are not valid projectile projects."
(setq projectile-git-command (concat (setq projectile-git-command (concat
doom-projectile-fd-binary doom-projectile-fd-binary
" . --color=never --type f -0 -H -E .git") " . --color=never --type f -0 -H -E .git")
projectile-generic-command projectile-git-command)) projectile-generic-command projectile-git-command
;; ensure Windows users get fd's benefits
projectile-indexing-method 'alien))
;; Otherwise, resort to ripgrep, which is also faster than find ;; Otherwise, resort to ripgrep, which is also faster than find
((executable-find "rg") ((executable-find "rg")
(setq projectile-generic-command (setq projectile-generic-command
(concat "rg -0 --files --color=never --hidden" (concat "rg -0 --files --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 (format " --glob '!%s'" dir)))
(when IS-WINDOWS ;; ensure Windows users get fd's benefits
(setq projectile-indexing-method 'alien projectile-indexing-method 'alien))))
projectile-enable-caching nil)))))
;; ;;
;; Project-based minor modes ;; Project-based minor modes