Closed
Description
Summary
Constants with one character names are incorrectly highlighted in Rust
They both have the same tree-sitter scopes:
Definition: scopes: ["source_file", "const_item", "identifier"]
Usage: scopes: ["source_file", "function_item", "block", "let_declaration", "identifier"]
const NUM: usize = 5;
const N: usize = 4;
fn f() {
let a = N;
let b = NUM;
}
Reproduction Steps
I tried this:
hx file.rs
file with code from above
I expected this to happen:
one letter constant "N" is highlighted the same as other constants
Instead, this happened:
It is highlighted the same as a "type_identifier"
Helix log
Nothing
Platform
Linux
Terminal Emulator
Gnome console
Helix Version
22.08.1