disable evil-surround in magit-status buffers (#15462)

This commit is contained in:
Dan Kessler 2022-04-11 13:28:02 -04:00 committed by GitHub
parent 5c0650282f
commit 9dd28c0316
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,6 +24,7 @@
(defconst git-packages
'(
evil-collection
evil-surround
fill-column-indicator
;; forge requires a C compiler on Windows so we disable
;; it by default on Windows.
@ -55,6 +56,12 @@
:post-config
(add-to-list 'golden-ratio-exclude-buffer-names " *transient*")))
;; evil-surround bindings interfere with line-wise staging
(defun git/post-init-evil-surround ()
(spacemacs|use-package-add-hook magit
:post-config
(add-hook 'magit-status-mode-hook #'turn-off-evil-surround-mode)))
(defun git/pre-init-evil-collection ()
(when (spacemacs//support-evilified-buffer-p)
(add-to-list 'spacemacs-evil-collection-allowed-list 'magit)