rust-lang / rust-lang/rust-analyzer
Auto import always top of file
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
Sometimes in VSCode the rust-analyzer puts my auto-import in the function I am working in rather than at the top of the file. I always want them to be at the top of the file, and I don't believe there is a rust-analyzer setting to configure this, as I played with the available import settings.
So, the desired feature is: auto-import always to the top of file
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 auto-import behavior in VSCode with rust-analyzer, comparing imports inserted at the top of the file with imports placed inside the active function. Start by reviewing the available import settings and the auto-import implementation; done when a supported configuration or behavior consistently places auto-imports at the file top.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100