rust-lang / rust-lang/rust-analyzer

Feature Request: Go To Assignments command

Open
#18,149 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-lsp C-feature
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

Often when I want to understand what some variable means, I track its value back to its callers.

If rust-analyzer could help with that, that'd be nice.

Normal variables only have one value source, but if e.g. it's from a destructured tuple, or from a block with breaks, or a match, or a parameter, or a field, etc. there can be multiple.

LSP doesn't offer such command, so it'll have to be a LSP extension.

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 rust-analyzer’s existing navigation commands and the boundary for LSP extensions. Define how “Go To Assignments” should handle variables, destructured tuples, blocks with breaks, match expressions, parameters, and fields; done means the command can expose all applicable value sources.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.