diff --git a/src/languageFeatures.ts b/src/languageFeatures.ts index dee4c30..6a50b43 100644 --- a/src/languageFeatures.ts +++ b/src/languageFeatures.ts @@ -432,7 +432,7 @@ export class DocumentFormattingEditProvider implements languages.DocumentFormatt const resource = model.uri; return this._worker(resource).then((worker) => - worker.format(String(resource), null, fromFormattingOptions(options)).then((edits) => { + worker.format(String(resource), fromFormattingOptions(options)).then((edits) => { if (!edits || edits.length === 0) { return; } diff --git a/src/yamlWorker.ts b/src/yamlWorker.ts index ab732ae..32c07e6 100644 --- a/src/yamlWorker.ts +++ b/src/yamlWorker.ts @@ -57,11 +57,7 @@ export class YAMLWorker { return this._languageService.doHover(document, position); } - format( - uri: string, - range: ls.Range, - options: yamlService.CustomFormatterOptions, - ): PromiseLike { + format(uri: string, options: yamlService.CustomFormatterOptions): PromiseLike { const document = this._getTextDocument(uri); const textEdits = this._languageService.doFormat(document, options); return Promise.resolve(textEdits);