rust-lang / rust-lang/rust-analyzer
Autocomplete let with unresolved identifiers
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
For example
let <|>
println!("{}", foo);
should list foo as autocomplete option. Preferable this would also work at other locations variables are defined. As a nice bonus it would also work for items:
struct <|>
fn main() {
let bar = 0;
Foo { bar }
}
should autocomplete at least Foo.
I often write the usage of a variable before I actually define it, so the extract variable assist doesn't help.
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 reproducing the two Rust autocomplete examples: an unresolved foo after let and Foo in the struct expression. Trace the autocomplete entry point that handles these positions and make completion include identifiers or items declared later; done means both examples offer the expected completions.
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
- 35/100