treesit-fold
treesit-fold copied to clipboard
Command to fold everything under a level? analogous to `hs-hide-level`
Is there such command?
Something like #14? 🤔
It is a similar idea, actually cycling would be even better.
The hs-hide-level hides everything below the current level.
If you are at a function level, you hide if-statements, for example.
At the module level, it hides the functions.
👍 for a hs-hide-level analogous, I heavily rely on hs-hide-level everyday but it's quite buggy. Tried treesit-fold and works very good, but it's missing this functionality.
The functionality can be replicated by doing the following
- selecting everything in the body (within
{}) - narrow to region
- run treesit-fold-close-all
- widen
The functionality can be replicated by doing the following
Ah, now I fully understand the feature request. I've been a little busy recently, so I probably would not have time for this. 😓
Anyway, feel free to open a PR for this! ;)