Enum variants with only a single uppercase letter and digits have "constant" scope applied
Opened this issue ยท 0 comments
detly commented
Sublime Text Version
Sublime Text 4 (Build 4142)
Rust Enhanced Version
v2.25.0
Operating system
Ubuntu 22.10, Gnome 43.0
Expected behavior
enum HayesCommand {
/// Commands per the V.250 aka V.25TER AT standard, plus the ETSI TS 127 007
/// standard.
V250(v250::Command),
/// Extensions to the above that we support.
Extension(extension::Command),
}
Both V250
and Extension
should have the same scopes applied, since there is no syntactical difference between them ie. they are both variants of an enum. Neither trigger a compiler or clippy warning.
(I'm not particularly tied to V250
as a name, nor do I mind the inconsistent highlighting for this single example. I just noticed it because V250
is the first abbreviation of "V.250" I thought of that was syntactically allowed, and here we are.)
Actual behavior
The text V250
has the following scopes:
source.rust
meta.block.rust
meta.enum.rust
constant.other.rust ๐
Extension
has the following scopes:
source.rust
meta.block.rust
meta.enum.rust
storage.type.source.rust ๐
Many syntax highlighting schemes, including the default Monokai, highlight these differently:
Steps to reproduce
Code above.