From 69bbe79c5037eb3cd00744593d1836e45a6f56e1 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 22 Aug 2019 14:44:16 +0300 Subject: implement feature flags --- 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 4df6b50ef..570ddca46 100644 --- a/editors/code/src/config.ts +++ b/editors/code/src/config.ts @@ -23,6 +23,7 @@ export class Config { public lruCapacity: null | number = null; public displayInlayHints = true; public excludeGlobs = []; + public featureFlags = {}; public cargoWatchOptions: CargoWatchOptions = { enableOnStartup: 'ask', trace: 'off', @@ -132,5 +133,8 @@ export class Config { if (config.has('excludeGlobs')) { this.excludeGlobs = config.get('excludeGlobs') || []; } + if (config.has('featureFlags')) { + this.featureFlags = config.get('featureFlags') || {}; + } } } diff --git a/editors/code/src/server.ts b/editors/code/src/server.ts index 3273d8749..0d2a99c70 100644 --- a/editors/code/src/server.ts +++ b/editors/code/src/server.ts @@ -45,7 +45,8 @@ export class Server { showWorkspaceLoaded: Server.config.showWorkspaceLoadedNotification, lruCapacity: Server.config.lruCapacity, - excludeGlobs: Server.config.excludeGlobs + excludeGlobs: Server.config.excludeGlobs, + featureFlags: Server.config.featureFlags }, traceOutputChannel }; -- cgit v1.2.3