blob: 5ed684ba7cbe6a32f48db9a1c81e95e9d79784da (
plain)
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
|
(gx/maybe-require-package 'consult)
(when (gx/maybe-require-package 'vertico)
(add-hook 'after-init-hook #'vertico-mode))
(setq vertico-resize t
vertico-count 20
vertico-cycle t)
(defun gx/setup-completion-in-minibuffer ()
(setq-local completion-styles '(substring orderless)
completion-category-defaults nil
completion-category-overrides '((file (styles partial-completion)))))
(when (gx/maybe-require-package 'orderless)
(add-hook 'minibuffer-setup-hook #'gx/setup-completion-in-minibuffer))
(with-eval-after-load 'evil
(when (gx/maybe-require-package 'consult)
(evil-define-key 'normal 'global
(kbd "<leader>fb") 'consult-buffer
(kbd "<leader>fm") 'consult-recent-file
(kbd "<leader>fc") 'execute-extended-command
(kbd "<leader>fl") 'consult-line)))
(when (gx/maybe-require-package 'savehist)
(add-hook 'after-init-hook #'savehist-mode))
(provide 'init-minibuffer)
|