-
Notifications
You must be signed in to change notification settings - Fork 899
Open
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionalityfolding ranges
Milestone
Description
When VS Code folds the range, it just completely hides its contents:
When IntelliJ folds the range, it shows a certain replacement string instead:
The latter behavior is more flexible, and it would be cool if the protocol supported it. It allows for the following features:
-
folding a subrange in the string, which allows to hide boilerplate (see this post for example)
-
folded blocks take one line instead of two:
- showing some important info from the fold, without making it more verbose:
To implement these features, we need to add two things to the protocol:
- a
replacementText?: stringfield toFoldingRange(this covers bullet points 1 & 2) - add a
group?: numberfield toFoldingRange, such that all ranges in the group are folded-unfolded in lockstep. This covers use case3, where{and}are separate folding ranges, linked into one group
However, I assume that the bulk of work here needs to happen on the editor's side as it seems like VS Code doesn't support such replacements yet.
ztlpn, tjodden, michaelmesser, ris58h and rwols
Metadata
Metadata
Assignees
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionalityfolding ranges




