You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The doc says that only one folder provider is called, in fact multiple are called and their results are merged.
* Multiple folding can be registered for a language. In that case providers are sorted
* by their [score](#languages.match) and the best-matching provider is used. Failure
* of the selected provider will cause a failure of the whole operation.
*
vscode.languages.registerFoldingRangeProvider({ pattern: '**/*.foo' }, new class implements vscode.FoldingRangeProvider {
provideFoldingRanges(document: vscode.TextDocument, context: vscode.FoldingContext, token: vscode.CancellationToken): vscode.ProviderResult<vscode.FoldingRange[]> {
return [
new vscode.FoldingRange(0, document.lineCount - 1, vscode.FoldingRangeKind.Region)
]
}
});
vscode.languages.registerFoldingRangeProvider({ pattern: '**/*.foo' }, new class implements vscode.FoldingRangeProvider {
provideFoldingRanges(document: vscode.TextDocument, context: vscode.FoldingContext, token: vscode.CancellationToken): vscode.ProviderResult<vscode.FoldingRange[]> {
return [
new vscode.FoldingRange(1, document.lineCount - 1, vscode.FoldingRangeKind.Region)
]
}
});
The text was updated successfully, but these errors were encountered:
re #48352
The doc says that only one folder provider is called, in fact multiple are called and their results are merged.
The text was updated successfully, but these errors were encountered: