tagbar
tagbar copied to clipboard
feature request: ability to collapse scoped kind groups
Currently kind groups (like functions, variables, etc) are collapsible for unscoped tags, but scoped kind groups (like class member variables or methods) cannot be collapsed. Good example is PHP: using UCtags (that report scopes), since #430, it's not possible to collapse class vars section, but using Exuberant Ctags (that does not report scopes) file vars group is collapsible.
That would certainly be useful. I'll see what I can do.
@majutsushi , would it still be possible to add this feature?
I use SystemVerirlog on a daily basis and HW engineers tend to like gigantic files. Being able to fold kinds inside a scope would be a tremendous help for me.
I will try to look at the code to see if I can create a PR, but I doubt it.
It should certainly be possible but I think it would be non-trivial. At the moment the tags are stored internally in a tree structure based on their scope, i.e. each tree node is a tag and a node with children means that the children are within the scope of the parent tag/node. Then the display code essentially just turns this tree structure into the indented visualization you see.
So in order to make additional things foldable you would have to add a different kind of node to the tree and adjust the display code accordingly, in a way that makes it possible to ignore this nesting for people that don't really want this additional indentation.