feature/snippets: remap yas-insert-snippet instead

Rather than binding directly to +snippets/expand-on-region
This commit is contained in:
Henrik Lissner 2018-03-13 01:24:08 -04:00
parent e4fe46adbd
commit 17d206a28f
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 6 additions and 2 deletions

View file

@ -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