mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
feat(file-templates): improve diagnostic command
Emit a more helpful error message if a rule was found but yasnippet can't find the associated snippet.
This commit is contained in:
@ -119,4 +119,10 @@ evil is loaded and enabled)."
|
|||||||
"Tests the current buffer and outputs the file template rule most appropriate
|
"Tests the current buffer and outputs the file template rule most appropriate
|
||||||
for it. This is used for testing."
|
for it. This is used for testing."
|
||||||
(interactive)
|
(interactive)
|
||||||
(message "Found %s" (cl-find-if #'+file-template-p +file-templates-alist)))
|
(let ((template (cl-find-if #'+file-template-p +file-templates-alist)))
|
||||||
|
(if (cl-find trigger (yas--all-templates
|
||||||
|
(yas--get-snippet-tables
|
||||||
|
(plist-get template :mode)))
|
||||||
|
:key #'yas--template-key :test #'equal)
|
||||||
|
(message "Found %s" template)
|
||||||
|
(message "Found rule, but can't find associated snippet: %s" template))))
|
||||||
|
Reference in New Issue
Block a user