revert: "feat(treesitter): add foldtext with treesitter highlighting"

This reverts commit 9ce1623 in favor of #20750.
This commit is contained in:
Till Bungert
2024-01-27 01:38:56 +01:00
committed by GitHub
parent a9df0c5ce6
commit 0892c080d1
5 changed files with 2 additions and 241 deletions

View File

@@ -123,7 +123,8 @@ BREAKING CHANGES IN HEAD *news-breaking-dev*
The following breaking changes were made during the development cycle to
unreleased features on Nvim HEAD.
...
Removed `vim.treesitter.foldtext` as transparent foldtext is now supported
https://github.com/neovim/neovim/pull/20750
• ...
==============================================================================
@@ -223,8 +224,6 @@ The following new APIs and features were added.
• |vim.treesitter.query.edit()| allows live editing of treesitter
queries.
• Improved error messages for query parsing.
• |vim.treesitter.foldtext()| applies treesitter highlighting to
foldtext.
• |vim.ui.open()| opens URIs using the system default handler (macOS `open`,
Windows `explorer`, Linux `xdg-open`, etc.)

View File

@@ -652,16 +652,6 @@ foldexpr({lnum}) *vim.treesitter.foldexpr()*
Return: ~
(`string`)
foldtext() *vim.treesitter.foldtext()*
Returns the highlighted content of the first line of the fold or falls
back to |foldtext()| if no treesitter parser is found. Can be set directly
to 'foldtext': >lua
vim.wo.foldtext = 'v:lua.vim.treesitter.foldtext()'
<
Return: ~
(`{ [1]: string, [2]: string[] }[]|string`)
*vim.treesitter.get_captures_at_cursor()*
get_captures_at_cursor({winnr})
Returns a list of highlight capture names under the cursor