feat(vertico): add magit-status embark action
This commit is contained in:
parent
9e3a5df15d
commit
934ad07f23
2 changed files with 10 additions and 0 deletions
8
modules/completion/vertico/autoload/magit.el
Normal file
8
modules/completion/vertico/autoload/magit.el
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
;;; completion/vertico/autoload/magit.el -*- lexical-binding: t; -*-
|
||||||
|
;;;###if (featurep! :tools magit)
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun +vertico/embark-magit-status (file)
|
||||||
|
"Run `magit-status` on repo containing the embark target."
|
||||||
|
(interactive "GFile: ")
|
||||||
|
(magit-status (locate-dominating-file file ".git")))
|
|
@ -170,6 +170,8 @@ overrides `completion-styles' during company completion sessions.")
|
||||||
(setq embark-package-map (make-sparse-keymap))
|
(setq embark-package-map (make-sparse-keymap))
|
||||||
(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)
|
||||||
|
: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
|
(:map embark-package-map
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue