mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
Fix some file-templates not being inserted
Because yas--lookup-snippet-1 uses the template's description, rather than its trigger key as its lookup key. Doom expects it the other way around, which is the case when a file template doesn't define a name: in the snippet.
This commit is contained in:
@ -29,7 +29,10 @@
|
||||
(unless yas-minor-mode
|
||||
(yas-minor-mode-on))
|
||||
(when (and yas-minor-mode
|
||||
(yas-expand-snippet (yas-lookup-snippet key mode t))
|
||||
(yas-expand-snippet
|
||||
(yas--template-content
|
||||
(cl-find key (yas--all-templates (yas--get-snippet-tables mode))
|
||||
:key #'yas--template-key :test #'equal)))
|
||||
(and (featurep 'evil) evil-mode)
|
||||
(and yas--active-field-overlay
|
||||
(overlay-buffer yas--active-field-overlay)
|
||||
|
Reference in New Issue
Block a user