From 762a06c6bcfbcc1e40ba670bae10bacdbb973524 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Fri, 10 Mar 2023 16:16:49 +0000 Subject: feat!(treesitter): do not return changes from LanguageTree:parse() Never return the changes an only notify them using the `on_changedtree` callback. It is not guaranteed for a plugin that it'll be the first one to call `tree:parse()` and thus get the changes. Closes #19915 --- runtime/doc/news.txt | 5 ++++- runtime/doc/treesitter.txt | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 04ae9360a0..801b74df45 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -232,7 +232,10 @@ The following deprecated functions or APIs were removed. changes need to be contributed there first.) See https://github.com/neovim/neovim/pull/20674. -- 'hkmap', 'hkmapp' and 'aleph' options were removed. Use 'keymap' option instead. +• 'hkmap', 'hkmapp' and 'aleph' options were removed. Use 'keymap' option instead. + +• |LanguageTree:parse()| no longer returns changed regions. Please use the + `on_changedtree` callbacks instead. ============================================================================== DEPRECATIONS *news-deprecations* diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt index c7a0e1927b..a8f25d2ff9 100644 --- a/runtime/doc/treesitter.txt +++ b/runtime/doc/treesitter.txt @@ -1099,7 +1099,6 @@ LanguageTree:parse({self}) *LanguageTree:parse()* Return: ~ TSTree[] - (table|nil) Change list LanguageTree:register_cbs({self}, {cbs}) *LanguageTree:register_cbs()* Registers callbacks for the |LanguageTree|. -- cgit