mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
feature/snippets: refactor, cleanup & stability tweaks
This commit is contained in:
@ -10,8 +10,8 @@ and switches to insert mode if there are editable fields."
|
||||
(cl-letf (((symbol-function 'region-beginning) (lambda () evil-visual-beginning))
|
||||
((symbol-function 'region-end) (lambda () evil-visual-end)))
|
||||
(yas-insert-snippet))
|
||||
(let* ((snippet (first (yas--snippets-at-point)))
|
||||
(fields (yas--snippet-fields snippet)))
|
||||
(evil-insert-state +1)
|
||||
(unless fields (evil-change-state 'normal))))
|
||||
(when-let (snippet (car-safe (yas--snippets-at-point)))
|
||||
(let ((fields (yas--snippet-fields snippet)))
|
||||
(evil-insert-state +1)
|
||||
(unless fields (evil-change-state 'normal)))))
|
||||
|
||||
|
Reference in New Issue
Block a user