diff options
Diffstat (limited to 'editors/code/src/config.ts')
-rw-r--r-- | editors/code/src/config.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts index d8795f3b0..420589068 100644 --- a/editors/code/src/config.ts +++ b/editors/code/src/config.ts | |||
@@ -4,12 +4,14 @@ import { Server } from './server'; | |||
4 | 4 | ||
5 | const RA_LSP_DEBUG = process.env.__RA_LSP_SERVER_DEBUG; | 5 | const RA_LSP_DEBUG = process.env.__RA_LSP_SERVER_DEBUG; |
6 | 6 | ||
7 | export type CargoWatchOptions = 'ask' | 'enabled' | 'disabled'; | ||
8 | |||
7 | export class Config { | 9 | export class Config { |
8 | public highlightingOn = true; | 10 | public highlightingOn = true; |
9 | public enableEnhancedTyping = true; | 11 | public enableEnhancedTyping = true; |
10 | public raLspServerPath = RA_LSP_DEBUG || 'ra_lsp_server'; | 12 | public raLspServerPath = RA_LSP_DEBUG || 'ra_lsp_server'; |
11 | public showWorkspaceLoadedNotification = true; | 13 | public showWorkspaceLoadedNotification = true; |
12 | public enableCargoWatchOnStartup = true; | 14 | public enableCargoWatchOnStartup: CargoWatchOptions = 'ask'; |
13 | 15 | ||
14 | private prevEnhancedTyping: null | boolean = null; | 16 | private prevEnhancedTyping: null | boolean = null; |
15 | 17 | ||
@@ -71,9 +73,9 @@ export class Config { | |||
71 | } | 73 | } |
72 | 74 | ||
73 | if (config.has('enableCargoWatchOnStartup')) { | 75 | if (config.has('enableCargoWatchOnStartup')) { |
74 | this.enableCargoWatchOnStartup = config.get<boolean>( | 76 | this.enableCargoWatchOnStartup = config.get<CargoWatchOptions>( |
75 | 'enableCargoWatchOnStartup', | 77 | 'enableCargoWatchOnStartup', |
76 | true | 78 | 'ask' |
77 | ); | 79 | ); |
78 | } | 80 | } |
79 | } | 81 | } |