mirror of
https://github.com/neovim/neovim.git
synced 2026-04-22 23:35:32 +00:00
docs: fix vim.treesitter tags
Problem: Help tags like vim.treesitter.language.add() are confusing because `vim.treesitter.language` is (thankfully) not a user-facing module. Solution: Ignore the "fstem" when generating "treesitter" tags.
This commit is contained in:
@@ -273,8 +273,7 @@ end
|
||||
---@param opts (table|nil) Optional parameters.
|
||||
--- - concat: (boolean) Concatenate result in a string (default true)
|
||||
--- - metadata (table) Metadata of a specific capture. This would be
|
||||
--- set to `metadata[capture_id]` when using
|
||||
--- |vim.treesitter.query.add_directive()|.
|
||||
--- set to `metadata[capture_id]` when using |vim.treesitter.add_directive()|.
|
||||
---@return (string[]|string|nil)
|
||||
function M.get_node_text(node, source, opts)
|
||||
opts = opts or {}
|
||||
@@ -486,7 +485,7 @@ local directive_handlers = {
|
||||
---
|
||||
---@param name string Name of the predicate, without leading #
|
||||
---@param handler function(match:table<string,TSNode>, pattern:string, bufnr:number, predicate:string[])
|
||||
--- - see |vim.treesitter.query.add_directive()| for argument meanings
|
||||
--- - see |vim.treesitter.add_directive()| for argument meanings
|
||||
---@param force boolean|nil
|
||||
function M.add_predicate(name, handler, force)
|
||||
if predicate_handlers[name] and not force then
|
||||
|
||||
Reference in New Issue
Block a user