[language-typescript] Add syntax highlighting for enums

This commit is contained in:
Andrew Dupont 2024-02-09 22:33:48 -08:00
parent 89686ce03a
commit 82eac2276d

View File

@ -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
; =====