Skip to content

Commit a153b90

Browse files
committed
Make maxLength nullable again
1 parent 58248e2 commit a153b90

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

editors/code/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,10 @@
318318
"description": "Whether to show function parameter name inlay hints at the call site"
319319
},
320320
"rust-analyzer.inlayHints.maxLength": {
321-
"type": "integer",
321+
"type": [
322+
"null",
323+
"integer"
324+
],
322325
"default": 20,
323326
"minimum": 0,
324327
"exclusiveMinimum": true,

editors/code/src/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const RA_LSP_DEBUG = process.env.__RA_LSP_SERVER_DEBUG;
88
export interface InlayHintOptions {
99
typeHints: boolean;
1010
parameterHints: boolean;
11-
maxLength: number;
11+
maxLength: number | null;
1212
}
1313

1414
export interface CargoWatchOptions {
@@ -160,7 +160,7 @@ export class Config {
160160
return {
161161
typeHints: this.cfg.get("inlayHints.typeHints") as boolean,
162162
parameterHints: this.cfg.get("inlayHints.parameterHints") as boolean,
163-
maxLength: this.cfg.get("inlayHints.maxLength") as number,
163+
maxLength: this.cfg.get("inlayHints.maxLength") as null | number,
164164
};
165165
}
166166
get excludeGlobs() { return this.cfg.get("excludeGlobs") as string[]; }

0 commit comments

Comments
 (0)