feature/snippets: remap yas-insert-snippet instead
Rather than binding directly to +snippets/expand-on-region
This commit is contained in:
parent
e4fe46adbd
commit
17d206a28f
2 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue