rust-lang / rust-lang/rust-analyzer

List fields of enum variants / structs on hover

Open
#3,197 4 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-hover A-ide C-enhancement E-medium S-actionable
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.