summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-08-11 22:05:26 -0500
committerCase Duckworth2021-08-11 22:05:26 -0500
commitc5bf46887872cf884a8ed1975c9d6de3983b5f5f (patch)
treee9a3904d48ca0671a8b657df6309b22b04823053
parentChange {capitalize,upcase,downcase}-word to {}-dwim (diff)
downloademacs-c5bf46887872cf884a8ed1975c9d6de3983b5f5f.tar.gz
emacs-c5bf46887872cf884a8ed1975c9d6de3983b5f5f.zip
Use consult-rg BEFORE consult-git-grep
-rw-r--r--init.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/init.el b/init.el index bb74a1d..8feab77 100644 --- a/init.el +++ b/init.el
@@ -899,10 +899,10 @@ like a dumbass."
899 "Perform `consult-git-grep' if in a git project, otherwise `consult-ripgrep' 899 "Perform `consult-git-grep' if in a git project, otherwise `consult-ripgrep'
900if ripgrep is installed, otherwise `consult-grep'." 900if ripgrep is installed, otherwise `consult-grep'."
901 (interactive "P") 901 (interactive "P")
902 (cond ((string-equal (vc-backend buffer-file-name) "Git") 902 (cond ((executable-find "rg")
903 (call-interactively #'consult-git-grep))
904 ((executable-find "rg")
905 (call-interactively #'consult-ripgrep)) 903 (call-interactively #'consult-ripgrep))
904 ((string-equal (vc-backend buffer-file-name) "Git")
905 (call-interactively #'consult-git-grep))
906 (t (call-interactively #'consult-grep)))) 906 (t (call-interactively #'consult-grep))))
907 907
908 (defun consult-sensible-find (&optional arg) 908 (defun consult-sensible-find (&optional arg)