From 17f039f472de1b86ec5d179d1d5a5156ed7c6e26 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Wed, 15 Jul 2026 23:24:36 +0200 Subject: [PATCH] feat(wit)!: update parser and queries Breaking change: `(package_decl)` renamed to `(decl_head)` --- lua/nvim-treesitter/parsers.lua | 2 +- runtime/queries/wit/highlights.scm | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index 8c752a8dc..c23cc954c 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -2572,7 +2572,7 @@ return { }, wit = { install_info = { - revision = 'v1.3.0', + revision = 'v1.4.0', url = 'https://github.com/bytecodealliance/tree-sitter-wit', }, maintainers = { '@mkatychev' }, diff --git a/runtime/queries/wit/highlights.scm b/runtime/queries/wit/highlights.scm index d950f9549..fd6ffcd5d 100644 --- a/runtime/queries/wit/highlights.scm +++ b/runtime/queries/wit/highlights.scm @@ -1,7 +1,7 @@ (ty (id)) @type -(package_decl +(decl_head (id) @module) (version) @string.special @@ -12,7 +12,7 @@ "/" ] @punctuation.delimiter) -(package_decl +(decl_head [ "@" "/" @@ -121,6 +121,11 @@ "func" @keyword.function +(external_id + "@" @punctuation.special + "external-id" @attribute.builtin + id: (string_literal) @string) + [ "type" "interface" @@ -168,6 +173,7 @@ "list" "option" "result" + "map" "borrow" "future" "stream"