mirror of
https://github.com/danbulant/monaco-yaml
synced 2026-07-08 04:20:35 +00:00
Remove unused format option
This commit is contained in:
parent
288c34cd37
commit
cdef13351a
2 changed files with 2 additions and 6 deletions
|
|
@ -432,7 +432,7 @@ export class DocumentFormattingEditProvider implements languages.DocumentFormatt
|
||||||
const resource = model.uri;
|
const resource = model.uri;
|
||||||
|
|
||||||
return this._worker(resource).then((worker) =>
|
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) {
|
if (!edits || edits.length === 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -57,11 +57,7 @@ export class YAMLWorker {
|
||||||
return this._languageService.doHover(document, position);
|
return this._languageService.doHover(document, position);
|
||||||
}
|
}
|
||||||
|
|
||||||
format(
|
format(uri: string, options: yamlService.CustomFormatterOptions): PromiseLike<ls.TextEdit[]> {
|
||||||
uri: string,
|
|
||||||
range: ls.Range,
|
|
||||||
options: yamlService.CustomFormatterOptions,
|
|
||||||
): PromiseLike<ls.TextEdit[]> {
|
|
||||||
const document = this._getTextDocument(uri);
|
const document = this._getTextDocument(uri);
|
||||||
const textEdits = this._languageService.doFormat(document, options);
|
const textEdits = this._languageService.doFormat(document, options);
|
||||||
return Promise.resolve(textEdits);
|
return Promise.resolve(textEdits);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue