aboutsummaryrefslogtreecommitdiffstats
path: root/.emacs.d/modules/et-completion.el
blob: 9c05dae8610769198373b5bf137212e2aa34f0df (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
;;; et-completion.el --- Enhance the Emacs completion behavior -*- lexical-binding: t; -*-
;;
;;; Commentary:
;;
;;; Code:

;; Add a vertical completion UI
(use-package vertico
  :custom
  (vertico-cycle t)
  :init
  (vertico-mode))

;; Adjust completion search behavior
(use-package orderless
  :ensure t
  :custom
  (completion-styles '(orderless basic))
  (completion-category-overrides '((file (styles partial-completion))))
  (completion-pcm-leading-wildcard t))

;; Persist history over emacs restarts.
;; This allows vertico to sort by history position.
(use-package savehist
  :init
  (savehist-mode))

;; Add documentation alongside the completion items
(use-package marginalia
  :init
  (marginalia-mode))

(provide 'et-completion)
;;; et-completion.el ends here