From 349e2696f454c0432e6f10fa4005487693b8d179 Mon Sep 17 00:00:00 2001 From: jao Date: Wed, 24 Mar 2021 04:03:10 +0000 Subject: completion improvements --- consult.org | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/consult.org b/consult.org index 7dcf80b..bcd5aac 100644 --- a/consult.org +++ b/consult.org @@ -5,9 +5,6 @@ (use-package orderless :ensure t :custom ((completion-styles '(orderless)) - ;; orderless-literal comes in handy when using selectrum's - ;; quick-keys, for instance after it inserts the full selected - ;; line in a consult-line session. (orderless-matching-styles '(orderless-regexp orderless-initialism orderless-literal))) :init @@ -26,7 +23,7 @@ #+begin_src emacs-lisp (use-package selectrum :ensure t - :custom ((selectrum-complete-in-buffer nil) + :custom ((selectrum-complete-in-buffer t) (selectrum-extend-current-candidate-highlight t) (selectrum-fix-vertical-window-height nil) (selectrum-max-window-height 20) @@ -41,7 +38,7 @@ :bind (:map minibuffer-local-map ("C-M-a" . marginalia-cycle)) :custom ((marginalia-align-offset 1) - (marginalia-margin-threshold 160) + (marginalia-margin-threshold 200) (marginalia-separator-threshold 120) (marginalia-truncate-width 80) (marginalia-annotators @@ -104,7 +101,9 @@ *** notmuch #+begin_src emacs-lisp (jao-load-path "consult-notmuch") - (use-package consult-notmuch) + (use-package consult-notmuch + :config + (add-to-list 'consult-config '(consult-notmuch :preview-key any))) #+end_src *** recoll #+begin_src emacs-lisp @@ -173,7 +172,8 @@ #+begin_src emacs-lisp (use-package embark :ensure t - :custom ((embark-quit-after-action nil)) + :custom ((embark-quit-after-action nil) + (prefix-help-command #'embark-prefix-help-command)) :bind (("C-;" . embark-act) ("C-'" . embark-default-action) (:map minibuffer-local-map @@ -256,7 +256,7 @@ (embark-kill-buffer-and-window jao-embark--actions-buffer) (when selectrum-active-p (select-window (minibuffer-window)))))) - (setq embark-action-indicator #'jao-embark--show-keymap + (setq embark-action-indicator #'jao-embark--show-keymap embark-become-indicator embark-action-indicator) #+end_src @@ -345,8 +345,6 @@ #+end_src * startup #+begin_src emacs-lisp - (selectrum-mode 1) - ;; Use prescient, but only for sorting: ;; (setq selectrum-prescient-enable-filtering nil) ;; (selectrum-prescient-mode 1) @@ -355,6 +353,6 @@ ;; Highlighting only the visible matches: (setq orderless-skip-highlighting (lambda () selectrum-is-active)) (setq selectrum-highlight-candidates-function #'orderless-highlight-matches) - - (marginalia-mode 1) + (add-hook 'after-init-hook #'selectrum-mode) + (add-hook 'after-init-hook #'marginalia-mode) #+end_src -- cgit v1.2.3