provideDocumentRangesFormattingEdits
abstract var provideDocumentRangesFormattingEdits: (document: TextDocument, ReadonlyArray<Range>, options: FormattingOptions, token: CancellationToken) -> ProviderResult<ReadonlyArray<TextEdit>>?(source)
Provide formatting edits for multiple ranges in a document.
This function is optional but allows a formatter to perform faster when formatting only modified ranges or when formatting a large number of selections.
The given ranges are hints and providers can decide to format a smaller or larger range. Often this is done by adjusting the start and end of the range to full syntax nodes.
Parameters
document
The document in which the command was invoked.
ranges
The ranges which should be formatted.
options
Options controlling formatting.
token
A cancellation token.