diff options
| author | bors <bors@rust-lang.org> | 2024-04-25 07:23:27 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-04-25 07:23:27 +0000 |
| commit | d00de3859961f60739a27cb5b6dca7d726c6209c (patch) | |
| tree | 69b9836060fd42071beb2a6401769a3e758b5dc5 /src/tools/rust-analyzer/docs/user | |
| parent | 1709e37f18d9d964ad7e8a44e90e065831950c7b (diff) | |
| parent | f7f02c0d127935aecf11b24420cdaba2cdfe0494 (diff) | |
Auto merge of #17021 - roife:add-hover-limits-for-adts, r=Veykril
Support hovering limits for adts Fix #17009 1. Currently, r-a supports limiting the number of struct fields displayed when hovering. This PR extends it to support enum variants and union fields. Since the display of these three (ADTs) is similar, this PR extends 'hover_show_structFields' to 'hover_show_adtFieldsOrVariants'. 2. This PR also resolved the problem that the layout of ADT was not restricted by display limitations when hovering on the Self type. 3. Additionally, this PR changes the default value of display limitations to `10` (instead of the original `null`), which helps users discover this feature.
Diffstat (limited to 'src/tools/rust-analyzer/docs/user')
| -rw-r--r-- | src/tools/rust-analyzer/docs/user/generated_config.adoc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/tools/rust-analyzer/docs/user/generated_config.adoc b/src/tools/rust-analyzer/docs/user/generated_config.adoc index 6e4820c5dea..02467463b9f 100644 --- a/src/tools/rust-analyzer/docs/user/generated_config.adoc +++ b/src/tools/rust-analyzer/docs/user/generated_config.adoc @@ -529,10 +529,15 @@ 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`):: +[[rust-analyzer.hover.show.enumVariants]]rust-analyzer.hover.show.enumVariants (default: `5`):: + -- -How many fields of a struct to display when hovering a struct. +How many variants of an enum to display when hovering on. Show none if empty. +-- +[[rust-analyzer.hover.show.fields]]rust-analyzer.hover.show.fields (default: `5`):: ++ +-- +How many fields of a struct, variant or union to display when hovering on. Show none if empty. -- [[rust-analyzer.hover.show.traitAssocItems]]rust-analyzer.hover.show.traitAssocItems (default: `null`):: + |
