diff options
author | Christian Clason <c.clason@uni-graz.at> | 2023-02-23 13:02:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-23 13:02:15 +0100 |
commit | 0cd0fdf4788b892a85c196b26a4099ae2e86beff (patch) | |
tree | 00de2dd45d9a5bb3ba743a22974aa9fded165a08 /runtime/lua/vim | |
parent | 524e1a06432ed7a88c1e183d81812dd48dc18cfb (diff) | |
parent | 6dfbeb0d990d24657754463c6ab155c19e7f5f56 (diff) | |
download | rneovim-0cd0fdf4788b892a85c196b26a4099ae2e86beff.tar.gz rneovim-0cd0fdf4788b892a85c196b26a4099ae2e86beff.tar.bz2 rneovim-0cd0fdf4788b892a85c196b26a4099ae2e86beff.zip |
Merge pull request #22357 from clason/docs-ts
* Work around tree-sitter-vimdoc parsing errors introduced in a recent PR.
* Drop the tolerance of the test to 0 to make sure this doesn't happen again.
Diffstat (limited to 'runtime/lua/vim')
-rw-r--r-- | runtime/lua/vim/treesitter.lua | 6 | ||||
-rw-r--r-- | runtime/lua/vim/treesitter/languagetree.lua | 2 | ||||
-rw-r--r-- | runtime/lua/vim/treesitter/query.lua | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/runtime/lua/vim/treesitter.lua b/runtime/lua/vim/treesitter.lua index c1e5325519..44922bbc4d 100644 --- a/runtime/lua/vim/treesitter.lua +++ b/runtime/lua/vim/treesitter.lua @@ -157,7 +157,7 @@ end --- Returns the node's range or an unpacked range table --- ----@param node_or_range (TSNode|table) Node or table of positions +---@param node_or_range (TSNode | table) Node or table of positions --- ---@return integer start_row ---@return integer start_col @@ -218,7 +218,7 @@ end ---@param row integer Position row ---@param col integer Position column --- ----@return table[] List of captures `{ capture = "capture name", metadata = { ... } }` +---@return table[] List of captures `{ capture = "name", metadata = { ... } }` function M.get_captures_at_pos(bufnr, row, col) if bufnr == 0 then bufnr = a.nvim_get_current_buf() @@ -339,7 +339,7 @@ end --- - lang string|nil Parser language --- - ignore_injections boolean Ignore injected languages (default true) --- ----@return TSNode|nil under the cursor +---@return TSNode | nil Node at the given position ---@deprecated function M.get_node_at_pos(bufnr, row, col, opts) vim.deprecate('vim.treesitter.get_node_at_pos()', 'vim.treesitter.get_node()', '0.10') diff --git a/runtime/lua/vim/treesitter/languagetree.lua b/runtime/lua/vim/treesitter/languagetree.lua index 81ad83db2c..c9fd4bb2ea 100644 --- a/runtime/lua/vim/treesitter/languagetree.lua +++ b/runtime/lua/vim/treesitter/languagetree.lua @@ -653,7 +653,7 @@ end ---@param range Range `{ start_line, start_col, end_line, end_col }` ---@param opts table|nil Optional keyword arguments: --- - ignore_injections boolean Ignore injected languages (default true) ----@return TSNode|nil Found node +---@return TSNode | nil Found node function LanguageTree:named_node_for_range(range, opts) local tree = self:tree_for_range(range, opts) if tree then diff --git a/runtime/lua/vim/treesitter/query.lua b/runtime/lua/vim/treesitter/query.lua index 83910316a6..58a29f2fe0 100644 --- a/runtime/lua/vim/treesitter/query.lua +++ b/runtime/lua/vim/treesitter/query.lua @@ -639,7 +639,7 @@ end --- -- typically useful info about the node: --- local type = node:type() -- type of the captured node --- local row1, col1, row2, col2 = node:range() -- range of the capture ---- ... use the info here ... +--- -- ... use the info here ... --- end --- </pre> --- @@ -693,7 +693,7 @@ end --- --- local node_data = metadata[id] -- Node level metadata --- ---- ... use the info here ... +--- -- ... use the info here ... --- end --- end --- </pre> |