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
Very strange. You don't show it in your screenshot but the highlighting just stops working after a certain point altogether. This looks a lot like #6509 but I tried increasing that limit and event entirely removing it from the codebase and it doesn't change anything. Some parts of this are due to a bug in the rust grammar I suspect but some things here a super weird.
for example for "0" the 0 gets highlighted as 0 event tough even as a lexical token it's a string literal. However tree-sitter-scopes and tree-sitter-subtree actually say it's a string_literal. There are some suspicious token_tree captures showing up tough so maybe they are taking precedence somehow? Another weird thing is that the " get their own token trees. I think they probably need to specially handle string literals inside the scanner to avoid that?
Trying it out a similar issue seems to occur in nvim s oit's probably an upstream issue of some sort
Summary
Looking at some code from
rust-analyzer
:config.rs.Results in some strange syntax highlighting within the
config_data!
macro:Not sure if it counts as a bug since the code inside the macro is not actually valid rust syntax, but thought I'd file this anyway just in case 🤷♂️.
For reference this is what it looks like in vscode:
Also wrong, but in a different way 😆
Reproduction Steps
I tried this:
hx config.rs
I expected this to happen:
Text inside quotes is colored as such.
Instead, this happened:
Some text is colored incorrectly
Helix log
No response
Platform
Linux
Terminal Emulator
kgx (Gnome Console)
Helix Version
helix 23.03
The text was updated successfully, but these errors were encountered: