Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--crates/rust-analyzer/src/config.rs3
-rw-r--r--docs/user/generated_config.adoc5
-rw-r--r--editors/code/package.json9
3 files changed, 17 insertions, 0 deletions
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs
index e6b60f6906..a5545e7984 100644
--- a/crates/rust-analyzer/src/config.rs
+++ b/crates/rust-analyzer/src/config.rs
@@ -375,6 +375,8 @@ config_data! {
/// How to render the size information in a memory layout hover.
hover_memoryLayout_size: Option<MemoryLayoutHoverRenderKindDef> = "\"both\"",
+ /// How many fields of a struct to display when hovering a struct.
+ hover_show_structFields: Option<usize> = "null",
/// How many associated items of a trait to display when hovering a trait.
hover_show_traitAssocItems: Option<usize> = "null",
@@ -1690,6 +1692,7 @@ impl Config {
},
keywords: self.data.hover_documentation_keywords_enable,
max_trait_assoc_items_count: self.data.hover_show_traitAssocItems,
+ max_struct_field_count: self.data.hover_show_structFields,
}
}
diff --git a/docs/user/generated_config.adoc b/docs/user/generated_config.adoc
index 5e782b7831..c4024f6d28 100644
--- a/docs/user/generated_config.adoc
+++ b/docs/user/generated_config.adoc
@@ -520,6 +520,11 @@ 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.structFields]]rust-analyzer.hover.show.structFields (default: `null`)::
++
+--
+How many fields of a struct to display when hovering a struct.
+--
[[rust-analyzer.hover.show.traitAssocItems]]rust-analyzer.hover.show.traitAssocItems (default: `null`)::
+
--
diff --git a/editors/code/package.json b/editors/code/package.json
index c34b8e25de..c3ea1ceeb6 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -1144,6 +1144,15 @@
}
]
},
+ "rust-analyzer.hover.show.structFields": {
+ "markdownDescription": "How many fields of a struct to display when hovering a struct.",
+ "default": null,
+ "type": [
+ "null",
+ "integer"
+ ],
+ "minimum": 0
+ },
"rust-analyzer.hover.show.traitAssocItems": {
"markdownDescription": "How many associated items of a trait to display when hovering a trait.",
"default": null,