mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 04:53:34 +00:00
Reformat with tsfmt
This commit is contained in:
parent
323ad13c8a
commit
04f0f5077a
5 changed files with 34 additions and 33 deletions
|
@ -85,8 +85,8 @@ class TextDocumentContentProvider
|
||||||
range = editor.selection.isEmpty
|
range = editor.selection.isEmpty
|
||||||
? undefined
|
? undefined
|
||||||
: this.ctx.client.code2ProtocolConverter.asRange(
|
: this.ctx.client.code2ProtocolConverter.asRange(
|
||||||
editor.selection,
|
editor.selection,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const request: SyntaxTreeParams = {
|
const request: SyntaxTreeParams = {
|
||||||
|
|
|
@ -171,9 +171,9 @@ export class Config {
|
||||||
(this.cargoFeatures.allFeatures !==
|
(this.cargoFeatures.allFeatures !==
|
||||||
this.prevCargoFeatures.allFeatures ||
|
this.prevCargoFeatures.allFeatures ||
|
||||||
this.cargoFeatures.noDefaultFeatures !==
|
this.cargoFeatures.noDefaultFeatures !==
|
||||||
this.prevCargoFeatures.noDefaultFeatures ||
|
this.prevCargoFeatures.noDefaultFeatures ||
|
||||||
this.cargoFeatures.features.length !==
|
this.cargoFeatures.features.length !==
|
||||||
this.prevCargoFeatures.features.length ||
|
this.prevCargoFeatures.features.length ||
|
||||||
this.cargoFeatures.features.some(
|
this.cargoFeatures.features.some(
|
||||||
(v, i) => v !== this.prevCargoFeatures!.features[i],
|
(v, i) => v !== this.prevCargoFeatures!.features[i],
|
||||||
))
|
))
|
||||||
|
|
|
@ -151,32 +151,32 @@ class Highlighter {
|
||||||
string,
|
string,
|
||||||
vscode.TextEditorDecorationType,
|
vscode.TextEditorDecorationType,
|
||||||
]> = [
|
]> = [
|
||||||
decoration('comment'),
|
decoration('comment'),
|
||||||
decoration('string'),
|
decoration('string'),
|
||||||
decoration('keyword'),
|
decoration('keyword'),
|
||||||
decoration('keyword.control'),
|
decoration('keyword.control'),
|
||||||
decoration('keyword.unsafe'),
|
decoration('keyword.unsafe'),
|
||||||
decoration('function'),
|
decoration('function'),
|
||||||
decoration('parameter'),
|
decoration('parameter'),
|
||||||
decoration('constant'),
|
decoration('constant'),
|
||||||
decoration('type.builtin'),
|
decoration('type.builtin'),
|
||||||
decoration('type.generic'),
|
decoration('type.generic'),
|
||||||
decoration('type.lifetime'),
|
decoration('type.lifetime'),
|
||||||
decoration('type.param'),
|
decoration('type.param'),
|
||||||
decoration('type.self'),
|
decoration('type.self'),
|
||||||
decoration('type'),
|
decoration('type'),
|
||||||
decoration('text'),
|
decoration('text'),
|
||||||
decoration('attribute'),
|
decoration('attribute'),
|
||||||
decoration('literal'),
|
decoration('literal'),
|
||||||
decoration('literal.numeric'),
|
decoration('literal.numeric'),
|
||||||
decoration('literal.char'),
|
decoration('literal.char'),
|
||||||
decoration('literal.byte'),
|
decoration('literal.byte'),
|
||||||
decoration('macro'),
|
decoration('macro'),
|
||||||
decoration('variable'),
|
decoration('variable'),
|
||||||
decoration('variable.mut', 'underline'),
|
decoration('variable.mut', 'underline'),
|
||||||
decoration('field'),
|
decoration('field'),
|
||||||
decoration('module'),
|
decoration('module'),
|
||||||
];
|
];
|
||||||
|
|
||||||
return new Map<string, vscode.TextEditorDecorationType>(decorations);
|
return new Map<string, vscode.TextEditorDecorationType>(decorations);
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,11 +28,11 @@ export class StatusDisplay implements vscode.Disposable {
|
||||||
if (this.packageName) {
|
if (this.packageName) {
|
||||||
this.statusBarItem!.text = `cargo ${this.command} [${
|
this.statusBarItem!.text = `cargo ${this.command} [${
|
||||||
this.packageName
|
this.packageName
|
||||||
}] ${this.frame()}`;
|
}] ${this.frame()}`;
|
||||||
} else {
|
} else {
|
||||||
this.statusBarItem!.text = `cargo ${
|
this.statusBarItem!.text = `cargo ${
|
||||||
this.command
|
this.command
|
||||||
} ${this.frame()}`;
|
} ${this.frame()}`;
|
||||||
}
|
}
|
||||||
}, 300);
|
}, 300);
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,8 @@
|
||||||
"noUnusedLocals": true,
|
"noUnusedLocals": true,
|
||||||
"noUnusedParameters": true,
|
"noUnusedParameters": true,
|
||||||
"noImplicitReturns": true,
|
"noImplicitReturns": true,
|
||||||
"noFallthroughCasesInSwitch": true
|
"noFallthroughCasesInSwitch": true,
|
||||||
|
"newLine": "LF"
|
||||||
},
|
},
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"node_modules"
|
"node_modules"
|
||||||
|
|
Loading…
Reference in a new issue