magit: integrate with shackle and isolate to popups (experimental)
This commit is contained in:
parent
a2fa66ea37
commit
b72ca79356
2 changed files with 24 additions and 2 deletions
|
@ -52,10 +52,19 @@
|
||||||
(use-package magit
|
(use-package magit
|
||||||
:commands (magit-status)
|
:commands (magit-status)
|
||||||
:config
|
:config
|
||||||
|
(def-popup! "^\\*magit.+" :align below :regexp t)
|
||||||
;; Prevent magit + evil-snipe conflicts
|
;; Prevent magit + evil-snipe conflicts
|
||||||
(add-hook 'magit-mode-hook 'turn-off-evil-snipe-override-mode)
|
(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
|
(after! vc-annotate
|
||||||
(evil-set-initial-state 'vc-annotate-mode 'normal)
|
(evil-set-initial-state 'vc-annotate-mode 'normal)
|
||||||
|
|
13
core/defuns/defuns-magit.el
Normal file
13
core/defuns/defuns-magit.el
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue