fix(vertico): consult-recent-file
previews
Turning on `recentf-mode` in a `cmd!` (introduced in 97048e2
) means that
the `consult-customize` that turns off the previews doesn't work. This
is fixed by advising the function instead.
This commit is contained in:
parent
859fc4e1b1
commit
a23cb1fddf
2 changed files with 7 additions and 1 deletions
|
@ -13,6 +13,12 @@ orderless."
|
||||||
(completion-styles +vertico-company-completion-styles))
|
(completion-styles +vertico-company-completion-styles))
|
||||||
(apply fn args)))
|
(apply fn args)))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defadvice! +vertico--consult-recent-file-a (&rest _args)
|
||||||
|
"`consult-recent-file' needs to have `recentf-mode' on to work correctly"
|
||||||
|
:before #'consult-recent-file
|
||||||
|
(recentf-mode +1))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(cl-defun +vertico-file-search (&key query in all-files (recursive t) prompt args)
|
(cl-defun +vertico-file-search (&key query in all-files (recursive t) prompt args)
|
||||||
"Conduct a file search using ripgrep.
|
"Conduct a file search using ripgrep.
|
||||||
|
|
|
@ -73,7 +73,7 @@ overrides `completion-styles' during company completion sessions.")
|
||||||
[remap locate] #'consult-locate
|
[remap locate] #'consult-locate
|
||||||
[remap load-theme] #'consult-theme
|
[remap load-theme] #'consult-theme
|
||||||
[remap man] #'consult-man
|
[remap man] #'consult-man
|
||||||
[remap recentf-open-files] (cmd! (recentf-mode +1) (consult-recent-file))
|
[remap recentf-open-files] #'consult-recent-file
|
||||||
[remap switch-to-buffer] #'consult-buffer
|
[remap switch-to-buffer] #'consult-buffer
|
||||||
[remap switch-to-buffer-other-window] #'consult-buffer-other-window
|
[remap switch-to-buffer-other-window] #'consult-buffer-other-window
|
||||||
[remap switch-to-buffer-other-frame] #'consult-buffer-other-frame
|
[remap switch-to-buffer-other-frame] #'consult-buffer-other-frame
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue