diff options
| author | Riley Bruins <ribru17@hotmail.com> | 2024-07-28 13:30:33 -0700 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2024-07-29 17:15:46 +0200 |
| commit | 1af55bfcf21b9bc7594b9c5ee0c2f60cbb887654 (patch) | |
| tree | cd48dc0520895b0e63af1b3f36706f406344d9bd /runtime/doc | |
| parent | bd3b6ec8360e0dd6edfe74c3d0013fd2b98b989e (diff) | |
| download | rneovim-1af55bfcf21b9bc7594b9c5ee0c2f60cbb887654.tar.gz rneovim-1af55bfcf21b9bc7594b9c5ee0c2f60cbb887654.tar.bz2 rneovim-1af55bfcf21b9bc7594b9c5ee0c2f60cbb887654.zip | |
feat(treesitter): allow get_node to return anonymous nodes
Adds a new field `include_anonymous` to the `get_node` options to allow
anonymous nodes to be returned.
Diffstat (limited to 'runtime/doc')
| -rw-r--r-- | runtime/doc/news.txt | 2 | ||||
| -rw-r--r-- | runtime/doc/treesitter.txt | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 2ddda72ae8..745e84d02e 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -167,6 +167,8 @@ TERMINAL TREESITTER • |LanguageTree:node_for_range()| gets anonymous and named nodes for a range +• |vim.treesitter.get_node()| now takes an option `include_anonymous`, default + false, which allows it to return anonymous nodes as well as named nodes. TUI diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt index cd8a4d8ec5..97f77c9e31 100644 --- a/runtime/doc/treesitter.txt +++ b/runtime/doc/treesitter.txt @@ -773,6 +773,8 @@ get_node({opts}) *vim.treesitter.get_node()* filetype) • {ignore_injections} (`boolean?`) Ignore injected languages (default true) + • {include_anonymous} (`boolean?`) Include anonymous nodes + (default false) Return: ~ (`TSNode?`) Node at the given position |