rust-lang / rust-lang/rust-analyzer
List fields of enum variants / structs on hover
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
Similar to https://github.com/rust-analyzer/rust-analyzer/pull/3169, it would be quite nice if on hovering e.g., an enum variant or struct as a pattern or expression (tuple or record doesn't matter), the fields of said variant / struct would be shown. Often I feel like I have to F12 to find out what the fields are otherwise.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the hover behavior described in pull request 3169 and the rust-analyzer hover entry point. Implement field information for enum variants and structs when they appear as patterns or expressions, including tuple and record forms, then verify that hovering those constructs shows their fields.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100