mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
selectrum: refactor consult stuff
- use `consult-preview-at-point-mode` instead of `consult-preview-minor-mode` - better consult preview function detection in `+selectrum/embark-preview`
This commit is contained in:
@ -96,8 +96,7 @@ Supports exporting consult-grep to wgrep, file to wdeired, and consult-location
|
||||
(defun +selectrum/embark-preview ()
|
||||
"Previews candidate in selectrum buffer, unless it's a consult command"
|
||||
(interactive)
|
||||
(unless (string-match-p "^consult" (symbol-name selectrum--last-command))
|
||||
(print selectrum--last-command)
|
||||
(unless (bound-and-true-p consult--preview-function)
|
||||
(save-selected-window
|
||||
(let ((embark-quit-after-action nil))
|
||||
(embark-default-action)))))
|
||||
|
@ -139,7 +139,7 @@
|
||||
:after (embark consult)
|
||||
:demand t
|
||||
:hook
|
||||
(embark-collect-mode . consult-preview-minor-mode))
|
||||
(embark-collect-mode . consult-preview-at-point-mode))
|
||||
|
||||
(use-package! wgrep
|
||||
:commands wgrep-change-to-wgrep-mode
|
||||
|
Reference in New Issue
Block a user