From a153b9087520012b5f815b4df6c3657d490b30c8 Mon Sep 17 00:00:00 2001 From: Steffen Lyngbaek Date: Thu, 12 Mar 2020 08:43:07 -0700 Subject: Make maxLength nullable again --- editors/code/package.json | 5 ++++- editors/code/src/config.ts | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/editors/code/package.json b/editors/code/package.json index 296d6fe8e..78f3539e9 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -318,7 +318,10 @@ "description": "Whether to show function parameter name inlay hints at the call site" }, "rust-analyzer.inlayHints.maxLength": { - "type": "integer", + "type": [ + "null", + "integer" + ], "default": 20, "minimum": 0, "exclusiveMinimum": true, diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts index 2668c9640..c3b3ecabf 100644 --- a/editors/code/src/config.ts +++ b/editors/code/src/config.ts @@ -8,7 +8,7 @@ const RA_LSP_DEBUG = process.env.__RA_LSP_SERVER_DEBUG; export interface InlayHintOptions { typeHints: boolean; parameterHints: boolean; - maxLength: number; + maxLength: number | null; } export interface CargoWatchOptions { @@ -160,7 +160,7 @@ export class Config { return { typeHints: this.cfg.get("inlayHints.typeHints") as boolean, parameterHints: this.cfg.get("inlayHints.parameterHints") as boolean, - maxLength: this.cfg.get("inlayHints.maxLength") as number, + maxLength: this.cfg.get("inlayHints.maxLength") as null | number, }; } get excludeGlobs() { return this.cfg.get("excludeGlobs") as string[]; } -- cgit v1.2.3