aboutsummaryrefslogtreecommitdiffstats
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
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)
-rw-r--r--SUPPORTED_LANGUAGES.md3
-rw-r--r--lua/nvim-treesitter/parsers.lua4
-rw-r--r--runtime/queries/wit/highlights.scm58
3 files changed, 52 insertions, 13 deletions
diff --git a/SUPPORTED_LANGUAGES.md b/SUPPORTED_LANGUAGES.md
index 4ac36d9c1..11c718d69 100644
--- a/SUPPORTED_LANGUAGES.md
+++ b/SUPPORTED_LANGUAGES.md
@@ -5,6 +5,7 @@ The following is a list of languages for which a parser can be installed through
Legend:
- **Tier:** _stable_ (updates follow semver releases), _unstable_ (updates follow HEAD), _unmaintained_ (no automatic updates), or _unsupported_ (known to be broken, cannot be installed)
- **Queries** available for **H**ighlights, **I**ndents, **F**olds, In**J**ections, **L**ocals
+- **Node:** Parser requires `node` for installation
- **Maintainer** of queries in nvim-treesitter (may be different from parser maintainer!)
<!--This section of the README is automatically updated by a CI job-->
@@ -327,7 +328,7 @@ jsx (queries only)[^jsx] | unstable | `HFIJ ` | @steelsojka
[wgsl](https://github.com/szebniok/tree-sitter-wgsl) | unstable | `HFIJ ` | @szebniok
[wgsl_bevy](https://github.com/tree-sitter-grammars/tree-sitter-wgsl-bevy) | unstable | `HFI  ` | @theHamsta
[wing](https://github.com/winglang/tree-sitter-wing) | unstable | `HF JL` | @gshpychka, @MarkMcCulloh
-[wit](https://github.com/bytecodealliance/tree-sitter-wit) | unstable | `HF J ` | @mkatychev
+[wit](https://github.com/bytecodealliance/tree-sitter-wit) | stable | `HF J ` | @mkatychev
[wxml](https://github.com/BlockLune/tree-sitter-wxml) | unstable | `HFIJ ` | @BlockLune
[xcompose](https://github.com/tree-sitter-grammars/tree-sitter-xcompose) | unstable | `H  JL` | @ObserverOfTime
[xml](https://github.com/tree-sitter-grammars/tree-sitter-xml) | unstable | `HFIJL` | @ObserverOfTime
diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua
index 73f320c4a..a07a8b2fe 100644
--- a/lua/nvim-treesitter/parsers.lua
+++ b/lua/nvim-treesitter/parsers.lua
@@ -2603,11 +2603,11 @@ return {
},
wit = {
install_info = {
- revision = '230984dfaf803a0ff8f77da5034361a62c326577',
+ revision = 'v1.2.0',
url = 'https://github.com/bytecodealliance/tree-sitter-wit',
},
maintainers = { '@mkatychev' },
- tier = 2,
+ tier = 1,
},
wxml = {
install_info = {
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)