diff options
Diffstat (limited to 'editors/code')
-rw-r--r-- | editors/code/package.json | 5 | ||||
-rw-r--r-- | editors/code/src/config.ts | 4 | ||||
-rw-r--r-- | editors/code/src/server.ts | 3 |
3 files changed, 11 insertions, 1 deletions
diff --git a/editors/code/package.json b/editors/code/package.json index 05c808394..c2ed8d126 100644 --- a/editors/code/package.json +++ b/editors/code/package.json | |||
@@ -232,6 +232,11 @@ | |||
232 | ], | 232 | ], |
233 | "default": "off", | 233 | "default": "off", |
234 | "description": "Trace output of cargo-watch" | 234 | "description": "Trace output of cargo-watch" |
235 | }, | ||
236 | "rust-analyzer.lruCapacity": { | ||
237 | "type": "number", | ||
238 | "default": null, | ||
239 | "description": "Number of syntax trees rust-analyzer keeps in memory" | ||
235 | } | 240 | } |
236 | } | 241 | } |
237 | }, | 242 | }, |
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts index 8d73a6b34..3024546d2 100644 --- a/editors/code/src/config.ts +++ b/editors/code/src/config.ts | |||
@@ -19,6 +19,7 @@ export class Config { | |||
19 | public enableEnhancedTyping = true; | 19 | public enableEnhancedTyping = true; |
20 | public raLspServerPath = RA_LSP_DEBUG || 'ra_lsp_server'; | 20 | public raLspServerPath = RA_LSP_DEBUG || 'ra_lsp_server'; |
21 | public showWorkspaceLoadedNotification = true; | 21 | public showWorkspaceLoadedNotification = true; |
22 | public lruCapacity: null | number = null; | ||
22 | public cargoWatchOptions: CargoWatchOptions = { | 23 | public cargoWatchOptions: CargoWatchOptions = { |
23 | enableOnStartup: 'ask', | 24 | enableOnStartup: 'ask', |
24 | trace: 'off', | 25 | trace: 'off', |
@@ -109,5 +110,8 @@ export class Config { | |||
109 | '' | 110 | '' |
110 | ); | 111 | ); |
111 | } | 112 | } |
113 | if (config.has('lruCapacity')) { | ||
114 | this.lruCapacity = config.get('lruCapacity') as number; | ||
115 | } | ||
112 | } | 116 | } |
113 | } | 117 | } |
diff --git a/editors/code/src/server.ts b/editors/code/src/server.ts index 81c2b3fff..7029142fd 100644 --- a/editors/code/src/server.ts +++ b/editors/code/src/server.ts | |||
@@ -35,7 +35,8 @@ export class Server { | |||
35 | initializationOptions: { | 35 | initializationOptions: { |
36 | publishDecorations: true, | 36 | publishDecorations: true, |
37 | showWorkspaceLoaded: | 37 | showWorkspaceLoaded: |
38 | Server.config.showWorkspaceLoadedNotification | 38 | Server.config.showWorkspaceLoadedNotification, |
39 | lruCapacity: Server.config.lruCapacity | ||
39 | }, | 40 | }, |
40 | traceOutputChannel | 41 | traceOutputChannel |
41 | }; | 42 | }; |