Copy latest version of function from consult wiki

This commit is contained in:
David Morgan 2022-11-01 16:28:51 +00:00
parent c92918cf53
commit ccad661ab8
Signed by: djm
GPG Key ID: C171251002C200F2

View File

@ -441,11 +441,12 @@ DEFS is a plist associating completion categories to commands."
:custom :custom
(prefix-help-command 'embark-prefix-help-command) (prefix-help-command 'embark-prefix-help-command)
:config :config
(defun embark-preview () (defun my-embark-preview ()
"Previews candidate in vertico buffer, unless it's a consult command"
(interactive) (interactive)
(unless (bound-and-true-p consult--preview-function) ;; Disable preview for Consult commands (unless (bound-and-true-p consult--preview-function)
(save-selected-window (save-selected-window
(let ((embark-quit-after-action)) (let ((embark-quit-after-action nil))
(embark-dwim))))) (embark-dwim)))))
;; Hide the mode line of the Embark live/completions buffers ;; Hide the mode line of the Embark live/completions buffers