refactor: generalize fd/ripgrep vars & options
I intend to eventually replace projectile with project.el, so these doom-projectile-* variables need to be generalized, starting with the fd/ripgrep executable paths. ALong with that, this refactors Doom's projectile-generic-command to lean more on built-in fd support in projectile, where possible (fewer wheels reinvented). Ref: doomemacs/core#1
This commit is contained in:
parent
939fc0d322
commit
4fcf332749
5 changed files with 48 additions and 33 deletions
|
@ -211,15 +211,15 @@ targets."
|
|||
;;;###autoload
|
||||
(defun +vertico/consult-fd-or-find (&optional dir initial)
|
||||
"Runs consult-fd if fd version > 8.6.0 exists, consult-find otherwise.
|
||||
See URL `https://github.com/minad/consult/issues/770'."
|
||||
See minad/consult#770."
|
||||
(interactive "P")
|
||||
;; TODO this condition was adapted from a similar one in lisp/doom-projects.el, to be replaced with a more robust check post v3
|
||||
(if (when-let*
|
||||
((bin (if (ignore-errors (file-remote-p default-directory nil t))
|
||||
(cl-find-if (doom-rpartial #'executable-find t)
|
||||
(list "fdfind" "fd"))
|
||||
doom-projectile-fd-binary))
|
||||
(version (with-memoization doom-projects--fd-version
|
||||
doom-fd-executable))
|
||||
(version (with-memoization (get 'doom-fd-executable 'version)
|
||||
(cadr (split-string (cdr (doom-call-process bin "--version"))
|
||||
" " t))))
|
||||
((ignore-errors (version-to-list version))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue