Magit: Add submodule prefix back in after forge loads (#446)

This commit is contained in:
James Nguyen 2021-01-30 00:31:50 -08:00
parent be3e955f06
commit 2bbaa52d22
1 changed files with 6 additions and 0 deletions

View File

@ -596,6 +596,12 @@ evil-collection-magit affects.")
(dolist (change evil-collection-magit-popup-changes)
(apply #'evil-collection-magit-change-popup-key change))
(with-eval-after-load 'forge
;; When `forge' is loaded, it maps `forge-dispatch' to ' key which is
;; set for `magit-submodule', wiping it so we add it back after `forge'
;; loads.
(transient-append-suffix 'magit-dispatch "M"
'("'" "Submodule" magit-submodule))
;; Clear `forge' key and re-add back in as "@".
(transient-remove-suffix 'magit-dispatch 'forge-dispatch)
(transient-append-suffix 'magit-dispatch "!"
'("@" "Forge" forge-dispatch)))