feat(typescript): highlight decorators, default case, global declaration

This commit is contained in:
Ananda Umamil 2023-07-18 01:19:28 +07:00 committed by GitHub
parent f6c52eb839
commit 44211e7f6e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View file

@ -158,6 +158,11 @@
(namespace_import
(identifier) @namespace)
; Decorators
;----------
(decorator "@" @attribute (identifier) @attribute)
(decorator "@" @attribute (call_expression (identifier) @attribute))
; Literals
;---------
@ -210,6 +215,7 @@
(pair ":" @punctuation.delimiter)
(pair_pattern ":" @punctuation.delimiter)
(switch_case ":" @punctuation.delimiter)
(switch_default ":" @punctuation.delimiter)
[
"--"

View file

@ -136,6 +136,9 @@
(arrow_function
parameter: (identifier) @parameter)
;; global declaration
(ambient_declaration "global" @namespace)
;; function signatures
(ambient_declaration
(function_signature