mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat(typescript): highlight decorators, default case, global declaration
This commit is contained in:
parent
f6c52eb839
commit
44211e7f6e
2 changed files with 9 additions and 0 deletions
|
|
@ -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)
|
||||
|
||||
[
|
||||
"--"
|
||||
|
|
|
|||
|
|
@ -136,6 +136,9 @@
|
|||
(arrow_function
|
||||
parameter: (identifier) @parameter)
|
||||
|
||||
;; global declaration
|
||||
(ambient_declaration "global" @namespace)
|
||||
|
||||
;; function signatures
|
||||
(ambient_declaration
|
||||
(function_signature
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue