The document formatting provider interface defines the contract between extensions and the formatting-feature.
Provide formatting edits for a range in a document.
The given range is a hint 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.
The document in which the command was invoked.
The range which should be formatted.
Options controlling formatting.
A cancellation token.
A set of text edits or a thenable that resolves to such. The lack of a result can be
signaled by returning
null, or an empty array.