magit: remove popup hackery (isn't needed anymore + see #6)

This commit is contained in:
Henrik Lissner 2016-09-09 08:39:38 +02:00
parent 3256102b31
commit 1a8ae4d451

View File

@ -51,28 +51,9 @@
(use-package magit
:commands (magit-status)
:config
(def-popup! (:custom (lambda (b &rest _) (derived-mode-p 'magit-mode)))
:align below :size 0.5)
;; Some wrassling must be done to get magit to kill itself, and trigger
;; shackle popup hooks.
(setq magit-bury-buffer-function
(lambda (&rest _) (doom/popup-close (selected-window)))
magit-display-buffer-function
(lambda (b)
(funcall (if (doom/popup-p (selected-window)) 'switch-to-buffer 'doom/popup-buffer) b)
(get-buffer-window b))
magit-display-file-buffer-function
(lambda (b)
(when doom-prev-buffer
(select-window (get-buffer-window doom-prev-buffer)))
(switch-to-buffer b)))
;; Prevent magit and evil-snipe conflicts
(add-hook 'magit-mode-hook 'turn-off-evil-snipe-override-mode)
(require 'evil-magit)
(evil-set-initial-state 'magit-popup-mode 'normal))
(require 'evil-magit))
(after! vc-annotate
(evil-set-initial-state 'vc-annotate-mode 'normal)