mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
feature/snippets: remap yas-insert-snippet instead
Rather than binding directly to +snippets/expand-on-region
This commit is contained in:
@ -643,7 +643,7 @@
|
||||
[delete] #'+snippets/delete-forward-char-or-field)
|
||||
(:map yas-minor-mode-map
|
||||
:ig "<tab>" yas-maybe-expand
|
||||
:v "<tab>" #'+snippets/expand-on-region))
|
||||
:v "<tab>" #'yas-insert-snippet))
|
||||
|
||||
|
||||
;; --- Major mode bindings --------------------------
|
||||
|
@ -8,7 +8,11 @@
|
||||
yas-lookup-snippet yas-insert-snippet yas-new-snippet
|
||||
yas-visit-snippet-file snippet-mode)
|
||||
:preface
|
||||
(defvar yas-minor-mode-map (make-sparse-keymap))
|
||||
(defvar yas-minor-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(when (featurep! :feature evil)
|
||||
(define-key map [remap yas-insert-snippet] #'+snippets/expand-on-region))
|
||||
map))
|
||||
|
||||
:init
|
||||
;; Ensure `yas-reload-all' is called as late as possible. Other modules could
|
||||
|
Reference in New Issue
Block a user