From c3dc660b1b69b268a96c7ac201ffd94c4605b2a5 Mon Sep 17 00:00:00 2001 From: Aria Date: Thu, 29 Nov 2018 23:22:07 +1100 Subject: [PATCH 1/3] Use fd for populating projectile cache --- modules/tools/magit/config.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/tools/magit/config.el b/modules/tools/magit/config.el index c924e559f..d04089366 100644 --- a/modules/tools/magit/config.el +++ b/modules/tools/magit/config.el @@ -47,7 +47,14 @@ what features are available.") ;; Don't replace the leader key ;; FIXME remove me when general.el is integrated (when doom-leader-key - (define-key magit-diff-mode-map (kbd doom-leader-key) nil))) + (define-key magit-diff-mode-map (kbd doom-leader-key) nil)) + + ;; If fd exists, use it for git and generic projects + ;; fd is a rust program that is significantly faster. It also respects + ;; .gitignore. This is recommended in the projectile docs + (when (executable-find "fd") + (setq projectile-git-command "fd . -0" + projectile-generic-command projectile-git-command))) (def-package! magit-todos :hook (magit-mode . magit-todos-mode) From e7141d2c9615e4065fe68d771bdb9439a318f5be Mon Sep 17 00:00:00 2001 From: Aria Date: Sun, 2 Dec 2018 00:06:46 +1100 Subject: [PATCH 2/3] use --type f with fd will show folders otherwise --- modules/tools/magit/config.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/tools/magit/config.el b/modules/tools/magit/config.el index d04089366..7b8a96d88 100644 --- a/modules/tools/magit/config.el +++ b/modules/tools/magit/config.el @@ -53,7 +53,7 @@ what features are available.") ;; fd is a rust program that is significantly faster. It also respects ;; .gitignore. This is recommended in the projectile docs (when (executable-find "fd") - (setq projectile-git-command "fd . -0" + (setq projectile-git-command "fd . --type f -0" projectile-generic-command projectile-git-command))) (def-package! magit-todos From fe8b17d6da1ff94ab0ba4a60aa66dfdb04d67146 Mon Sep 17 00:00:00 2001 From: Aria Date: Tue, 4 Dec 2018 20:09:44 +1100 Subject: [PATCH 3/3] move projectile fd out of magit.el lol --- core/core-projects.el | 9 ++++++++- modules/tools/magit/config.el | 8 +------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/core/core-projects.el b/core/core-projects.el index 8034271c2..9ab29ef7e 100644 --- a/core/core-projects.el +++ b/core/core-projects.el @@ -52,7 +52,14 @@ "Don't traverse the file system if on a remote connection." (unless (file-remote-p default-directory) (funcall orig-fn file name))) - (advice-add #'projectile-locate-dominating-file :around #'doom*projectile-locate-dominating-file)) + (advice-add #'projectile-locate-dominating-file :around #'doom*projectile-locate-dominating-file) + + ;; If fd exists, use it for git and generic projects + ;; fd is a rust program that is significantly faster. It also respects + ;; .gitignore. This is recommended in the projectile docs + (when (executable-find "fd") + (setq projectile-git-command "fd . --type f -0" + projectile-generic-command projectile-git-command))) ;; diff --git a/modules/tools/magit/config.el b/modules/tools/magit/config.el index 7b8a96d88..222b319ef 100644 --- a/modules/tools/magit/config.el +++ b/modules/tools/magit/config.el @@ -47,14 +47,8 @@ what features are available.") ;; Don't replace the leader key ;; FIXME remove me when general.el is integrated (when doom-leader-key - (define-key magit-diff-mode-map (kbd doom-leader-key) nil)) + (define-key magit-diff-mode-map (kbd doom-leader-key) nil))) - ;; If fd exists, use it for git and generic projects - ;; fd is a rust program that is significantly faster. It also respects - ;; .gitignore. This is recommended in the projectile docs - (when (executable-find "fd") - (setq projectile-git-command "fd . --type f -0" - projectile-generic-command projectile-git-command))) (def-package! magit-todos :hook (magit-mode . magit-todos-mode)