aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/queries/wit
diff options
context:
space:
mode:
authorMikhail Katychev <mkatych@gmail.com>2025-11-17 04:06:00 -0600
committerGitHub <noreply@github.com>2025-11-17 10:06:00 +0000
commit69c76488f7c6929ce55222f6a887e497a24c74b8 (patch)
tree33541339019b18095773b56d1fd00a7bbac6d92f /runtime/queries/wit
parent chore: remove format-queries script (diff)
downloadnvim-treesitter-69c76488f7c6929ce55222f6a887e497a24c74b8.tar
nvim-treesitter-69c76488f7c6929ce55222f6a887e497a24c74b8.tar.gz
nvim-treesitter-69c76488f7c6929ce55222f6a887e497a24c74b8.tar.bz2
nvim-treesitter-69c76488f7c6929ce55222f6a887e497a24c74b8.tar.lz
nvim-treesitter-69c76488f7c6929ce55222f6a887e497a24c74b8.tar.xz
nvim-treesitter-69c76488f7c6929ce55222f6a887e497a24c74b8.tar.zst
nvim-treesitter-69c76488f7c6929ce55222f6a887e497a24c74b8.zip
feat(wit)! update parser and queries to 1.2.0 (#8199)
Diffstat (limited to 'runtime/queries/wit')
-rw-r--r--runtime/queries/wit/highlights.scm58
1 files changed, 48 insertions, 10 deletions
diff --git a/runtime/queries/wit/highlights.scm b/runtime/queries/wit/highlights.scm
index 6bccf5ba0..d950f9549 100644
--- a/runtime/queries/wit/highlights.scm
+++ b/runtime/queries/wit/highlights.scm
@@ -6,6 +6,32 @@
(version) @string.special
+(use_path
+ [
+ "@"
+ "/"
+ ] @punctuation.delimiter)
+
+(package_decl
+ [
+ "@"
+ "/"
+ ] @punctuation.delimiter)
+
+; feature gates with leading `@`
+(_
+ .
+ "@" @punctuation.special
+ .
+ [
+ "since"
+ "unstable"
+ "deprecated"
+ ] @attribute.builtin)
+
+(unstable_gate
+ feature: (id) @string)
+
(world_item
name: (id) @module)
@@ -53,8 +79,7 @@
(flags_items
name: (id) @type)
-(body
- (id) @variable.member)
+(flags_field) @variable.member
(variant_items
name: (id) @type)
@@ -65,8 +90,7 @@
(enum_items
name: (id) @type)
-(enum_case
- name: (id) @constant)
+(enum_case) @constant
(resource_item
name: (id) @type)
@@ -89,6 +113,9 @@
(use_path
(id) @module)
+(alias_item
+ (id) @module)
+
(use_names_item
(id) @module)
@@ -108,11 +135,16 @@
"static" @keyword.modifier
+"async" @keyword.coroutine
+
+(uint) @constant
+
[
"include"
"import"
"export"
"as"
+ "with"
] @keyword.import
[
@@ -129,20 +161,21 @@
"char"
"bool"
"string"
+] @type.builtin
+
+[
"tuple"
"list"
"option"
"result"
"borrow"
-] @type.builtin
+ "future"
+ "stream"
+] @type
-[
- "@"
- "_"
-] @punctuation.special
+"_" @variable.parameter.builtin
[
- "/"
";"
":"
","
@@ -150,6 +183,9 @@
"->"
] @punctuation.delimiter
+(use_path
+ "/" @punctuation.delimiter)
+
[
"{"
"}"
@@ -159,6 +195,8 @@
"<"
] @punctuation.bracket
+"=" @operator
+
[
(line_comment)
(block_comment)