mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 20:52:56 +01:00
run prettier
This commit is contained in:
parent
64042339ee
commit
49ba01f724
1 changed files with 8 additions and 10 deletions
|
|
@ -293,11 +293,8 @@ export class DiagnosticsAdapter extends Adapter {
|
||||||
}
|
}
|
||||||
|
|
||||||
const promises: Promise<Diagnostic[]>[] = [];
|
const promises: Promise<Diagnostic[]>[] = [];
|
||||||
const {
|
const { noSyntaxValidation, noSemanticValidation, noSuggestionDiagnostics } =
|
||||||
noSyntaxValidation,
|
this._defaults.getDiagnosticsOptions();
|
||||||
noSemanticValidation,
|
|
||||||
noSuggestionDiagnostics
|
|
||||||
} = this._defaults.getDiagnosticsOptions();
|
|
||||||
if (!noSyntaxValidation) {
|
if (!noSyntaxValidation) {
|
||||||
promises.push(worker.getSyntacticDiagnostics(model.uri.toString()));
|
promises.push(worker.getSyntacticDiagnostics(model.uri.toString()));
|
||||||
}
|
}
|
||||||
|
|
@ -394,9 +391,8 @@ export class DiagnosticsAdapter extends Adapter {
|
||||||
}
|
}
|
||||||
const infoStart = info.start || 0;
|
const infoStart = info.start || 0;
|
||||||
const infoLength = info.length || 1;
|
const infoLength = info.length || 1;
|
||||||
const { lineNumber: startLineNumber, column: startColumn } = relatedResource.getPositionAt(
|
const { lineNumber: startLineNumber, column: startColumn } =
|
||||||
infoStart
|
relatedResource.getPositionAt(infoStart);
|
||||||
);
|
|
||||||
const { lineNumber: endLineNumber, column: endColumn } = relatedResource.getPositionAt(
|
const { lineNumber: endLineNumber, column: endColumn } = relatedResource.getPositionAt(
|
||||||
infoStart + infoLength
|
infoStart + infoLength
|
||||||
);
|
);
|
||||||
|
|
@ -992,7 +988,8 @@ export abstract class FormatHelper extends Adapter {
|
||||||
|
|
||||||
export class FormatAdapter
|
export class FormatAdapter
|
||||||
extends FormatHelper
|
extends FormatHelper
|
||||||
implements languages.DocumentRangeFormattingEditProvider {
|
implements languages.DocumentRangeFormattingEditProvider
|
||||||
|
{
|
||||||
public async provideDocumentRangeFormattingEdits(
|
public async provideDocumentRangeFormattingEdits(
|
||||||
model: editor.ITextModel,
|
model: editor.ITextModel,
|
||||||
range: Range,
|
range: Range,
|
||||||
|
|
@ -1031,7 +1028,8 @@ export class FormatAdapter
|
||||||
|
|
||||||
export class FormatOnTypeAdapter
|
export class FormatOnTypeAdapter
|
||||||
extends FormatHelper
|
extends FormatHelper
|
||||||
implements languages.OnTypeFormattingEditProvider {
|
implements languages.OnTypeFormattingEditProvider
|
||||||
|
{
|
||||||
get autoFormatTriggerCharacters() {
|
get autoFormatTriggerCharacters() {
|
||||||
return [';', '}', '\n'];
|
return [';', '}', '\n'];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue