Closed deriamis closed 8 months ago
Do you have an example snippet that has this behavior? I think this may be https://github.com/gleam-lang/tree-sitter-gleam/issues/67 which was fixed on main recently
I'll close this out with #70 since I'm pretty sure it was the same as #67 and the fix for #67 has been released in a few tags. We can re-open or create a new issue though if you're still seeing this
When editing a source file, using attributes can cause odd syntax highlighting failures. For instance, using the
@external
attribute to mark an external function will cause the rest of the source file to be parsed incorrectly unless the function defines a fallback implementation.A solution to this problem would likely be to attach attributes to legal parent nodes, such as functions and statement blocks. This would allow tree-sitter to more consistently "complete" a tree as soon as it matches a syntax node.