diff options
author | Case Duckworth | 2021-08-30 22:18:13 -0500 |
---|---|---|
committer | Case Duckworth | 2021-08-30 22:18:20 -0500 |
commit | d718b1f106d721ea393fd4b2af1ef2f08dd548f6 (patch) | |
tree | 61325af14a614beeb2384655ed9a97c90ff8baef /lisp | |
parent | Add ace-link-addr to circe (diff) | |
download | emacs-d718b1f106d721ea393fd4b2af1ef2f08dd548f6.tar.gz emacs-d718b1f106d721ea393fd4b2af1ef2f08dd548f6.zip |
Add `affe'
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/acdw-consult.el | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/lisp/acdw-consult.el b/lisp/acdw-consult.el index e6995f5..58a2136 100644 --- a/lisp/acdw-consult.el +++ b/lisp/acdw-consult.el | |||
@@ -9,17 +9,26 @@ | |||
9 | "Perform `consult-git-grep' if in a git project, otherwise `consult-ripgrep' | 9 | "Perform `consult-git-grep' if in a git project, otherwise `consult-ripgrep' |
10 | if ripgrep is installed, otherwise `consult-grep'." | 10 | if ripgrep is installed, otherwise `consult-grep'." |
11 | (interactive "P") | 11 | (interactive "P") |
12 | (cond ((executable-find "rg") | 12 | (call-interactively |
13 | (call-interactively #'consult-ripgrep)) | 13 | (cond ((executable-find "rg") |
14 | ((string-equal (vc-backend buffer-file-name) "Git") | 14 | (if (fboundp 'affe-grep) |
15 | (call-interactively #'consult-git-grep)) | 15 | #'affe-grep |
16 | (t (call-interactively #'consult-grep)))) | 16 | #'consult-ripgrep)) |
17 | ((string-equal (vc-backend buffer-file-name) "Git") | ||
18 | #'consult-git-grep) | ||
19 | (t #'consult-grep)))) | ||
17 | 20 | ||
18 | (defun acdw-consult/sensible-find (&optional arg) | 21 | (defun acdw-consult/sensible-find (&optional arg) |
19 | "Peform `consult-locate' if locate is installed, otehrwise `consult-find'." | 22 | "Peform `consult-locate' if locate is installed, otehrwise `consult-find'." |
20 | (interactive "P") | 23 | (interactive "P") |
21 | (cond ((executable-find "locate") (call-interactively #'consult-locate)) | 24 | (call-interactively |
22 | (t (call-interactively #'consult-find)))) | 25 | (cond ((executable-find "locate") |
26 | #'consult-locate) | ||
27 | ((fboundp 'affe-find) | ||
28 | (when (executable-find "fd") | ||
29 | (setq affe-find-command "fd -HI -t f")) | ||
30 | #'affe-find) | ||
31 | (t #'consult-find)))) | ||
23 | 32 | ||
24 | ;; Orderless Regexp Compiler! -- from Consult Wiki | 33 | ;; Orderless Regexp Compiler! -- from Consult Wiki |
25 | (defun consult--orderless-regexp-compiler (input type) | 34 | (defun consult--orderless-regexp-compiler (input type) |