Use variable for fd-find
binary name
This commit is contained in:
parent
be6efd8dbf
commit
d974acfef1
2 changed files with 7 additions and 4 deletions
|
@ -10,6 +10,8 @@ Emacs.")
|
||||||
(defvar doom-projectile-cache-purge-non-projects nil
|
(defvar doom-projectile-cache-purge-non-projects nil
|
||||||
"If non-nil, non-projects are purged from the cache on `kill-emacs-hook'.")
|
"If non-nil, non-projects are purged from the cache on `kill-emacs-hook'.")
|
||||||
|
|
||||||
|
(defvar doom-projectile-fd-binary "fd"
|
||||||
|
"name of `fd-find' executable binary")
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;;; Packages
|
;;; Packages
|
||||||
|
@ -101,11 +103,12 @@ c) are not valid projectile projects."
|
||||||
;; If fd exists, use it for git and generic projects
|
;; If fd exists, use it for git and generic projects
|
||||||
;; fd is a rust program that is significantly faster. It also respects
|
;; fd is a rust program that is significantly faster. It also respects
|
||||||
;; .gitignore. This is recommended in the projectile docs
|
;; .gitignore. This is recommended in the projectile docs
|
||||||
(when (executable-find "fd")
|
(when (executable-find doom-projectile-fd-binary)
|
||||||
(setq projectile-git-command "fd . --type f -0 -H -E .git"
|
(setq projectile-git-command (concat
|
||||||
|
doom-projectile-fd-binary
|
||||||
|
" . --type f -0 -H -E .git")
|
||||||
projectile-generic-command projectile-git-command)))
|
projectile-generic-command projectile-git-command)))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; Project-based minor modes
|
;; Project-based minor modes
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
(/ size 1024))
|
(/ size 1024))
|
||||||
(explain! "Consider deleting it from your system (manually)"))))
|
(explain! "Consider deleting it from your system (manually)"))))
|
||||||
|
|
||||||
(when! (not (executable-find "fd"))
|
(when! (not (executable-find doom-projectile-fd-binary))
|
||||||
(warn! "Couldn't find the `fd' binary; project file searches will be slightly slower"))
|
(warn! "Couldn't find the `fd' binary; project file searches will be slightly slower"))
|
||||||
|
|
||||||
(let ((default-directory "~"))
|
(let ((default-directory "~"))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue