-
-
Notifications
You must be signed in to change notification settings - Fork 122
Closed
Description
Hi @minad, I use consult-ripgrep only search current dir not the whole project, code by this:
(defun my-consult-ripgrep(&optional dir)
(interactive "P")
(require 'consult)
(let ((consult-ripgrep-args (concat consult-ripgrep-args " --no-ignore")))
(consult-ripgrep (or dir default-directory)))
)
and there is a function binding to C-l to change the directory to parent, code like this:
(defun is-consult-ripgrep()
(eq 'consult-grep
(completion-metadata-get
(completion-metadata (minibuffer-contents)
minibuffer-completion-table
minibuffer-completion-predicate)
'category)))
(defun is-consult-line()
(eq 'consult-location ;;
(completion-metadata-get
(completion-metadata (minibuffer-contents)
minibuffer-completion-table
minibuffer-completion-predicate)
'category)))
(defun my/vertico-C-l ()
(interactive)
(if (is-consult-ripgrep)
(progn
(setq default-directory (file-name-directory (directory-file-name default-directory)))
(let ((text (substring-no-properties (or (car-safe vertico--input) ""))))
(delete-minibuffer-contents)
(insert text)
))
(call-interactively 'vertico-directory-delete-word)))
(define-key vertico-map (kbd "C-l") 'my/vertico-C-l)
When I invoke C-l, the search result is fine, but the C-n(vertico-next) not work as expect, and RET also not work.

Metadata
Metadata
Assignees
Labels
No labels