diff options
author | Matthew Lemon <y@yulqen.org> | 2024-07-17 15:10:18 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-07-17 15:10:18 +0100 |
commit | 6f93ce73ecc43939f1d007ce72f2371b65dcf5e4 (patch) | |
tree | ed128397d0ed34a9dd4c8f813ec779132ac4d50c | |
parent | 1d8aa4a99f36131dae612d5ba57658e5366837f7 (diff) |
Updated vertico config based on docs
-rw-r--r-- | init.el | 47 |
1 files changed, 21 insertions, 26 deletions
@@ -640,21 +640,13 @@ Restart works only on graphic display." ;; Enable vertico (use-package vertico :ensure t + :custom + ;; (vertico-scroll-margin 0) ;; Different scroll margin + (vertico-count 20) ;; Show more candidates + ;; (vertico-resize t) ;; Grow and shrink the Vertico minibuffer + (vertico-cycle t) ;; Enable cycling for `vertico-next/previous' :init - (vertico-mode) - - ;;Different scroll margin - (setq vertico-scroll-margin 0) - - ;;Show more candidates - we don't need many - (setq vertico-count 10) - - ;;Grow and shrink the Vertico minibuffer - set to nil because it - ;; jumping up and down is nippy - (setq vertico-resize nil) - - ;;Optionally enable cycling for `vertico-next' and `vertico-previous'. - (setq vertico-cycle t)) + (vertico-mode)) ;; Persist history over Emacs restarts. Vertico sorts by history position. (use-package savehist @@ -663,7 +655,13 @@ Restart works only on graphic display." ;; A few more useful configurations... (use-package emacs - :ensure t + :custom + ;; Support opening new minibuffers from inside existing minibuffers. + (enable-recursive-minibuffers t) + ;; Emacs 28 and newer: Hide commands in M-x which do not work in the current + ;; mode. Vertico commands are hidden in normal buffers. This setting is + ;; useful beyond Vertico. + (read-extended-command-predicate #'command-completion-default-include-p) :init ;; Add prompt indicator to `completing-read-multiple'. ;; We display [CRM<separator>], e.g., [CRM,] if the separator is a comma. @@ -679,21 +677,18 @@ Restart works only on graphic display." ;; Do not allow the cursor in the minibuffer prompt (setq minibuffer-prompt-properties '(read-only t cursor-intangible t face minibuffer-prompt)) - (add-hook 'minibuffer-setup-hook #'cursor-intangible-mode) - - ;; Emacs 28: Hide commands in M-x which do not work in the current mode. - ;; Vertico commands are hidden in normal buffers. - ;; (setq read-extended-command-predicate - ;; #'command-completion-default-include-p) - - ;; Enable recursive minibuffers - (setq enable-recursive-minibuffers t)) + (add-hook 'minibuffer-setup-hook #'cursor-intangible-mode)) +;; Optionally use the `orderless' completion style. (use-package orderless - :ensure t :custom + ;; Configure a custom style dispatcher (see the Consult wiki) + ;; (orderless-style-dispatchers '(+orderless-consult-dispatch orderless-affix-dispatch)) + ;; (orderless-component-separator #'orderless-escapable-split-on-space) (completion-styles '(orderless basic)) - (completion-category-overrides '((file (styles basic partial-completion))))) + (completion-category-defaults nil) + (completion-category-overrides '((file (styles partial-completion))))) + ; Example configuration for Consult - from https://github.com/minad/consult |