Skip to content

Commit

Permalink
fixed enum constant highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewnitschke committed Apr 6, 2024
1 parent 7861a48 commit 2dc3bd1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
11 changes: 7 additions & 4 deletions queries/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -106,6 +102,13 @@

(type_identifier) @type

; Enums
; -------------------
(enum_declaration
name: (identifier) @type)
(enum_constant
name: (identifier) @identifier.constant)

; Variables
; --------------------
; var keyword
Expand Down
1 change: 1 addition & 0 deletions test/highlight/types.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
enum Material {
// ^ type
DENIM,
// <- identifier.constant
CANVAS
}

Expand Down

0 comments on commit 2dc3bd1

Please sign in to comment.