Skip to content

[API] Add type to 'OutliningSpan' class #22419

@mjbvz

Description

@mjbvz

From microsoft/vscode#20802

Search Terms:

  • code folding
  • outliningspans

Problem
Allow users to fold / hide blocks of imports such as :

import {} from 'a';
import {} from 'b';
import {} from 'c';

Proposal
Add import blocks to the outliningSpans introduced in #22400.

We should also consider marking import block spans in some way. This could be something like:

interface OutliningSpan {
    ...

    type: 'import' | 'code'
}

Here's the vscode proposed folding API: https://github.com/Microsoft/vscode/blob/0c8e31f14a2c1d4c0c7ea75573caab39b171384b/src/vs/vscode.proposed.d.ts#L10

/cc @aeschli

Metadata

Metadata

Assignees

Labels

Domain: APIRelates to the public API for TypeScriptDomain: LS: OutliningRelates to multi-line regions that editors can collapseFixedA PR has been merged for this issueSuggestionAn idea for TypeScript

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions