Skip to content

Commit

Permalink
fixup!
Browse files Browse the repository at this point in the history
  • Loading branch information
lewis6991 committed Mar 23, 2023
1 parent 7ac78bc commit 66afbdd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions runtime/doc/treesitter.txt
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ get_node_text({node}, {source}, {opts})
{opts} (table|nil) Optional parameters.
• metadata (table) Metadata of a specific capture. This
would be set to `metadata[capture_id]` when using
|vim.treesitter.add_directive()|.
|vim.treesitter.query.add_directive()|.

Return: ~
(string)
Expand Down Expand Up @@ -805,7 +805,7 @@ add_predicate({name}, {handler}, {force})
{name} (string) Name of the predicate, without leading #
{handler} function(match:table<string,|TSNode|>, pattern:string,
bufnr:integer, predicate:string[])
• see |vim.treesitter.add_directive()| for argument
• see |vim.treesitter.query.add_directive()| for argument
meanings
{force} (boolean|nil)

Expand Down
2 changes: 1 addition & 1 deletion runtime/lua/vim/treesitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ end
---@param source (integer|string) Buffer or string from which the {node} is extracted
---@param opts (table|nil) Optional parameters.
--- - metadata (table) Metadata of a specific capture. This would be
--- set to `metadata[capture_id]` when using |vim.treesitter.add_directive()|.
--- set to `metadata[capture_id]` when using |vim.treesitter.query.add_directive()|.
---@return string
function M.get_node_text(node, source, opts)
opts = opts or {}
Expand Down
4 changes: 2 additions & 2 deletions runtime/lua/vim/treesitter/query.lua
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ local function read_query_files(filenames)
return table.concat(contents, '')
end

-- The explicitly set queries from |vim.treesitter.query.set_query()|
-- The explicitly set queries from |vim.treesitter.query.set()|
---@type table<string,table<string,Query>>
local explicit_queries = setmetatable({}, {
__index = function(t, k)
Expand Down Expand Up @@ -477,7 +477,7 @@ local directive_handlers = {
---
---@param name string Name of the predicate, without leading #
---@param handler function(match:table<string,TSNode>, pattern:string, bufnr:integer, predicate:string[])
--- - see |vim.treesitter.add_directive()| for argument meanings
--- - see |vim.treesitter.query.add_directive()| for argument meanings
---@param force boolean|nil
function M.add_predicate(name, handler, force)
if predicate_handlers[name] and not force then
Expand Down

0 comments on commit 66afbdd

Please sign in to comment.