aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/treesitter/query.lua
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2025-06-05 11:31:51 +0100
committerLewis Russell <me@lewisr.dev>2025-06-06 15:36:48 +0100
commit3b6084ddf4f0d49fb0e5d135919c9daacea2a46d (patch)
treec46454da48ec05e345c953f4e172e52dff8bef52 /runtime/lua/vim/treesitter/query.lua
parent4c333fdbb7bee299f36624b429f5c065470e421d (diff)
downloadrneovim-3b6084ddf4f0d49fb0e5d135919c9daacea2a46d.tar.gz
rneovim-3b6084ddf4f0d49fb0e5d135919c9daacea2a46d.tar.bz2
rneovim-3b6084ddf4f0d49fb0e5d135919c9daacea2a46d.zip
fix: type fixes
Type fixes caught by emmylua
Diffstat (limited to 'runtime/lua/vim/treesitter/query.lua')
-rw-r--r--runtime/lua/vim/treesitter/query.lua6
1 files changed, 3 insertions, 3 deletions
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<integer,TSNode[]>, pattern: integer, source: integer|string, predicate: any[], metadata: vim.treesitter.query.TSMetadata): boolean?
+---@param handler fun(match: table<integer,TSNode[]>, 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<integer,TSNode[]>, pattern: integer, source: integer|string, predicate: any[], metadata: vim.treesitter.query.TSMetadata)
+---@param handler fun(match: table<integer,TSNode[]>, 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.