Skip to content

Commit

Permalink
Merge pull request #66 from matthewnitschke/fixed_enum_constant_highl…
Browse files Browse the repository at this point in the history
…ights

Fixed enum constant highlighting
  • Loading branch information
TimWhiting authored Apr 7, 2024
2 parents 7861a48 + 2dc3bd1 commit adf31d8
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 adf31d8

Please sign in to comment.