mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
docs(treesitter): specify predicate boolean return value
This commit is contained in:
parent
25b53b593e
commit
f60a1f9059
@ -1211,7 +1211,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: vim.treesitter.query.TSMetadata)`)
|
||||
• {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
|
||||
• {opts} (`table?`) A table with the following fields:
|
||||
|
@ -626,7 +626,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)
|
||||
---@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)
|
||||
|
Loading…
Reference in New Issue
Block a user