From 2dc3bd146ba3e55d5291adf41abfac89ff4874ca Mon Sep 17 00:00:00 2001 From: Matthew Nitschke Date: Sat, 6 Apr 2024 13:39:34 -0600 Subject: [PATCH] fixed enum constant highlighting --- queries/highlights.scm | 11 +++++++---- test/highlight/types.dart | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/queries/highlights.scm b/queries/highlights.scm index d51e323..802bcc4 100644 --- a/queries/highlights.scm +++ b/queries/highlights.scm @@ -92,10 +92,6 @@ (identifier) @method) (setter_signature name: (identifier) @method) -(enum_declaration - name: (identifier) @type) -(enum_constant - name: (identifier) @type) (type_identifier) @type (void_type) @type @@ -106,6 +102,13 @@ (type_identifier) @type +; Enums +; ------------------- +(enum_declaration + name: (identifier) @type) +(enum_constant + name: (identifier) @identifier.constant) + ; Variables ; -------------------- ; var keyword diff --git a/test/highlight/types.dart b/test/highlight/types.dart index da30f4d..d61cc6c 100644 --- a/test/highlight/types.dart +++ b/test/highlight/types.dart @@ -1,6 +1,7 @@ enum Material { // ^ type DENIM, + // <- identifier.constant CANVAS }