rust-lang / rust-lang/rust-analyzer
Ability to quality all imports for a given import
Open
Nobody has claimed this yet.
C-feature
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
When working with a large codebase with many different types, types often need to be aliased or partially/fully qualified to distinguish it from a different type of the same name.
For example,
use geo::Point;
use a::b::generated::Point;
let x: Point; // Eh? Which one?
User flows
This issue proposes the following flow:
Replace use with qualified path
For qualifying a useed type, one would:
- Right-click a
used type. - Click "Replace use with qualified path".
- Observe that all imports are fully qualified.
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
No files or tests are named. Start by locating the code-action handling for Rust use imports and trace how a selected imported type is resolved; done means a right-clicked import can be replaced by a fully qualified path across the described example.
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
- 45/100