Use vim/neovim builtin keybinding to open/close tree node
Now, this plugin use zo open tree node, zc close tree node. But no keymap to toggle tree node.
So I think it's better to use za toggle tree node like fold.
zA toggle all fold under cursor recursively
za toggle current fold under cursor
zC close all fold under cursor recursively
zc close current fold
zO open all fold under cursor resursively
zo open current fold
zR open all fold among whole tree
I generally like the toggle command.
Things get a bit more complicated when we deal with recursive opens. I dont think these are a good idea in most cases.
In the calltree case, loops can exist, and recursive opens can lead to the open never finishing.
In filetree, directories are lazily evaluated, so recursive open of them can result in a long wait as you open a heavily nested directory.
The recursive close operations should be okay.
Sorry, I didn't fully consider this situation, zA can be reserved, but za is conveniently to toggle fold.
Yup I agree, a toggle will be useful.
Ill create a pr at each plugin repo (calltree,filetree,symboltree) to accomplish this.