mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Convert +snippets/expand-on-region to advice
It's meant to be corrective, not alternative behavior.
This commit is contained in:
@ -48,9 +48,9 @@
|
||||
;; Enable `read-only-mode' for built-in snippets (in `doom-local-dir')
|
||||
(add-hook 'snippet-mode-hook #'+snippets|read-only-maybe)
|
||||
|
||||
(when (featurep! :editor evil)
|
||||
;; evil visual-mode integration for `yas-insert-snippet'
|
||||
(define-key yas-minor-mode-map [remap yas-insert-snippet] #'+snippets/expand-on-region)))
|
||||
;; (Evil only) fix off-by-one issue with visual-mode selections in
|
||||
;; `yas-insert-snippet', and switches to insert mode afterwards.
|
||||
(advice-add #'yas-insert-snippet :around #'+snippets*expand-on-region))
|
||||
|
||||
|
||||
;; `auto-yasnippet'
|
||||
|
Reference in New Issue
Block a user