From 2ff762b3970ac8d79f31c6d4c4ecfaf66a48cbaa Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 14 Jul 2019 22:03:45 +0200 Subject: [PATCH] Fix fd/rtags on debian/ubuntu On debian/ubuntu, these executables have a different name: - fd -> fdfind - rc -> rtags-rc - rdm -> rtags-rdm --- core/core-projects.el | 5 +++-- modules/lang/cc/config.el | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/core/core-projects.el b/core/core-projects.el index 3facb6533..338ba28d8 100644 --- a/core/core-projects.el +++ b/core/core-projects.el @@ -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") diff --git a/modules/lang/cc/config.el b/modules/lang/cc/config.el index 56ca83b97..d6ea77286 100644 --- a/modules/lang/cc/config.el +++ b/modules/lang/cc/config.el @@ -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