Interface DocumentOnTypeFormattingParams

The parameters of a DocumentOnTypeFormattingRequest.

interface DocumentOnTypeFormattingParams {
    ch: string;
    options: FormattingOptions;
    position: Position;
    textDocument: TextDocumentIdentifier;
}

Properties

ch: string

The character that has been typed that triggered the formatting on type request. That is not necessarily the last character that got inserted into the document since the client could auto insert characters as well (e.g. like automatic brace completion).

The formatting options.

position: Position

The position around which the on type formatting should happen. This is not necessarily the exact position where the character denoted by the property ch got typed.

The document to format.