mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Enable read-only-mode for built-in snippets
Because they shouldn't be edited out of ~/.emacs.d/.local -- if a snippet in ~/.doom.d/snippets has the same name, built-in snippets will be ignored.
This commit is contained in:
@ -45,6 +45,9 @@
|
||||
;; tell smartparens overlays not to interfere with yasnippet keybinds
|
||||
(advice-add #'yas-expand :before #'sp-remove-active-pair-overlay))
|
||||
|
||||
;; 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)))
|
||||
|
Reference in New Issue
Block a user