From 161d48c2a94d6dbd8da922bb408a5122628e29c2 Mon Sep 17 00:00:00 2001 From: "Itai Y. Efrat" Date: Sun, 22 Aug 2021 00:37:57 +0300 Subject: [PATCH] refactor(vertico): embark package actions map - use new variable +vertico/embark-doom-package-map instead of overriding embark-package-map - define it with embark-define-keymap in order to inherit from the default keymap --- modules/completion/vertico/config.el | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/modules/completion/vertico/config.el b/modules/completion/vertico/config.el index 2b0836e05..9769b34ca 100644 --- a/modules/completion/vertico/config.el +++ b/modules/completion/vertico/config.el @@ -167,18 +167,19 @@ overrides `completion-styles' during company completion sessions.") cons '+vertico-embark-target-package-fn (nthcdr pos embark-target-finders))) - (setq embark-package-map (make-sparse-keymap)) + (embark-define-keymap +vertico/embark-doom-package-map + "Keymap for Embark package actions for packages installed by Doom." + ("h" doom/help-packages) + ("b" doom/bump-package) + ("c" doom/help-package-config) + ("u" doom/help-package-homepage)) + (setf (alist-get 'package embark-keymap-alist) #'+vertico/embark-doom-package-map) (map! (:map embark-file-map :desc "Open target with sudo" "s" #'doom/sudo-find-file (:when (featurep! :tools magit) :desc "Open magit-status of target" "g" #'+vertico/embark-magit-status) (:when (featurep! :ui workspaces) - :desc "Open in new workspace" "TAB" #'+vertico/embark-open-in-new-workspace)) - (:map embark-package-map - "h" #'doom/help-packages - "b" #'doom/bump-package - "c" #'doom/help-package-config - "u" #'doom/help-package-homepage))) + :desc "Open in new workspace" "TAB" #'+vertico/embark-open-in-new-workspace)))) (use-package! marginalia