implement feature flags

This commit is contained in:
Aleksey Kladov
2019-08-22 14:44:16 +03:00
parent 4dd5afb7fe
commit 69bbe79c50
11 changed files with 150 additions and 36 deletions

View File

@@ -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') || {};
}
}
}

View File

@@ -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
};