Unnamed repository; edit this file 'description' to name the repository.
Highlight `Foo::Bar =>` in match arms as variants. (#15596)
Kirawi 4 weeks ago
parent d4f422c · commit 86d8f98
-rw-r--r--runtime/queries/rust/highlights.scm5
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/queries/rust/highlights.scm b/runtime/queries/rust/highlights.scm
index 147c80ba..721f651c 100644
--- a/runtime/queries/rust/highlights.scm
+++ b/runtime/queries/rust/highlights.scm
@@ -431,6 +431,11 @@
((identifier) @constructor)
(#match? @constructor "^[A-Z]"))
+(match_pattern
+ (scoped_identifier
+ name: ((identifier) @type.enum.variant
+ (#match? @type.enum.variant "^[A-Z]"))))
+
; ---
; Macros
; ---