mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
Conditionally switch to insert mode on snippet expansion
If already in insert (or emacs) state, don't switch mode when expanding a yasnippet snippet.
This commit is contained in:
@ -312,5 +312,7 @@ is."
|
|||||||
(defun region-end () evil-visual-end))
|
(defun region-end () evil-visual-end))
|
||||||
(funcall orig-fn no-condition)))
|
(funcall orig-fn no-condition)))
|
||||||
(when (and (bound-and-true-p evil-local-mode)
|
(when (and (bound-and-true-p evil-local-mode)
|
||||||
|
(not (or (evil-emacs-state-p)
|
||||||
|
(evil-insert-state-p)))
|
||||||
(yas-active-snippets))
|
(yas-active-snippets))
|
||||||
(evil-insert-state +1)))
|
(evil-insert-state +1)))
|
||||||
|
Reference in New Issue
Block a user