about summary refs log tree commit diff stats
path: root/.emacs.d/lisp/init-completion.el
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2021-08-23 15:41:55 +0100
committerDavid Morgan <djm_uk@protonmail.com>2021-08-23 15:41:55 +0100
commite5cb95490b68ffbd0405ca86aa97330eea5851d1 (patch)
tree1f4adbae8bee1ec07632b5d77185f02914f6e236 /.emacs.d/lisp/init-completion.el
parent6443e70a9c904d6a101413ca04d7fe2539fe806a (diff)
downloaddotfiles-e5cb95490b68ffbd0405ca86aa97330eea5851d1.tar.gz
Allow consult ripgrep to search binary files (consult-z-ripgrep)
Diffstat (limited to '.emacs.d/lisp/init-completion.el')
-rw-r--r--.emacs.d/lisp/init-completion.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/.emacs.d/lisp/init-completion.el b/.emacs.d/lisp/init-completion.el
index fd9385a..c346b04 100644
--- a/.emacs.d/lisp/init-completion.el
+++ b/.emacs.d/lisp/init-completion.el
@@ -230,6 +230,7 @@
          ("C-c c M-r" . consult-ripgrep-unrestricted)
          ("C-c c *" . consult-ripgrep-symbol-at-point)
          ("C-c *" . consult-ripgrep-symbol-at-point)
+         ("C-c c z" . consult-z-ripgrep)
          ("C-c c l" . consult-line)
          ("C-c c m" . consult-multi-occur)
          ("C-c c k" . consult-keep-lines)
@@ -326,6 +327,10 @@
     (interactive "P")
     (let ((consult-ripgrep-args (replace-regexp-in-string "\\." "-uu ." consult-ripgrep-args)))
       (consult-ripgrep dir initial)))
+  (defun consult-z-ripgrep (&optional dir initial)
+    (interactive "P")
+    (let ((consult-ripgrep-args (replace-regexp-in-string "\\." "-z ." consult-ripgrep-args)))
+      (consult-ripgrep dir initial)))
   (defun consult-buffer-no-preview ()
     (interactive)
     (consult-buffer))