Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--crates/ide/src/hover/tests.rs6
-rw-r--r--crates/ide/src/static_index.rs2
-rw-r--r--crates/rust-analyzer/src/config.rs2
-rw-r--r--docs/user/generated_config.adoc2
-rw-r--r--editors/code/package.json2
5 files changed, 7 insertions, 7 deletions
diff --git a/crates/ide/src/hover/tests.rs b/crates/ide/src/hover/tests.rs
index 30e64f450a..326c248b7a 100644
--- a/crates/ide/src/hover/tests.rs
+++ b/crates/ide/src/hover/tests.rs
@@ -18,7 +18,7 @@ const HOVER_BASE_CONFIG: HoverConfig = HoverConfig {
format: HoverDocFormat::Markdown,
keywords: true,
max_trait_assoc_items_count: None,
- max_adt_fields_or_variants_count: Some(10),
+ max_adt_fields_or_variants_count: Some(5),
};
fn check_hover_no_result(ra_fixture: &str) {
@@ -1018,7 +1018,7 @@ fn hover_record_struct_limit() {
#[test]
fn hover_enum_limit() {
check_hover_adt_fields_or_variants_limit(
- Some(10),
+ Some(5),
r#"enum Foo$0 { A, B }"#,
expect![[r#"
*Foo*
@@ -1092,7 +1092,7 @@ fn hover_enum_limit() {
#[test]
fn hover_union_limit() {
check_hover_adt_fields_or_variants_limit(
- Some(10),
+ Some(5),
r#"union Foo$0 { a: u32, b: i32 }"#,
expect![[r#"
*Foo*
diff --git a/crates/ide/src/static_index.rs b/crates/ide/src/static_index.rs
index 012778f058..1378ab2ab0 100644
--- a/crates/ide/src/static_index.rs
+++ b/crates/ide/src/static_index.rs
@@ -167,7 +167,7 @@ impl StaticIndex<'_> {
keywords: true,
format: crate::HoverDocFormat::Markdown,
max_trait_assoc_items_count: None,
- max_adt_fields_or_variants_count: Some(10),
+ max_adt_fields_or_variants_count: Some(5),
};
let tokens = tokens.filter(|token| {
matches!(
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs
index 0211fcfdf5..10bc19b988 100644
--- a/crates/rust-analyzer/src/config.rs
+++ b/crates/rust-analyzer/src/config.rs
@@ -313,7 +313,7 @@ config_data! {
hover_memoryLayout_size: Option<MemoryLayoutHoverRenderKindDef> = Some(MemoryLayoutHoverRenderKindDef::Both),
/// How many fields or variants of an ADT (struct, enum or union) to display when hovering on. Show none if empty.
- hover_show_adtFieldsOrVariants: Option<usize> = Some(10),
+ hover_show_adtFieldsOrVariants: Option<usize> = Some(5),
/// How many associated items of a trait to display when hovering a trait.
hover_show_traitAssocItems: Option<usize> = None,
diff --git a/docs/user/generated_config.adoc b/docs/user/generated_config.adoc
index 2df318f36d..d275b51abc 100644
--- a/docs/user/generated_config.adoc
+++ b/docs/user/generated_config.adoc
@@ -533,7 +533,7 @@ How to render the offset information in a memory layout hover.
--
How to render the size information in a memory layout hover.
--
-[[rust-analyzer.hover.show.adtFieldsOrVariants]]rust-analyzer.hover.show.adtFieldsOrVariants (default: `10`)::
+[[rust-analyzer.hover.show.adtFieldsOrVariants]]rust-analyzer.hover.show.adtFieldsOrVariants (default: `5`)::
+
--
How many fields or variants of an ADT (struct, enum or union) to display when hovering on. Show none if empty.
diff --git a/editors/code/package.json b/editors/code/package.json
index 504185fc22..88a382f1fb 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -1154,7 +1154,7 @@
},
"rust-analyzer.hover.show.adtFieldsOrVariants": {
"markdownDescription": "How many fields or variants of an ADT (struct, enum or union) to display when hovering on. Show none if empty.",
- "default": 10,
+ "default": 5,
"type": [
"null",
"integer"