Remove unused format option

This commit is contained in:
Remco Haszing 2021-08-18 15:56:45 +02:00
parent 288c34cd37
commit cdef13351a
No known key found for this signature in database
GPG key ID: 40D9F5FE9155FD3C
2 changed files with 2 additions and 6 deletions

View file

@ -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;
}

View file

@ -57,11 +57,7 @@ export class YAMLWorker {
return this._languageService.doHover(document, position);
}
format(
uri: string,
range: ls.Range,
options: yamlService.CustomFormatterOptions,
): PromiseLike<ls.TextEdit[]> {
format(uri: string, options: yamlService.CustomFormatterOptions): PromiseLike<ls.TextEdit[]> {
const document = this._getTextDocument(uri);
const textEdits = this._languageService.doFormat(document, options);
return Promise.resolve(textEdits);