From fed52706def9a9f5d33edc7dd9848a02ae475ba5 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 7 Jun 2019 20:49:29 +0300 Subject: make LRU cache configurable --- editors/code/src/config.ts | 4 ++++ editors/code/src/server.ts | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'editors/code/src') 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 { public enableEnhancedTyping = true; public raLspServerPath = RA_LSP_DEBUG || 'ra_lsp_server'; public showWorkspaceLoadedNotification = true; + public lruCapacity: null | number = null; public cargoWatchOptions: CargoWatchOptions = { enableOnStartup: 'ask', trace: 'off', @@ -109,5 +110,8 @@ export class Config { '' ); } + if (config.has('lruCapacity')) { + this.lruCapacity = config.get('lruCapacity') as number; + } } } 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 { initializationOptions: { publishDecorations: true, showWorkspaceLoaded: - Server.config.showWorkspaceLoadedNotification + Server.config.showWorkspaceLoadedNotification, + lruCapacity: Server.config.lruCapacity }, traceOutputChannel }; -- cgit v1.2.3