diff options
author | Riley Bruins <ribru17@hotmail.com> | 2025-02-15 13:33:38 -0800 |
---|---|---|
committer | Lewis Russell <me@lewisr.dev> | 2025-02-21 09:47:02 +0000 |
commit | 55b165ac15a7528a3c679d928b1edf9d701f850b (patch) | |
tree | 17c86f717b79a42e87cd9c58a031b0aff0a755f2 /runtime | |
parent | 3e39250a79ef1a74bd64e283daf825208ca3875b (diff) | |
download | rneovim-55b165ac15a7528a3c679d928b1edf9d701f850b.tar.gz rneovim-55b165ac15a7528a3c679d928b1edf9d701f850b.tar.bz2 rneovim-55b165ac15a7528a3c679d928b1edf9d701f850b.zip |
fix(treesitter): `TSNode:field()` returns all children with the given field
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/treesitter.txt | 2 | ||||
-rw-r--r-- | runtime/lua/vim/treesitter/_meta/tsnode.lua | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt index b04f13add5..344bd37ddd 100644 --- a/runtime/doc/treesitter.txt +++ b/runtime/doc/treesitter.txt @@ -713,7 +713,7 @@ TSNode:extra() *TSNode:extra()* (`boolean`) TSNode:field({name}) *TSNode:field()* - Returns a table of the nodes corresponding to the {name} field. + Returns a list of all the node's children that have the given field name. Parameters: ~ • {name} (`string`) diff --git a/runtime/lua/vim/treesitter/_meta/tsnode.lua b/runtime/lua/vim/treesitter/_meta/tsnode.lua index 552905c3f0..2f9d7f214a 100644 --- a/runtime/lua/vim/treesitter/_meta/tsnode.lua +++ b/runtime/lua/vim/treesitter/_meta/tsnode.lua @@ -43,7 +43,7 @@ function TSNode:prev_named_sibling() end --- @return fun(): TSNode, string function TSNode:iter_children() end ---- Returns a table of the nodes corresponding to the {name} field. +--- Returns a list of all the node's children that have the given field name. --- @param name string --- @return TSNode[] function TSNode:field(name) end |