From 4e105a95af9c4c7e86471e5566eb7a5ff776ec92 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 22 Mar 2023 18:29:38 -0400 Subject: [PATCH] refactor(vertico): take evil keybinds from :config default --- modules/completion/vertico/config.el | 6 ++++++ modules/config/default/+evil-bindings.el | 12 +----------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/modules/completion/vertico/config.el b/modules/completion/vertico/config.el index 86ff2b6fb3d..ddad6109217 100644 --- a/modules/completion/vertico/config.el +++ b/modules/completion/vertico/config.el @@ -37,6 +37,12 @@ overrides `completion-styles' during company completion sessions.") (map! :when (modulep! :editor evil +everywhere) :map vertico-map + "M-RET" #'vertico-exit-input + "C-SPC" #'+vertico/embark-preview + "C-j" #'vertico-next + "C-M-j" #'vertico-next-group + "C-k" #'vertico-previous + "C-M-k" #'vertico-previous-group "C-h" (cmds! (eq 'file (vertico--metadata-get 'category)) #'vertico-directory-up) "C-l" (cmds! (eq 'file (vertico--metadata-get 'category)) #'+vertico/enter-or-preview)) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 0027b280ccd..5cd3be6591f 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -206,17 +206,7 @@ (:after helm-occur :map helm-occur-map [C-return] #'helm-occur-run-goto-line-ow) (:after helm-grep :map helm-grep-map - [C-return] #'helm-grep-run-other-window-action)) - - (:when (modulep! :completion vertico) - (:after vertico - :map vertico-map - "M-RET" #'vertico-exit-input - "C-SPC" #'+vertico/embark-preview - "C-j" #'vertico-next - "C-M-j" #'vertico-next-group - "C-k" #'vertico-previous - "C-M-k" #'vertico-previous-group))) + [C-return] #'helm-grep-run-other-window-action))) ;;; :ui