Interface DocumentFormattingEditProvider

Expand description

The document formatting provider interface defines the contract between extensions and the formatting-feature.

interface DocumentFormattingEditProvider {
    displayName?: string;
    provideDocumentFormattingEdits(
        model: ITextModel,
        options: FormattingOptions,
        token: CancellationToken,
    ): ProviderResult<TextEdit[]>;
}

Properties§

§readonly displayName?: string

Methods§

§

provideDocumentFormattingEdits(
    model: ITextModel,
    options: FormattingOptions,
    token: CancellationToken,
): ProviderResult<TextEdit[]>

Provide formatting edits for a whole document.