Fix fd/rtags on debian/ubuntu

On debian/ubuntu, these executables have a different name:

- fd -> fdfind
- rc -> rtags-rc
- rdm -> rtags-rdm
This commit is contained in:
Henrik Lissner 2019-07-14 22:03:45 +02:00
parent 3313058c76
commit 2ff762b397
No known key found for this signature in database
GPG Key ID: 5F6C0EA160557395
2 changed files with 8 additions and 2 deletions

View File

@ -10,7 +10,8 @@ Emacs.")
(defvar doom-projectile-cache-purge-non-projects nil
"If non-nil, non-projects are purged from the cache on `kill-emacs-hook'.")
(defvar doom-projectile-fd-binary "fd"
(defvar doom-projectile-fd-binary
(cl-find-if #'executable-find '("fd" "fdfind"))
"name of `fd-find' executable binary")
(defvar doom-projectile-cache-timer-file (concat doom-cache-dir "projectile.timers")
@ -124,7 +125,7 @@ c) are not valid projectile projects."
;; If fd exists, use it for git and generic projects. fd is a rust program
;; that is significantly faster than git ls-files or find, and it respects
;; .gitignore. This is recommended in the projectile docs.
((executable-find doom-projectile-fd-binary)
(doom-projectile-fd-binary
(setq projectile-git-command (concat
doom-projectile-fd-binary
" . --color=never --type f -0 -H -E .git")

View File

@ -197,6 +197,11 @@ This is ignored by ccls.")
(cond ((featurep! :completion ivy) 'ivy)
((featurep! :completion helm) 'helm)
('default))
;; These executables are named rtags-* on debian
rtags-rc-binary-name
(cl-find-if #'executable-find (list rtags-rc-binary-name "rtags-rc"))
rtags-rdm-binary-name
(cl-find-if #'executable-find (list rtags-rdm-binary-name "rtags-rdm"))
;; If not using ivy or helm to view results, use a pop-up window rather
;; than displaying it in the current window...
rtags-results-buffer-other-window t