mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-20 12:20:02 -04:00
highlights(typescript): infer, template literal type & punctuations
This commit is contained in:
parent
0ec25f87ee
commit
5d59d18d3e
1 changed files with 13 additions and 0 deletions
|
|
@ -12,6 +12,7 @@
|
||||||
"override"
|
"override"
|
||||||
"satisfies"
|
"satisfies"
|
||||||
"module"
|
"module"
|
||||||
|
"infer"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
(as_expression "as" @keyword)
|
(as_expression "as" @keyword)
|
||||||
|
|
@ -35,6 +36,8 @@
|
||||||
((import_specifier
|
((import_specifier
|
||||||
name: (identifier) @type)))))
|
name: (identifier) @type)))))
|
||||||
|
|
||||||
|
(template_literal_type) @string
|
||||||
|
|
||||||
;; punctuation
|
;; punctuation
|
||||||
|
|
||||||
(type_arguments
|
(type_arguments
|
||||||
|
|
@ -55,11 +58,21 @@
|
||||||
(pair
|
(pair
|
||||||
":" @punctuation.delimiter)
|
":" @punctuation.delimiter)
|
||||||
|
|
||||||
|
(index_signature
|
||||||
|
":" @punctuation.delimiter)
|
||||||
|
|
||||||
|
(opting_type_annotation
|
||||||
|
"?:" @punctuation.delimiter)
|
||||||
|
|
||||||
"?." @punctuation.delimiter
|
"?." @punctuation.delimiter
|
||||||
|
|
||||||
(property_signature "?" @punctuation.special)
|
(property_signature "?" @punctuation.special)
|
||||||
(optional_parameter "?" @punctuation.special)
|
(optional_parameter "?" @punctuation.special)
|
||||||
|
|
||||||
|
(template_type ["${" "}"] @punctuation.special)
|
||||||
|
|
||||||
|
(conditional_type ["?" ":"] @conditional.ternary)
|
||||||
|
|
||||||
; Variables
|
; Variables
|
||||||
|
|
||||||
(undefined) @variable.builtin
|
(undefined) @variable.builtin
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue