From cfb4d3d2f2e9f17e2e7c642c82d23b3398c39ef8 Mon Sep 17 00:00:00 2001 From: Luis Calle <53507599+TheLeoP@users.noreply.github.com> Date: Sun, 22 Jun 2025 05:38:00 -0500 Subject: [PATCH] docs(treesitter): fix parameter list for `Query:iter_matches` (#34553) --- runtime/doc/treesitter.txt | 11 ++++++----- runtime/lua/vim/treesitter/query.lua | 6 +++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt index 3e92a42ad1..01d0b7e192 100644 --- a/runtime/doc/treesitter.txt +++ b/runtime/doc/treesitter.txt @@ -1524,11 +1524,12 @@ Query:iter_matches({node}, {source}, {start}, {stop}, {opts}) start depth for each match. This is used to prevent traversing too deep into a tree. • match_limit (integer) Set the maximum number of - in-progress matches (Default: 256). all (boolean) When - `false` (default `true`), the returned table maps capture - IDs to a single (last) node instead of the full list of - matching nodes. This option is only for backward - compatibility and will be removed in a future release. + in-progress matches (Default: 256). + • all (boolean) When `false` (default `true`), the returned + table maps capture IDs to a single (last) node instead of + the full list of matching nodes. This option is only for + backward compatibility and will be removed in a future + release. Return: ~ (`fun(): integer, table, vim.treesitter.query.TSMetadata, TSTree`) diff --git a/runtime/lua/vim/treesitter/query.lua b/runtime/lua/vim/treesitter/query.lua index a0daedec73..1e77a0021a 100644 --- a/runtime/lua/vim/treesitter/query.lua +++ b/runtime/lua/vim/treesitter/query.lua @@ -1056,9 +1056,9 @@ end --- - max_start_depth (integer) if non-zero, sets the maximum start depth --- for each match. This is used to prevent traversing too deep into a tree. --- - match_limit (integer) Set the maximum number of in-progress matches (Default: 256). ---- - all (boolean) When `false` (default `true`), the returned table maps capture IDs to a single ---- (last) node instead of the full list of matching nodes. This option is only for backward ---- compatibility and will be removed in a future release. +--- - all (boolean) When `false` (default `true`), the returned table maps capture IDs to a single +--- (last) node instead of the full list of matching nodes. This option is only for backward +--- compatibility and will be removed in a future release. --- ---@return (fun(): integer, table, vim.treesitter.query.TSMetadata, TSTree): pattern id, match, metadata, tree function Query:iter_matches(node, source, start, stop, opts)