Use vertico instead of selectrum

This commit is contained in:
Charlotte Van Petegem 2022-11-29 21:08:56 +01:00
parent fbbaf51a35
commit a58d0250c2
No known key found for this signature in database
GPG key ID: 019E764B7184435A

View file

@ -164,12 +164,11 @@
;; Annotations in selection interface ;; Annotations in selection interface
(use-package marginalia (use-package marginalia
:after (selectrum) :after (vertico)
:custom :custom
(marginalia-annotators '(marginalia-annotators-heavy marginalia-annotators-light nil)) (marginalia-annotators '(marginalia-annotators-heavy marginalia-annotators-light nil))
:config :config
(marginalia-mode) (marginalia-mode)
(advice-add #'marginalia-cycle :after (lambda () (selectrum-exhibit 'keep-selected)))
:general :general
(minibuffer-local-map "M-a" 'marginalia-cycle) (minibuffer-local-map "M-a" 'marginalia-cycle)
) )
@ -198,11 +197,9 @@
;; Orderless filtering ;; Orderless filtering
(use-package orderless (use-package orderless
:after (selectrum) :after (vertico)
:custom :custom
(completion-styles '(orderless) "Use orderless for filtering") (completion-styles '(orderless basic) "Use orderless for filtering")
(orderless-skip-highlighting (lambda () selectrum-is-active) "This and the setting below are performance optimisations.")
(selectrum-highlight-candidates-function #'orderless-highlight-matches "They make sure only the shown candidates are highlighted.")
(orderless-matching-styles '(orderless-regexp orderless-initialism orderless-prefixes) "More matching styles for more flexible matching.") (orderless-matching-styles '(orderless-regexp orderless-initialism orderless-prefixes) "More matching styles for more flexible matching.")
:config :config
;; Highlight multiple parts in company matches ;; Highlight multiple parts in company matches
@ -227,17 +224,17 @@
:hook (prog-mode . rainbow-delimiters-mode)) :hook (prog-mode . rainbow-delimiters-mode))
;; List item selection interface ;; List item selection interface
(use-package selectrum (use-package vertico
:custom (selectrum-max-window-height 20 "Allow selector to be a bit higher") :custom (vertico-count 20 "Allow selector to be a bit higher")
:config (selectrum-mode 1) :config (vertico-mode)
:diminish (selectrum-mode) :diminish (vertico-mode)
) )
;; Prescient integration in selectrum ;; Prescient integration in selectrum
(use-package selectrum-prescient (use-package vertico-prescient
:after (selectrum prescient) :after (vertico prescient)
:custom (selectrum-prescient-enable-filtering nil "`orderless' manages the filtering part.") :custom (vertico-prescient-enable-filtering nil "`orderless' manages the filtering part.")
:config (selectrum-prescient-mode 1)) :config (vertico-prescient-mode 1))
;; Show keybindings ;; Show keybindings
(use-package which-key (use-package which-key