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
This commit is contained in:
parent
9d44b3510a
commit
161d48c2a9
1 changed files with 8 additions and 7 deletions
|
@ -167,18 +167,19 @@ overrides `completion-styles' during company completion sessions.")
|
||||||
cons
|
cons
|
||||||
'+vertico-embark-target-package-fn
|
'+vertico-embark-target-package-fn
|
||||||
(nthcdr pos embark-target-finders)))
|
(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
|
(map! (:map embark-file-map
|
||||||
:desc "Open target with sudo" "s" #'doom/sudo-find-file
|
:desc "Open target with sudo" "s" #'doom/sudo-find-file
|
||||||
(:when (featurep! :tools magit)
|
(:when (featurep! :tools magit)
|
||||||
:desc "Open magit-status of target" "g" #'+vertico/embark-magit-status)
|
:desc "Open magit-status of target" "g" #'+vertico/embark-magit-status)
|
||||||
(:when (featurep! :ui workspaces)
|
(:when (featurep! :ui workspaces)
|
||||||
:desc "Open in new workspace" "TAB" #'+vertico/embark-open-in-new-workspace))
|
: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)))
|
|
||||||
|
|
||||||
|
|
||||||
(use-package! marginalia
|
(use-package! marginalia
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue