From bb15fa035610bb9765ca16900703804a88faa3bb Mon Sep 17 00:00:00 2001 From: 再生花 Date: Fri, 23 Feb 2024 05:58:59 +0900 Subject: feat(treesitter): add folding for `InspectTree` (#27518) As the InspectTree buffer is now a valid tree-sitter query tree, we can use the bundled fold queries to have folding for the tree. --- runtime/lua/vim/treesitter.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'runtime/lua/vim/treesitter.lua') diff --git a/runtime/lua/vim/treesitter.lua b/runtime/lua/vim/treesitter.lua index 88b68ff658..2aa46ceebd 100644 --- a/runtime/lua/vim/treesitter.lua +++ b/runtime/lua/vim/treesitter.lua @@ -461,7 +461,8 @@ end --- --- While in the window, press "a" to toggle display of anonymous nodes, "I" to toggle the --- display of the source language of each node, "o" to toggle the query editor, and press ---- to jump to the node under the cursor in the source buffer. +--- to jump to the node under the cursor in the source buffer. Folding also works +--- (try |zo|, |zc|, etc.). --- --- Can also be shown with `:InspectTree`. *:InspectTree* --- -- cgit