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:
parent
1ebc4c9594
commit
14f310e199
1 changed files with 4 additions and 1 deletions
|
@ -29,7 +29,10 @@
|
||||||
(unless yas-minor-mode
|
(unless yas-minor-mode
|
||||||
(yas-minor-mode-on))
|
(yas-minor-mode-on))
|
||||||
(when (and yas-minor-mode
|
(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 (featurep 'evil) evil-mode)
|
||||||
(and yas--active-field-overlay
|
(and yas--active-field-overlay
|
||||||
(overlay-buffer yas--active-field-overlay)
|
(overlay-buffer yas--active-field-overlay)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue