diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/deprecated.txt | 4 | ||||
-rw-r--r-- | runtime/doc/news.txt | 11 | ||||
-rw-r--r-- | runtime/lua/vim/treesitter/_meta/tsnode.lua | 6 |
3 files changed, 8 insertions, 13 deletions
diff --git a/runtime/doc/deprecated.txt b/runtime/doc/deprecated.txt index ff9c21fad9..68258fedb4 100644 --- a/runtime/doc/deprecated.txt +++ b/runtime/doc/deprecated.txt @@ -65,10 +65,6 @@ LUA • *vim.highlight* Renamed to |vim.hl|. • vim.validate(opts: table) Use form 1. See |vim.validate()|. -TREESITTER -• *TSNode:child_containing_descendant()* Use |TSNode:child_with_descendant()| - instead; it is identical except that it can return the descendant itself. - VIMSCRIPT • *termopen()* Use |jobstart() with `{term: v:true}`. diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index adad08ddf2..1dee72314a 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -36,6 +36,12 @@ OPTIONS • 'jumpoptions' flag "unload" has been renamed to "clean". • The `msghistory` option has been removed in favor of 'messagesopt'. +TREESITTER + +• *TSNode:child_containing_descendant()* has been removed in the tree-sitter + library and is no longer available; use |TSNode:child_with_descendant()| + instead. + ============================================================================== BREAKING CHANGES *news-breaking* @@ -366,9 +372,8 @@ TREESITTER • |treesitter-directive-trim!| can trim all whitespace (not just empty lines) from both sides of a node. • |vim.treesitter.get_captures_at_pos()| now returns the `id` of each capture -• New |TSNode:child_with_descendant()|, which is nearly identical to - |TSNode:child_containing_descendant()| except that it can return the - descendant itself. +• New |TSNode:child_with_descendant()|, which efficiently gets the node's + child that contains a given node as descendant. • |LanguageTree:parse()| optionally supports asynchronous invocation, which is activated by passing the `on_parse` callback parameter. diff --git a/runtime/lua/vim/treesitter/_meta/tsnode.lua b/runtime/lua/vim/treesitter/_meta/tsnode.lua index d982b6a505..0c1b376fba 100644 --- a/runtime/lua/vim/treesitter/_meta/tsnode.lua +++ b/runtime/lua/vim/treesitter/_meta/tsnode.lua @@ -68,12 +68,6 @@ function TSNode:named_child_count() end --- @return TSNode? function TSNode:named_child(index) end ---- Get the node's child that contains {descendant}. ---- @param descendant TSNode ---- @return TSNode? ---- @deprecated -function TSNode:child_containing_descendant(descendant) end - --- Get the node's child that contains {descendant} (includes {descendant}). --- --- For example, with the following node hierarchy: |