aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorYi Ming <ofseed@foxmail.com>2024-09-01 12:07:07 +0800
committerLewis Russell <me@lewisr.dev>2024-09-01 10:45:24 +0100
commit9b983e5f6cbfeaaf491ad57912518042be650b6d (patch)
treec313eba8790876e96d8a44a02397c6a604b459ba /runtime/doc
parent195eca94d4dc98ee4b8aff4ad70b6e9e1042d88e (diff)
downloadrneovim-9b983e5f6cbfeaaf491ad57912518042be650b6d.tar.gz
rneovim-9b983e5f6cbfeaaf491ad57912518042be650b6d.tar.bz2
rneovim-9b983e5f6cbfeaaf491ad57912518042be650b6d.zip
docs(treesitter): annotate some tables as `TSMetadata`
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/treesitter.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt
index 041adbf828..d9b71c4b5b 100644
--- a/runtime/doc/treesitter.txt
+++ b/runtime/doc/treesitter.txt
@@ -1023,7 +1023,7 @@ add_directive({name}, {handler}, {opts})
Parameters: ~
• {name} (`string`) Name of the directive, without leading #
- • {handler} (`fun(match: table<integer,TSNode[]>, pattern: integer, source: integer|string, predicate: any[], metadata: table)`)
+ • {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
@@ -1046,7 +1046,7 @@ add_predicate({name}, {handler}, {opts})
Parameters: ~
• {name} (`string`) Name of the predicate, without leading #
- • {handler} (`fun(match: table<integer,TSNode[]>, pattern: integer, source: integer|string, predicate: any[], metadata: table)`)
+ • {handler} (`fun(match: table<integer,TSNode[]>, pattern: integer, source: integer|string, predicate: any[], metadata: vim.treesitter.query.TSMetadata)`)
• see |vim.treesitter.query.add_directive()| for argument
meanings
• {opts} (`table`) A table with the following fields:
@@ -1256,8 +1256,8 @@ Query:iter_matches({node}, {source}, {start}, {stop}, {opts})
eventually become the default and removed.
Return: ~
- (`fun(): integer, table<integer, TSNode[]>, table`) pattern id, match,
- metadata
+ (`fun(): integer, table<integer, TSNode[]>, vim.treesitter.query.TSMetadata`)
+ pattern id, match, metadata
set({lang}, {query_name}, {text}) *vim.treesitter.query.set()*
Sets the runtime query named {query_name} for {lang}