provideOnTypeFormattingEdits
abstract fun provideOnTypeFormattingEdits(document: TextDocument, position: Position, ch: String, options: FormattingOptions, token: CancellationToken): ProviderResult<ReadonlyArray<TextEdit>>(source)
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.
Parameters
document
The document in which the command was invoked.
position
The position at which the command was invoked.
ch
The character that has been typed.
options
Options controlling formatting.
token
A cancellation token.