From 3b6084ddf4f0d49fb0e5d135919c9daacea2a46d Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Thu, 5 Jun 2025 11:31:51 +0100 Subject: fix: type fixes Type fixes caught by emmylua --- runtime/lua/vim/treesitter/query.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'runtime/lua/vim/treesitter/query.lua') diff --git a/runtime/lua/vim/treesitter/query.lua b/runtime/lua/vim/treesitter/query.lua index 8d0a185de6..b50d59e674 100644 --- a/runtime/lua/vim/treesitter/query.lua +++ b/runtime/lua/vim/treesitter/query.lua @@ -193,7 +193,7 @@ function M.get_files(lang, query_name, is_included) local langlist = modeline:match(MODELINE_FORMAT) if langlist then ---@diagnostic disable-next-line:param-type-mismatch - for _, incllang in ipairs(vim.split(langlist, ',', true)) do + for _, incllang in ipairs(vim.split(langlist, ',')) do local is_optional = incllang:match('%(.*%)') if is_optional then @@ -778,7 +778,7 @@ local directive_handlers = { --- Adds a new predicate to be used in queries --- ---@param name string Name of the predicate, without leading # ----@param handler fun(match: table, pattern: integer, source: integer|string, predicate: any[], metadata: vim.treesitter.query.TSMetadata): boolean? +---@param handler fun(match: table, pattern: integer, source: integer|string, predicate: any[], metadata: vim.treesitter.query.TSMetadata): boolean? # --- - see |vim.treesitter.query.add_directive()| for argument meanings ---@param opts? vim.treesitter.query.add_predicate.Opts function M.add_predicate(name, handler, opts) @@ -818,7 +818,7 @@ end --- metadata table `metadata[capture_id].key = value` --- ---@param name string Name of the directive, without leading # ----@param handler fun(match: table, pattern: integer, source: integer|string, predicate: any[], metadata: vim.treesitter.query.TSMetadata) +---@param handler fun(match: table, pattern: integer, source: integer|string, predicate: any[], metadata: vim.treesitter.query.TSMetadata) # --- - match: A table mapping capture IDs to a list of captured nodes --- - pattern: the index of the matching pattern in the query file --- - predicate: list of strings containing the full directive being called, e.g. -- cgit