mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-16 02:10:15 -04:00
feat(typescript): update highlights
This commit is contained in:
parent
71bb1da621
commit
99606fdb71
1 changed files with 18 additions and 0 deletions
|
|
@ -1,5 +1,9 @@
|
||||||
; inherits: ecma
|
; inherits: ecma
|
||||||
|
|
||||||
|
"require" @include
|
||||||
|
|
||||||
|
(import_require_clause source: (string) @text.uri)
|
||||||
|
|
||||||
[
|
[
|
||||||
"declare"
|
"declare"
|
||||||
"enum"
|
"enum"
|
||||||
|
|
@ -10,6 +14,7 @@
|
||||||
"namespace"
|
"namespace"
|
||||||
"override"
|
"override"
|
||||||
"module"
|
"module"
|
||||||
|
"asserts"
|
||||||
"infer"
|
"infer"
|
||||||
"is"
|
"is"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
@ -20,6 +25,8 @@
|
||||||
] @keyword.operator
|
] @keyword.operator
|
||||||
|
|
||||||
(as_expression "as" @keyword.operator)
|
(as_expression "as" @keyword.operator)
|
||||||
|
(export_statement "as" @keyword.operator)
|
||||||
|
(mapped_type_clause "as" @keyword.operator)
|
||||||
|
|
||||||
[
|
[
|
||||||
"abstract"
|
"abstract"
|
||||||
|
|
@ -52,6 +59,9 @@
|
||||||
(type_parameters
|
(type_parameters
|
||||||
["<" ">"] @punctuation.bracket)
|
["<" ">"] @punctuation.bracket)
|
||||||
|
|
||||||
|
(object_type
|
||||||
|
["{|" "|}"] @punctuation.bracket)
|
||||||
|
|
||||||
(union_type
|
(union_type
|
||||||
"|" @punctuation.delimiter)
|
"|" @punctuation.delimiter)
|
||||||
|
|
||||||
|
|
@ -67,14 +77,22 @@
|
||||||
(index_signature
|
(index_signature
|
||||||
":" @punctuation.delimiter)
|
":" @punctuation.delimiter)
|
||||||
|
|
||||||
|
(omitting_type_annotation
|
||||||
|
"-?:" @punctuation.delimiter)
|
||||||
|
|
||||||
(opting_type_annotation
|
(opting_type_annotation
|
||||||
"?:" @punctuation.delimiter)
|
"?:" @punctuation.delimiter)
|
||||||
|
|
||||||
"?." @punctuation.delimiter
|
"?." @punctuation.delimiter
|
||||||
|
|
||||||
|
(abstract_method_signature "?" @punctuation.special)
|
||||||
(method_signature "?" @punctuation.special)
|
(method_signature "?" @punctuation.special)
|
||||||
|
(method_definition "?" @punctuation.special)
|
||||||
(property_signature "?" @punctuation.special)
|
(property_signature "?" @punctuation.special)
|
||||||
(optional_parameter "?" @punctuation.special)
|
(optional_parameter "?" @punctuation.special)
|
||||||
|
(optional_type "?" @punctuation.special)
|
||||||
|
(public_field_definition [ "?" "!" ] @punctuation.special)
|
||||||
|
(flow_maybe_type "?" @punctuation.special)
|
||||||
|
|
||||||
(template_type ["${" "}"] @punctuation.special)
|
(template_type ["${" "}"] @punctuation.special)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue