Skip to content

DocumentRangeFormattingEditProvider

原文链接

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

文档格式设置提供程序接口定义扩展和格式设置功能之间的约定。

ts
interface DocumentRangeFormattingEditProvider {
    displayName?: string;
    provideDocumentRangeFormattingEdits(model, range, options, token): ProviderResult<TextEdit[]>;
    provideDocumentRangesFormattingEdits?(model, ranges, options, token): ProviderResult<TextEdit[]>;
}

displayName

  • 类型:string

provideDocumentRangeFormattingEdits

provideDocumentRangesFormattingEdits