From f1e1a2c0a79cc5cdab5ee6c6af21661d8e0731d8 Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Tue, 23 Mar 2021 19:04:48 +0200 Subject: Limit the hints size by default --- crates/rust-analyzer/src/config.rs | 4 ++-- docs/user/generated_config.adoc | 4 ++-- editors/code/package.json | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs index 5c88c3a9b..f49c4c33a 100644 --- a/crates/rust-analyzer/src/config.rs +++ b/crates/rust-analyzer/src/config.rs @@ -131,8 +131,8 @@ config_data! { /// Whether to show inlay type hints for method chains. inlayHints_chainingHints: bool = "true", - /// Maximum length for inlay hints. Default is unlimited. - inlayHints_maxLength: Option = "null", + /// Maximum length for inlay hints. Set to null to have an unlimited length. + inlayHints_maxLength: Option = "20", /// Whether to show function parameter name inlay hints at the call /// site. inlayHints_parameterHints: bool = "true", diff --git a/docs/user/generated_config.adoc b/docs/user/generated_config.adoc index c2521289c..6ea90f7af 100644 --- a/docs/user/generated_config.adoc +++ b/docs/user/generated_config.adoc @@ -206,10 +206,10 @@ Use markdown syntax for links in hover. -- Whether to show inlay type hints for method chains. -- -[[rust-analyzer.inlayHints.maxLength]]rust-analyzer.inlayHints.maxLength (default: `null`):: +[[rust-analyzer.inlayHints.maxLength]]rust-analyzer.inlayHints.maxLength (default: `20`):: + -- -Maximum length for inlay hints. Default is unlimited. +Maximum length for inlay hints. Set to null to have an unlimited length. -- [[rust-analyzer.inlayHints.parameterHints]]rust-analyzer.inlayHints.parameterHints (default: `true`):: + diff --git a/editors/code/package.json b/editors/code/package.json index faec45276..2b031aaa0 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -625,8 +625,8 @@ "type": "boolean" }, "rust-analyzer.inlayHints.maxLength": { - "markdownDescription": "Maximum length for inlay hints. Default is unlimited.", - "default": null, + "markdownDescription": "Maximum length for inlay hints. Set to null to have an unlimited length.", + "default": 20, "type": [ "null", "integer" -- cgit v1.2.3