aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2025-07-19 15:15:04 +0200
committerChristian Clason <ch.clason+github@icloud.com>2025-07-19 15:19:50 +0200
commit1e3b7562c2497ec5a9adfa8a2f036cb3da46ec3a (patch)
tree566f89e0f3b7bb488cb732511bf10fd6be483019
parentfix(wit): update repo url (diff)
downloadnvim-treesitter-1e3b7562c2497ec5a9adfa8a2f036cb3da46ec3a.tar
nvim-treesitter-1e3b7562c2497ec5a9adfa8a2f036cb3da46ec3a.tar.gz
nvim-treesitter-1e3b7562c2497ec5a9adfa8a2f036cb3da46ec3a.tar.bz2
nvim-treesitter-1e3b7562c2497ec5a9adfa8a2f036cb3da46ec3a.tar.lz
nvim-treesitter-1e3b7562c2497ec5a9adfa8a2f036cb3da46ec3a.tar.xz
nvim-treesitter-1e3b7562c2497ec5a9adfa8a2f036cb3da46ec3a.tar.zst
nvim-treesitter-1e3b7562c2497ec5a9adfa8a2f036cb3da46ec3a.zip
feat(wit)!: update parser and queries
-rw-r--r--SUPPORTED_LANGUAGES.md2
-rw-r--r--lua/nvim-treesitter/parsers.lua4
-rw-r--r--runtime/queries/wit/folds.scm9
-rw-r--r--runtime/queries/wit/highlights.scm23
-rw-r--r--runtime/queries/wit/injections.scm5
5 files changed, 23 insertions, 20 deletions
diff --git a/SUPPORTED_LANGUAGES.md b/SUPPORTED_LANGUAGES.md
index 8c6cd3ace..cd6846f25 100644
--- a/SUPPORTED_LANGUAGES.md
+++ b/SUPPORTED_LANGUAGES.md
@@ -324,7 +324,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 ` | | @liamwh
+[wit](https://github.com/bytecodealliance/tree-sitter-wit) | unstable | `HF J ` | | @mkatychev
[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
[xresources](https://github.com/ValdezFOmar/tree-sitter-xresources) | unstable | `HF JL` | | @ValdezFOmar
diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua
index b1d21fbd5..aa9009430 100644
--- a/lua/nvim-treesitter/parsers.lua
+++ b/lua/nvim-treesitter/parsers.lua
@@ -2573,10 +2573,10 @@ return {
},
wit = {
install_info = {
- revision = '37bf43c7f11d2b4af7a78d98a19e6d5c2cf04ad2',
+ revision = 'a0fd28afe24511160f0601ab45044690c1cb7d92',
url = 'https://github.com/bytecodealliance/tree-sitter-wit',
},
- maintainers = { '@liamwh' },
+ maintainers = { '@mkatychev' },
tier = 2,
},
xcompose = {
diff --git a/runtime/queries/wit/folds.scm b/runtime/queries/wit/folds.scm
index 7f84ddd2e..d2a12f122 100644
--- a/runtime/queries/wit/folds.scm
+++ b/runtime/queries/wit/folds.scm
@@ -1,11 +1,6 @@
-[
- (world_items)
- (world_body)
- (interface_items)
- (interface_body)
-] @fold
+(body) @fold
-(world_items
+(body
[
(use_item)
(import_item)
diff --git a/runtime/queries/wit/highlights.scm b/runtime/queries/wit/highlights.scm
index 1f4b01cce..6bccf5ba0 100644
--- a/runtime/queries/wit/highlights.scm
+++ b/runtime/queries/wit/highlights.scm
@@ -1,12 +1,10 @@
-(comment) @comment @spell
-
(ty
(id)) @type
(package_decl
(id) @module)
-(valid_semver) @string.special
+(version) @string.special
(world_item
name: (id) @module)
@@ -17,7 +15,7 @@
(import_item
name: (id) @module
(extern_type
- (interface_body)))
+ (body)))
(import_item
name: (id) @function
@@ -27,7 +25,7 @@
(export_item
name: (id) @module
(extern_type
- (interface_body)))
+ (body)))
(export_item
name: (id) @function
@@ -55,7 +53,7 @@
(flags_items
name: (id) @type)
-(flags_body
+(body
(id) @variable.member)
(variant_items
@@ -128,8 +126,6 @@
"s64"
"f32"
"f64"
- "float32" ; deprecated
- "float64" ; deprecated
"char"
"bool"
"string"
@@ -163,4 +159,13 @@
"<"
] @punctuation.bracket
-"=" @operator
+[
+ (line_comment)
+ (block_comment)
+] @comment @spell
+
+(line_comment
+ (doc_comment)) @comment.documentation
+
+(block_comment
+ (doc_comment)) @comment.documentation
diff --git a/runtime/queries/wit/injections.scm b/runtime/queries/wit/injections.scm
index 2f0e58eb6..3cd6aac8e 100644
--- a/runtime/queries/wit/injections.scm
+++ b/runtime/queries/wit/injections.scm
@@ -1,2 +1,5 @@
-((comment) @injection.content
+([
+ (line_comment)
+ (block_comment)
+] @injection.content
(#set! injection.language "comment"))