rust-lang / rust-lang/rust-analyzer
Autocomplete order seems to prefer recursion
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
I feel like r-a could be a little smarter about the ordering of autocomplete suggestions inside / at the start of a method implementation:

Recursive functions are pretty rare in general, and recursing unconditionally right at the start of the function is practically never the right thing to do.
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
Reproduce the autocomplete case shown in the issue, inside a Rust method implementation where the partially typed expression is self.sen. Start by investigating rust-analyzer's completion-ranking behavior and compare recursive calls with fields and accessors. Done means the suggestions no longer place an unconditional recursive call ahead of more likely members in this scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100