Improve vertico usability

Add M-j/M-k, M-`, and M-1 to M-9 to match company
This commit is contained in:
outfoxxed 2023-01-20 17:24:49 -08:00
parent e9e0ca0252
commit bd40189259
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E

15
init.el
View file

@ -99,8 +99,23 @@
;; Vertico (completion helper)
(use-package vertico
:config
(keymap-set vertico-map "M-j" #'vertico-next)
(keymap-set vertico-map "M-k" #'vertico-previous)
(keymap-set vertico-map "M-`" #'vertico-exit)
(vertico-mode))
(use-package vertico-indexed
:after vertico
:init
(setq vertico-indexed-start 1)
:config
(dotimes (i 9)
(keymap-set vertico-map (format "M-%d" (+ i 1))
`(lambda () (interactive)
(let ((current-prefix-arg (+ ,i 1)))
(call-interactively #'vertico-exit)))))
(vertico-indexed-mode))
;; Editorconfig support
(use-package editorconfig
:config