You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because an error is now returned if the whole snippet is not parsed and some snippets are not getting parsed fully like the macro_rules snippet from rust analyzer, which means those snippets are not applied. @pascalkuthe wrote the pr that discards snippets of they aren't fully parsed, and he suspects it's a seperate bug, because we should always fully parse a snippet unless the snippet is incorrect.
Reproduction Steps
I tried this:
hx
Open a rust file
Type macro_ru
Tab till you get the macro_rules snippet
I expected this to happen:
Snippeted is applied
Instead, this happened:
Document stays the same and error is added to log file
Thanks for reporting, what's causing this issue is that the snippet code currently requires } to be escaped.
From the spec:
With \ (backslash), you can escape $, } and . Within choice elements, the backslash also escapes comma and pipe characters.
I assumed that means that } always needs to be escaped but I guess thats only true in a context where }has special syntactic meaning.
Fixing this should be quite easy but I want to look at vscode again to catch all the details of how they handle this. The standard is so vague here that snippets are essentially defined by what vscode does. I will be traveling this weekend so I might only get a chance to do that next week
Summary
Because an error is now returned if the whole snippet is not parsed and some snippets are not getting parsed fully like the
macro_rules
snippet from rust analyzer, which means those snippets are not applied.@pascalkuthe wrote the pr that discards snippets of they aren't fully parsed, and he suspects it's a seperate bug, because we should always fully parse a snippet unless the snippet is incorrect.
Reproduction Steps
I tried this:
hx
macro_ru
macro_rules
snippetI expected this to happen:
Snippeted is applied
Instead, this happened:
Document stays the same and error is added to log file
Helix log
~/.cache/helix/helix.log
Platform
Linux and Android
Terminal Emulator
Kitty and termux
Helix Version
22.12-434-g21a3fb8f
The text was updated successfully, but these errors were encountered: