aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua/stdlib.c
diff options
context:
space:
mode:
authorGregory Anders <8965202+gpanders@users.noreply.github.com>2023-02-22 08:01:08 -0700
committerGitHub <noreply@github.com>2023-02-22 08:01:08 -0700
commit675826da63e879efa97c0998fea192ed5c79d56e (patch)
treee21ae122150af334db50b43477f48a2f7811cbac /src/nvim/lua/stdlib.c
parent2281669470436a57f3bae746db05bb7b9ee4c171 (diff)
downloadrneovim-675826da63e879efa97c0998fea192ed5c79d56e.tar.gz
rneovim-675826da63e879efa97c0998fea192ed5c79d56e.tar.bz2
rneovim-675826da63e879efa97c0998fea192ed5c79d56e.zip
refactor(treesitter): Add vim.treesitter.get_node() (#22360)
This function replaces both vim.treesitter.get_node_at_pos() and vim.treesitter.get_node_at_cursor(). These two functions are similar enough that they don't need separate interfaces. Even worse, get_node_at_pos() returns a TSNode while get_node_at_cursor() returns a string, so the two functions behave slightly differently. vim.treesitter.get_node() combines these two into a more streamlined interface. With no arguments, it returns the node under the cursor in the current buffer. Optionally, it can accept a buffer number or a position to get the node at a given position in a given buffer.
Diffstat (limited to 'src/nvim/lua/stdlib.c')
0 files changed, 0 insertions, 0 deletions