Skip to content

FoldingRangeProvider

原文链接

https://microsoft.github.io/monaco-editor/docs.html#interfaces/languages.FoldingRangeProvider.html

编辑器模型折叠范围的提供商。

ts
interface FoldingRangeProvider {
    onDidChange?: IEvent<FoldingRangeProvider>;
    provideFoldingRanges(model, context, token): ProviderResult<FoldingRange[]>;
}

onDidChange

provideFoldingRanges