summaryrefslogtreecommitdiffhomepage
path: root/consult.org
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-03-24 04:03:10 +0000
committerjao <jao@gnu.org>2021-03-24 04:03:10 +0000
commit349e2696f454c0432e6f10fa4005487693b8d179 (patch)
tree9d555587de13003404ff860b52272aa6f685c74d /consult.org
parent6fbb6e31c38c2ef68f2afa5f425698c6e016808d (diff)
downloadelibs-349e2696f454c0432e6f10fa4005487693b8d179.tar.gz
elibs-349e2696f454c0432e6f10fa4005487693b8d179.tar.bz2
completion improvements
Diffstat (limited to 'consult.org')
-rw-r--r--consult.org22
1 files 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