aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/treesitter.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/treesitter.txt')
-rw-r--r--runtime/doc/treesitter.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt
index 34971c7acf..e19fda8fd1 100644
--- a/runtime/doc/treesitter.txt
+++ b/runtime/doc/treesitter.txt
@@ -560,6 +560,16 @@ 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