aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/config.ts
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/src/config.ts')
-rw-r--r--editors/code/src/config.ts21
1 files changed, 16 insertions, 5 deletions
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts
index 3024546d2..10e98d753 100644
--- a/editors/code/src/config.ts
+++ b/editors/code/src/config.ts
@@ -1,5 +1,6 @@
1import * as vscode from 'vscode'; 1import * as vscode from 'vscode';
2 2
3import { strict } from 'assert';
3import { Server } from './server'; 4import { Server } from './server';
4 5
5const RA_LSP_DEBUG = process.env.__RA_LSP_SERVER_DEBUG; 6const RA_LSP_DEBUG = process.env.__RA_LSP_SERVER_DEBUG;
@@ -9,7 +10,8 @@ export type CargoWatchTraceOptions = 'off' | 'error' | 'verbose';
9 10
10export interface CargoWatchOptions { 11export interface CargoWatchOptions {
11 enableOnStartup: CargoWatchStartupOptions; 12 enableOnStartup: CargoWatchStartupOptions;
12 checkArguments: string; 13 arguments: string;
14 command: string;
13 trace: CargoWatchTraceOptions; 15 trace: CargoWatchTraceOptions;
14} 16}
15 17
@@ -23,7 +25,8 @@ export class Config {
23 public cargoWatchOptions: CargoWatchOptions = { 25 public cargoWatchOptions: CargoWatchOptions = {
24 enableOnStartup: 'ask', 26 enableOnStartup: 'ask',
25 trace: 'off', 27 trace: 'off',
26 checkArguments: '' 28 arguments: '',
29 command: ''
27 }; 30 };
28 31
29 private prevEnhancedTyping: null | boolean = null; 32 private prevEnhancedTyping: null | boolean = null;
@@ -104,12 +107,20 @@ export class Config {
104 ); 107 );
105 } 108 }
106 109
107 if (config.has('cargo-watch.check-arguments')) { 110 if (config.has('cargo-watch.arguments')) {
108 this.cargoWatchOptions.checkArguments = config.get<string>( 111 this.cargoWatchOptions.arguments = config.get<string>(
109 'cargo-watch.check-arguments', 112 'cargo-watch.arguments',
110 '' 113 ''
111 ); 114 );
112 } 115 }
116
117 if (config.has('cargo-watch.command')) {
118 this.cargoWatchOptions.command = config.get<string>(
119 'cargo-watch.command',
120 ''
121 );
122 }
123
113 if (config.has('lruCapacity')) { 124 if (config.has('lruCapacity')) {
114 this.lruCapacity = config.get('lruCapacity') as number; 125 this.lruCapacity = config.get('lruCapacity') as number;
115 } 126 }