aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/src')
-rw-r--r--editors/code/src/commands/cargo_watch.ts2
-rw-r--r--editors/code/src/highlighting.ts34
2 files changed, 22 insertions, 14 deletions
diff --git a/editors/code/src/commands/cargo_watch.ts b/editors/code/src/commands/cargo_watch.ts
index 1d939e28c..6ba794bb3 100644
--- a/editors/code/src/commands/cargo_watch.ts
+++ b/editors/code/src/commands/cargo_watch.ts
@@ -57,7 +57,7 @@ export class CargoWatchProvider implements vscode.Disposable {
57 return; 57 return;
58 } 58 }
59 59
60 let args = 'check --message-format json'; 60 let args = 'check --all-targets --message-format json';
61 if (Server.config.cargoWatchOptions.checkArguments.length > 0) { 61 if (Server.config.cargoWatchOptions.checkArguments.length > 0) {
62 // Excape the double quote string: 62 // Excape the double quote string:
63 args += ' ' + Server.config.cargoWatchOptions.checkArguments; 63 args += ' ' + Server.config.cargoWatchOptions.checkArguments;
diff --git a/editors/code/src/highlighting.ts b/editors/code/src/highlighting.ts
index 2521dff62..e1a68544a 100644
--- a/editors/code/src/highlighting.ts
+++ b/editors/code/src/highlighting.ts
@@ -13,23 +13,31 @@ export class Highlighter {
13 string, 13 string,
14 vscode.TextEditorDecorationType 14 vscode.TextEditorDecorationType
15 > { 15 > {
16 const decor = (color: string) => 16 const colorContrib = (
17 vscode.window.createTextEditorDecorationType({ color }); 17 tag: string
18 ): [string, vscode.TextEditorDecorationType] => {
19 const color = new vscode.ThemeColor('ralsp.' + tag);
20 const decor = vscode.window.createTextEditorDecorationType({
21 color
22 });
23 return [tag, decor];
24 };
18 25
19 const decorations: Iterable< 26 const decorations: Iterable<
20 [string, vscode.TextEditorDecorationType] 27 [string, vscode.TextEditorDecorationType]
21 > = [ 28 > = [
22 ['background', decor('#3F3F3F')], 29 colorContrib('comment'),
23 ['comment', decor('#7F9F7F')], 30 colorContrib('string'),
24 ['string', decor('#CC9393')], 31 colorContrib('keyword'),
25 ['keyword', decor('#F0DFAF')], 32 colorContrib('keyword.control'),
26 ['function', decor('#93E0E3')], 33 colorContrib('keyword.unsafe'),
27 ['parameter', decor('#94BFF3')], 34 colorContrib('function'),
28 ['builtin', decor('#DD6718')], 35 colorContrib('parameter'),
29 ['text', decor('#DCDCCC')], 36 colorContrib('builtin'),
30 ['attribute', decor('#BFEBBF')], 37 colorContrib('text'),
31 ['literal', decor('#DFAF8F')], 38 colorContrib('attribute'),
32 ['macro', decor('#DFAF8F')] 39 colorContrib('literal'),
40 colorContrib('macro')
33 ]; 41 ];
34 42
35 return new Map<string, vscode.TextEditorDecorationType>(decorations); 43 return new Map<string, vscode.TextEditorDecorationType>(decorations);