magit: integrate with shackle and isolate to popups (experimental)

This commit is contained in:
Henrik Lissner 2017-01-03 23:04:08 -05:00
parent a2fa66ea37
commit b72ca79356
2 changed files with 24 additions and 2 deletions

View file

@ -52,10 +52,19 @@
(use-package magit
:commands (magit-status)
:config
(def-popup! "^\\*magit.+" :align below :regexp t)
;; Prevent magit + evil-snipe conflicts
(add-hook 'magit-mode-hook 'turn-off-evil-snipe-override-mode)
(map! :map magit-mode-map :m "<tab>" 'magit-section-toggle)
(require 'evil-magit))
(require 'evil-magit)
(setq magit-display-file-buffer-function 'doom/magit-pop-to-buffer)
(map! :map magit-mode-map
;; Don't let Tab binding in my-bindings conflict with Tab in magit
:m "<tab>" 'magit-section-toggle
;; Don't interfere with window movement keys
:nv "C-j" nil
:nv "C-k" nil))
(after! vc-annotate
(evil-set-initial-state 'vc-annotate-mode 'normal)

View file

@ -0,0 +1,13 @@
;;; defuns-magit.el
;;;###autoload
(defun doom/magit-pop-to-buffer (buffer)
"Pop to buffer in non-magit buffer."
(let (pt)
(doom/popup-save
(pop-to-buffer buffer)
(setq pt (point)))
(goto-char pt)))
(provide 'defuns-magit)
;;; defuns-magit.el ends here