rust-lang / rust-lang/rust-analyzer
Feature Request: Custom auto-import order
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
My favour is the following order, sorted by priority.
- Sub module
- Super module
- Current crate
- Workspace crates
std/alloc/coreitems- External crates
However, the current auto-import feature enforces a built-in order which I cannot adjust.
https://rust-analyzer.github.io/manual.html#auto-import
It would be better if I don't have to reorder imports manually.
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 with the auto-import section of the rust-analyzer manual linked in the issue and trace how its built-in ordering is implemented. Define how users would configure the requested priority order, then verify that submodules, super modules, the current crate, workspace crates, standard-library items, and external crates are ordered accordingly.
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