Interface OnTypeFormattingEditProvider
Expand description
interface OnTypeFormattingEditProvider {
autoFormatTriggerCharacters: string[];
provideOnTypeFormattingEdits(
model: ITextModel,
position: Position,
ch: string,
options: FormattingOptions,
token: CancellationToken,
): ProviderResult<TextEdit[]>;
}Properties§
§
auto Format Trigger Characters: string[]Methods§
§provideOnTypeFormattingEdits(
model: ITextModel,
position: Position,
ch: string,
options: FormattingOptions,
token: CancellationToken,
): ProviderResult<TextEdit[]>
provideOnTypeFormattingEdits(
model: ITextModel,
position: Position,
ch: string,
options: FormattingOptions,
token: CancellationToken,
): ProviderResult<TextEdit[]>
Provide formatting edits after a character has been typed.
The given position and character should hint to the provider
what range the position to expand to, like find the matching {
when } has been entered.
The document formatting provider interface defines the contract between extensions and the formatting-feature.