aboutsummaryrefslogtreecommitdiff
path: root/editors/code
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code')
-rw-r--r--editors/code/package.json5
-rw-r--r--editors/code/src/config.ts6
-rw-r--r--editors/code/src/server.ts2
3 files changed, 13 insertions, 0 deletions
diff --git a/editors/code/package.json b/editors/code/package.json
index f2e8e647e..bda0002b7 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -285,6 +285,11 @@
285 "default": 20, 285 "default": 20,
286 "description": "Maximum length for inlay hints" 286 "description": "Maximum length for inlay hints"
287 }, 287 },
288 "rust-analyzer.showDefaultTypesInInlayHints": {
289 "type": "boolean",
290 "default": false,
291 "description": "Display default types in inlay hints"
292 },
288 "rust-analyzer.cargoFeatures.noDefaultFeatures": { 293 "rust-analyzer.cargoFeatures.noDefaultFeatures": {
289 "type": "boolean", 294 "type": "boolean",
290 "default": false, 295 "default": false,
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts
index e131f09df..26bf30e7f 100644
--- a/editors/code/src/config.ts
+++ b/editors/code/src/config.ts
@@ -30,6 +30,7 @@ export class Config {
30 public lruCapacity: null | number = null; 30 public lruCapacity: null | number = null;
31 public displayInlayHints = true; 31 public displayInlayHints = true;
32 public maxInlayHintLength: null | number = null; 32 public maxInlayHintLength: null | number = null;
33 public showDefaultTypesInInlayHints = false;
33 public excludeGlobs = []; 34 public excludeGlobs = [];
34 public useClientWatching = true; 35 public useClientWatching = true;
35 public featureFlags = {}; 36 public featureFlags = {};
@@ -153,6 +154,11 @@ export class Config {
153 'maxInlayHintLength', 154 'maxInlayHintLength',
154 ) as number; 155 ) as number;
155 } 156 }
157 if (config.has('showDefaultTypesInInlayHints')) {
158 this.showDefaultTypesInInlayHints = config.get(
159 'showDefaultTypesInInlayHints',
160 ) as boolean;
161 }
156 if (config.has('excludeGlobs')) { 162 if (config.has('excludeGlobs')) {
157 this.excludeGlobs = config.get('excludeGlobs') || []; 163 this.excludeGlobs = config.get('excludeGlobs') || [];
158 } 164 }
diff --git a/editors/code/src/server.ts b/editors/code/src/server.ts
index 5ace1d0fa..e7d1df943 100644
--- a/editors/code/src/server.ts
+++ b/editors/code/src/server.ts
@@ -55,6 +55,8 @@ export class Server {
55 publishDecorations: true, 55 publishDecorations: true,
56 lruCapacity: Server.config.lruCapacity, 56 lruCapacity: Server.config.lruCapacity,
57 maxInlayHintLength: Server.config.maxInlayHintLength, 57 maxInlayHintLength: Server.config.maxInlayHintLength,
58 showDefaultTypesInInlayHints:
59 Server.config.showDefaultTypesInInlayHints,
58 excludeGlobs: Server.config.excludeGlobs, 60 excludeGlobs: Server.config.excludeGlobs,
59 useClientWatching: Server.config.useClientWatching, 61 useClientWatching: Server.config.useClientWatching,
60 featureFlags: Server.config.featureFlags, 62 featureFlags: Server.config.featureFlags,