mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
feat(vertico): add magit-status embark action
This commit is contained in:
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))
|
||||
(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
|
||||
|
Reference in New Issue
Block a user