From c5bf46887872cf884a8ed1975c9d6de3983b5f5f Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 11 Aug 2021 22:05:26 -0500 Subject: Use consult-rg BEFORE consult-git-grep --- init.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'init.el') 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." "Perform `consult-git-grep' if in a git project, otherwise `consult-ripgrep' if ripgrep is installed, otherwise `consult-grep'." (interactive "P") - (cond ((string-equal (vc-backend buffer-file-name) "Git") - (call-interactively #'consult-git-grep)) - ((executable-find "rg") + (cond ((executable-find "rg") (call-interactively #'consult-ripgrep)) + ((string-equal (vc-backend buffer-file-name) "Git") + (call-interactively #'consult-git-grep)) (t (call-interactively #'consult-grep)))) (defun consult-sensible-find (&optional arg) -- cgit 1.4.1-21-gabe81