aboutsummaryrefslogtreecommitdiffstats
path: root/queries
diff options
context:
space:
mode:
authorAnanda Umamil <zweimach@zweimach.org>2023-03-10 23:15:19 +0700
committerAmaan Qureshi <amaanq12@gmail.com>2023-03-11 04:56:44 -0500
commit5d59d18d3e6559e525fd933c41070303c5bae32b (patch)
treeaa4a524782098cf27172e38ee6a52f7989fc79ab /queries
parentrefactor(gitconfig): use lua-match instead of match (diff)
downloadnvim-treesitter-5d59d18d3e6559e525fd933c41070303c5bae32b.tar
nvim-treesitter-5d59d18d3e6559e525fd933c41070303c5bae32b.tar.gz
nvim-treesitter-5d59d18d3e6559e525fd933c41070303c5bae32b.tar.bz2
nvim-treesitter-5d59d18d3e6559e525fd933c41070303c5bae32b.tar.lz
nvim-treesitter-5d59d18d3e6559e525fd933c41070303c5bae32b.tar.xz
nvim-treesitter-5d59d18d3e6559e525fd933c41070303c5bae32b.tar.zst
nvim-treesitter-5d59d18d3e6559e525fd933c41070303c5bae32b.zip
highlights(typescript): `infer`, template literal type & punctuations
Diffstat (limited to 'queries')
-rw-r--r--queries/typescript/highlights.scm13
1 files changed, 13 insertions, 0 deletions
diff --git a/queries/typescript/highlights.scm b/queries/typescript/highlights.scm
index 036b6e8da..057156d55 100644
--- a/queries/typescript/highlights.scm
+++ b/queries/typescript/highlights.scm
@@ -12,6 +12,7 @@
"override"
"satisfies"
"module"
+ "infer"
] @keyword
(as_expression "as" @keyword)
@@ -35,6 +36,8 @@
((import_specifier
name: (identifier) @type)))))
+(template_literal_type) @string
+
;; punctuation
(type_arguments
@@ -55,11 +58,21 @@
(pair
":" @punctuation.delimiter)
+(index_signature
+ ":" @punctuation.delimiter)
+
+(opting_type_annotation
+ "?:" @punctuation.delimiter)
+
"?." @punctuation.delimiter
(property_signature "?" @punctuation.special)
(optional_parameter "?" @punctuation.special)
+(template_type ["${" "}"] @punctuation.special)
+
+(conditional_type ["?" ":"] @conditional.ternary)
+
; Variables
(undefined) @variable.builtin