mirror of
https://github.com/zed-industries/zed.git
synced 2026-07-09 16:00:35 +00:00
rust: Highlight enum variants as types (#45546)
Closes [#ISSUE](https://github.com/zed-industries/zed/issues/14489) Release Notes: - Fix Rust enum variants with no lower-case highlighted as constants Screenshot: <img width="401" height="280" alt="image" src="https://github.com/user-attachments/assets/cd67a576-3c41-452d-9c6b-b3c259cee556" />
This commit is contained in:
parent
f1e87022a7
commit
73515d9ebd
1 changed files with 3 additions and 0 deletions
|
|
@ -57,6 +57,9 @@
|
|||
((identifier) @constant
|
||||
(#match? @constant "^_*[A-Z][A-Z\\d_]*$"))
|
||||
|
||||
; Ensure enum variants are highlighted correctly regardless of naming convention
|
||||
(enum_variant name: (identifier) @type)
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue