Skip to content

Commit

Permalink
[language-typescript] Add syntax highlighting for enums
Browse files Browse the repository at this point in the history
  • Loading branch information
savetheclocktower committed Feb 10, 2024
1 parent 89686ce commit 82eac22
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions packages/language-typescript/grammars/common/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,21 @@
name: (_) @entity.name.type.interface._LANG_
(#set! capture.final))

; ENUMS
; =====

; The "Foo" in `enum Foo {`
(enum_declaration
name: (_) @entity.name.type.enum._LANG_
(#set! capture.final))

; The "foo" and "bar" in `enum Baz { foo, bar }`
(enum_body
name: (property_identifier) @variable.declaration.enum._LANG_)

; The "foo" in `enum Bar { foo = 1 }`
(enum_assignment
name: (property_identifier) @variable.declaration.enum._LANG_)

; TYPES
; =====
Expand Down

0 comments on commit 82eac22

Please sign in to comment.