Skip to content

[folding] custom folding text for folded ranges #1426

Closed

Description

Other IDE's like Visual Studio or Intellij IDEA allow to define custom text for folded regions.

There are a lot of issues that could be solved with this feature: microsoft/vscode#70794 , microsoft/vscode#3352 , #827 and other.

The proposed change is to add collapsedText property to FoldingRange interface:

interface FoldingRange {
	startLine: uinteger
	startCharacter?: uinteger
	endLine: uinteger;
	endCharacter?: uinteger;
	kind?: string;

        collapsedText?: string;
}

The problem is: what should clients that don't support char-ranges folding (lineFoldingOnly === true) do? I've described the problem in microsoft/vscode#70794
Possible options are:

  1. Clients must replace the whole first line too.
  2. Clients must show the collapsedText at the end of the first line.
  3. Clients are free to decide how they show it.
  4. Add a property to the FoldingRange to specify the behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions