From 2098db61dcca4857465c340ee29c81f12c7355e8 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Fri, 3 Apr 2026 14:05:55 +0200 Subject: [PATCH] fix(yuck): improper use of supertypes in queries Problem: `(ast_block)` is a supertype, of which `(symbol)` (among others) is a subtype, which makes the final local pattern invalid. (This was not noticed before because the parser is stuck at ABI 14 due to a missing `tree-sitter.json`.) Solution: Fix the pattern and use supertype where appropriate. --- lua/nvim-treesitter/parsers.lua | 2 +- runtime/queries/yuck/indents.scm | 2 -- runtime/queries/yuck/locals.scm | 7 +------ 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index fc5e42ac..8c9ff4a1 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -2654,7 +2654,7 @@ return { }, yuck = { install_info = { - revision = 'e877f6ade4b77d5ef8787075141053631ba12318', + revision = '6c60112b3b3e739fb1ca4a8ea4bea2b6ffe11318', url = 'https://github.com/tree-sitter-grammars/tree-sitter-yuck', }, maintainers = { '@Philipp-M', '@amaanq' }, diff --git a/runtime/queries/yuck/indents.scm b/runtime/queries/yuck/indents.scm index 51579502..806516be 100644 --- a/runtime/queries/yuck/indents.scm +++ b/runtime/queries/yuck/indents.scm @@ -1,7 +1,5 @@ [ (ast_block) - (array) - (expr) (json_array) (json_object) (parenthesized_expression) diff --git a/runtime/queries/yuck/locals.scm b/runtime/queries/yuck/locals.scm index 9f40b208..6c23fec3 100644 --- a/runtime/queries/yuck/locals.scm +++ b/runtime/queries/yuck/locals.scm @@ -1,8 +1,5 @@ [ (ast_block) - (list) - (array) - (expr) (json_array) (json_object) (parenthesized_expression) @@ -16,6 +13,4 @@ (simplexpr (ident) @local.definition.field)) -(ast_block - (symbol) - (ident) @local.definition.type) +(symbol) @local.definition.type