From b04ef7f6b966c44b12dbc65b17a761ae9313d6c4 Mon Sep 17 00:00:00 2001 From: bfredl Date: Thu, 25 Aug 2022 21:41:52 +0200 Subject: fix(treesitter): make it get_captures_at_position --- runtime/doc/treesitter.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'runtime/doc') diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt index 99780b0f29..2c6c9e4ed8 100644 --- a/runtime/doc/treesitter.txt +++ b/runtime/doc/treesitter.txt @@ -370,6 +370,18 @@ attribute: > ============================================================================== Lua module: vim.treesitter *lua-treesitter-core* + *get_captures_at_position()* +get_captures_at_position({bufnr}, {row}, {col}) + Gets a list of captures for a given cursor position + + Parameters: ~ + {bufnr} (number) The buffer number + {row} (number) The position row + {col} (number) The position column + + Return: ~ + (table) A table of captures + get_node_range({node_or_range}) *get_node_range()* Get the node's range or unpack a range table @@ -411,6 +423,14 @@ is_ancestor({dest}, {source}) *is_ancestor()* Return: ~ (boolean) True if dest is an ancestor of source +is_in_node_range({node}, {line}, {col}) *is_in_node_range()* + Determines whether (line, col) position is in node range + + Parameters: ~ + {node} Node defining the range + {line} A line (0-based) + {col} A column (0-based) + node_contains({node}, {range}) *node_contains()* Determines if a node contains a range -- cgit