about summary refs log tree commit diff stats
path: root/.emacs.d/lisp/init-minibuffer.el
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2022-09-16 12:36:33 +0100
committerDavid Morgan <djm_uk@protonmail.com>2022-09-16 12:36:33 +0100
commit3f873ccb89bc079fc344407733aa64f1946a355a (patch)
tree2af08757aa75fdb7e56b77b3e7cfded1525e97d6 /.emacs.d/lisp/init-minibuffer.el
parent5571c02c19fa5b11c570faf9c06edc82f8d0c6d6 (diff)
downloaddotfiles-3f873ccb89bc079fc344407733aa64f1946a355a.tar.gz
Add consult-ripgrep-parent
Diffstat (limited to '.emacs.d/lisp/init-minibuffer.el')
-rw-r--r--.emacs.d/lisp/init-minibuffer.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/.emacs.d/lisp/init-minibuffer.el b/.emacs.d/lisp/init-minibuffer.el
index 866bff1..66a6cf1 100644
--- a/.emacs.d/lisp/init-minibuffer.el
+++ b/.emacs.d/lisp/init-minibuffer.el
@@ -174,6 +174,7 @@ DEFS is a plist associating completion categories to commands."
          ("C-c c s" . consult-ripgrep-case-sensitive)
          ("C-c c z" . consult-z-ripgrep)
          ("C-c C-*" . consult-ripgrep-symbol-at-point)
+         ("C-c C-^" . consult-ripgrep-parent)
          ("M-y" . consult-yank-pop)                ;; orig. yank-pop
          ("<help> a" . consult-apropos)            ;; orig. apropos-command
          ;; M-g bindings (goto-map)
@@ -241,6 +242,9 @@ DEFS is a plist associating completion categories to commands."
   (defun consult-line-symbol-at-point ()
     (interactive)
     (consult-line (thing-at-point 'symbol)))
+  (defun consult-parent-ripgrep (&optional initial)
+    (interactive "P")
+    (consult-ripgrep (file-name-directory (directory-file-name (persp-current-project-root))) initial))
   (defvar consult--fd-command nil)
   (defun consult--fd-builder (input)
     (unless consult--fd-command