Skip to content

Commit adf31d8

Browse files
authored
Merge pull request #66 from matthewnitschke/fixed_enum_constant_highlights
Fixed enum constant highlighting
2 parents 7861a48 + 2dc3bd1 commit adf31d8

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

queries/highlights.scm

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,6 @@
9292
(identifier) @method)
9393
(setter_signature
9494
name: (identifier) @method)
95-
(enum_declaration
96-
name: (identifier) @type)
97-
(enum_constant
98-
name: (identifier) @type)
9995
(type_identifier) @type
10096
(void_type) @type
10197

@@ -106,6 +102,13 @@
106102

107103
(type_identifier) @type
108104

105+
; Enums
106+
; -------------------
107+
(enum_declaration
108+
name: (identifier) @type)
109+
(enum_constant
110+
name: (identifier) @identifier.constant)
111+
109112
; Variables
110113
; --------------------
111114
; var keyword

test/highlight/types.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
enum Material {
22
// ^ type
33
DENIM,
4+
// <- identifier.constant
45
CANVAS
56
}
67

0 commit comments

Comments
 (0)