summary refs log tree commit diff
path: root/config/init-completion.el
blob: 5ba2038e9ccea9817cbe87728d05f2049868f23b (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
;;; init-completion.el --- Configure completion -*- lexical-binding: t -*-
;; Author: Franck Cuny <franck@fcuny.net>

;;; Commentary:

;; Configure completions

;;; Code:

(use-package consult
  :ensure t
  :commands (consult-ripgrep consult-buffer consult-imenu)
  :bind (("C-c m"   . consult-mode-command)
	 ("C-x b"   . consult-buffer)
	 ("C-x r b" . consult-bookmark)
	 ("C-x p b" . consult-project-buffer)
	 ("C-c i"   . consult-imenu)
	 ("M-g e"   . consult-compile-error)
	 ("M-g M-g" . consult-goto-line)
	 ("M-g m"   . consult-mark)
	 ("M-g k"   . consult-global-mark)))

(use-package corfu
  :ensure t
  :custom
  (corfu-auto t)
  :bind ("M-/" . completion-at-point)
  :hook ((after-init . global-corfu-mode)
         (global-corfu-mode . corfu-popupinfo-mode)))

(use-package cape
  :demand t
  :ensure t)

(use-package marginalia
  :ensure t
  :hook (after-init . marginalia-mode))

(use-package orderless
  :demand t
  :ensure t
  :custom
  (completion-styles '(orderless basic))
  (completion-category-defaults nil))

(use-package vertico
  :ensure t
  :hook ((after-init . vertico-mode)))

(provide 'init-completion)

;;; init-completion.el ends here