Advertisement
jenniferdarlene

Emacs vertico configuration

May 19th, 2023 (edited)
627
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 1.27 KB | Source Code | 0 0
  1. (use-package all-the-icons
  2.   :if (display-graphic-p))
  3. (use-package vertico
  4.   :custom
  5.   (vertico-count 13)                    ; Number of candidates to display
  6.   (vertico-resize t)
  7.   (vertico-cycle nil)           ; Go from last to first candidate and first to last (cycle)?
  8.   :config
  9.   (vertico-mode))
  10. (use-package marginalia
  11.   :custom
  12.   (marginalia-max-relative-age 0)
  13.   (marginalia-align 'right)
  14.   :init
  15.   (marginalia-mode))
  16. (use-package orderless
  17.   :custom
  18.   (completion-styles '(orderless))      ; Use orderless
  19.   (completion-category-defaults nil)    ; I want to be in control!
  20.   (completion-category-overrides
  21.    '((file (styles basic-remote     ; For `tramp' hostname completion with `vertico'
  22.                    orderless)))))
  23. (use-package consult)
  24. ;; Use `consult-completion-in-region' if Vertico is enabled.
  25. ;; Otherwise use the default `completion--in-region' function.1
  26. (setq completion-in-region-function
  27.       (lambda (&rest args)
  28.         (apply (if vertico-mode
  29.                    #'consult-completion-in-region
  30.                  #'completion--in-region)
  31.                args)))
  32.  
  33. (use-package all-the-icons-completion
  34.   :after (marginalia all-the-icons)
  35.   :hook (marginalia-mode . all-the-icons-completion-marginalia-setup)
  36.   :init
  37.   (all-the-icons-completion-mode))
  38.  
Tags: emacs
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement