diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-08-22 13:17:21 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2019-08-22 13:17:21 +0100 |
commit | 0a612fad026df7c270226822e239f8d3137cf31c (patch) | |
tree | e14c62250a13f39860965b15d4e3d7e48d022d67 /editors | |
parent | 2d0931b9ba7aabdc634c799b32957cc6f057e875 (diff) | |
parent | 69bbe79c5037eb3cd00744593d1836e45a6f56e1 (diff) |
Merge #1715
1715: Feature flags r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'editors')
-rw-r--r-- | editors/code/package.json | 8 | ||||
-rw-r--r-- | editors/code/src/config.ts | 4 | ||||
-rw-r--r-- | editors/code/src/server.ts | 3 |
3 files changed, 10 insertions, 5 deletions
diff --git a/editors/code/package.json b/editors/code/package.json index 98faf538f..95ec6cff6 100644 --- a/editors/code/package.json +++ b/editors/code/package.json | |||
@@ -165,10 +165,10 @@ | |||
165 | "default": false, | 165 | "default": false, |
166 | "description": "When highlighting Rust code, use a unique color per identifier" | 166 | "description": "When highlighting Rust code, use a unique color per identifier" |
167 | }, | 167 | }, |
168 | "rust-analyzer.showWorkspaceLoadedNotification": { | 168 | "rust-analyzer.featureFlags": { |
169 | "type": "boolean", | 169 | "type": "object", |
170 | "default": true, | 170 | "default": {}, |
171 | "description": "Show notification when workspace was loaded" | 171 | "description": "Fine grained feature flags to disable annoying features" |
172 | }, | 172 | }, |
173 | "rust-analyzer.enableEnhancedTyping": { | 173 | "rust-analyzer.enableEnhancedTyping": { |
174 | "type": "boolean", | 174 | "type": "boolean", |
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 { | |||
23 | public lruCapacity: null | number = null; | 23 | public lruCapacity: null | number = null; |
24 | public displayInlayHints = true; | 24 | public displayInlayHints = true; |
25 | public excludeGlobs = []; | 25 | public excludeGlobs = []; |
26 | public featureFlags = {}; | ||
26 | public cargoWatchOptions: CargoWatchOptions = { | 27 | public cargoWatchOptions: CargoWatchOptions = { |
27 | enableOnStartup: 'ask', | 28 | enableOnStartup: 'ask', |
28 | trace: 'off', | 29 | trace: 'off', |
@@ -132,5 +133,8 @@ export class Config { | |||
132 | if (config.has('excludeGlobs')) { | 133 | if (config.has('excludeGlobs')) { |
133 | this.excludeGlobs = config.get('excludeGlobs') || []; | 134 | this.excludeGlobs = config.get('excludeGlobs') || []; |
134 | } | 135 | } |
136 | if (config.has('featureFlags')) { | ||
137 | this.featureFlags = config.get('featureFlags') || {}; | ||
138 | } | ||
135 | } | 139 | } |
136 | } | 140 | } |
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 { | |||
45 | showWorkspaceLoaded: | 45 | showWorkspaceLoaded: |
46 | Server.config.showWorkspaceLoadedNotification, | 46 | Server.config.showWorkspaceLoadedNotification, |
47 | lruCapacity: Server.config.lruCapacity, | 47 | lruCapacity: Server.config.lruCapacity, |
48 | excludeGlobs: Server.config.excludeGlobs | 48 | excludeGlobs: Server.config.excludeGlobs, |
49 | featureFlags: Server.config.featureFlags | ||
49 | }, | 50 | }, |
50 | traceOutputChannel | 51 | traceOutputChannel |
51 | }; | 52 | }; |