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:
parent
1f3281734a
commit
14d6613192
2 changed files with 5 additions and 6 deletions
|
@ -96,8 +96,7 @@ Supports exporting consult-grep to wgrep, file to wdeired, and consult-location
|
||||||
(defun +selectrum/embark-preview ()
|
(defun +selectrum/embark-preview ()
|
||||||
"Previews candidate in selectrum buffer, unless it's a consult command"
|
"Previews candidate in selectrum buffer, unless it's a consult command"
|
||||||
(interactive)
|
(interactive)
|
||||||
(unless (string-match-p "^consult" (symbol-name selectrum--last-command))
|
(unless (bound-and-true-p consult--preview-function)
|
||||||
(print selectrum--last-command)
|
|
||||||
(save-selected-window
|
(save-selected-window
|
||||||
(let ((embark-quit-after-action nil))
|
(let ((embark-quit-after-action nil))
|
||||||
(embark-default-action)))))
|
(embark-default-action)))))
|
||||||
|
|
|
@ -139,7 +139,7 @@
|
||||||
:after (embark consult)
|
:after (embark consult)
|
||||||
:demand t
|
:demand t
|
||||||
:hook
|
:hook
|
||||||
(embark-collect-mode . consult-preview-minor-mode))
|
(embark-collect-mode . consult-preview-at-point-mode))
|
||||||
|
|
||||||
(use-package! wgrep
|
(use-package! wgrep
|
||||||
:commands wgrep-change-to-wgrep-mode
|
:commands wgrep-change-to-wgrep-mode
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue