highlight issue: '#' in a string causes rest of line to be treated as comment
colemickens opened this issue · comments
I believe those strings should be fully rendered as strings, rather than partially be rendered as if they were a comment, owing to the #
usage.
If I change a single line to double quotes, things get even stranger:
In fact, maybe this is linked to what I'm seeing in #9 ... I likely have this construct elsewhere in this file that might be confusing the parser? tree-sitter? etc.
I will definitely work on cutting this down, but my first crude attempt is showing all sorts of other interesting behavior as I remove various functions in pursuit of a minimal case.
FWIW, what I'm working with is helix-tip and this file: https://github.com/colemickens/nixcfg/blob/4f3fbe340dd25aafd45cc54007224914d84369d1/main.nu
If you grep for def "main up"
you'll find the portion I used to file this bug, and if you start removing functions above it, you'll see some interesting behavior (note how def
is highlighted as you go, etc).
I will keep this tab open with the hopes of cutting it down, but maybe you'll look and see something obvious too?
Closing this. Helix uses nushell/tree-sitter-nu, not this repo. My mistake.