mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
tools/magit: minor refactor; clean up buffers after quitting magit #506
This commit is contained in:
@ -11,19 +11,11 @@
|
|||||||
#'magit-builtin-completing-read)
|
#'magit-builtin-completing-read)
|
||||||
magit-revision-show-gravatars '("^Author: " . "^Commit: "))
|
magit-revision-show-gravatars '("^Author: " . "^Commit: "))
|
||||||
|
|
||||||
(set! :popup "^\\*?magit" :ignore)
|
(add-hook 'magit-popup-mode-hook #'hide-mode-line-mode)
|
||||||
|
(set! :popup "^\\(?:\\*magit\\|magit:\\)" :ignore)
|
||||||
;; (add-hook 'magit-popup-mode-hook #'hide-mode-line-mode)
|
;; Clean up after magit by properly killing buffers
|
||||||
;; (set! :popup "^.*magit" '((slot . -1) (side . right) (size . 80)) '((modeline . nil) (select . t)))
|
(setq magit-bury-buffer-function #'+magit/quit)
|
||||||
;; (set! :popup "^\\*magit.*popup\\*" '((slot . 0) (side . right)) '((modeline . nil) (select . t)))
|
(map! :map magit-mode-map [remap quit-window] #'+magit/quit))
|
||||||
;; (set! :popup "^.*magit-revision:.*" '((slot . 2) (side . right) (window-height . 0.6)) '((modeline . nil) (select . t)))
|
|
||||||
;; (set! :popup "^.*magit-diff:.*" '((slot . 2) (side . right) (window-height . 0.6)) '((modeline . nil) (select . nil)))
|
|
||||||
|
|
||||||
(after! evil
|
|
||||||
;; Switch to emacs state only while in `magit-blame-mode', then back when
|
|
||||||
;; its done (since it's a minor-mode).
|
|
||||||
(add-hook! 'magit-blame-mode-hook
|
|
||||||
(evil-local-mode (if magit-blame-mode -1 +1)))))
|
|
||||||
|
|
||||||
|
|
||||||
(def-package! magit-blame
|
(def-package! magit-blame
|
||||||
@ -48,4 +40,9 @@
|
|||||||
:when (featurep! :feature evil)
|
:when (featurep! :feature evil)
|
||||||
:after magit
|
:after magit
|
||||||
:config
|
:config
|
||||||
(setq evil-magit-state 'normal))
|
(setq evil-magit-state 'normal)
|
||||||
|
|
||||||
|
;; Switch to emacs state only while in `magit-blame-mode', then back when
|
||||||
|
;; its done (since it's a minor-mode).
|
||||||
|
(add-hook! 'magit-blame-mode-hook
|
||||||
|
(evil-local-mode (if magit-blame-mode -1 +1))))
|
||||||
|
Reference in New Issue
Block a user