rust-lang / rust-lang/rust-analyzer
Inlay hints for glob imports showing the used items used
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
When you use glob imports, it's hard to tell which items you are actually importing. The only way to check is to manually checked which items are used or by deleting the import and seeing where there are unresolved references. If you double clicked on it (and maybe also a keyboard shortcut), it could replace the glob import with an explicit one.
Glob imports are useful for rapid development, but maybe later you want to use a normal one once the project is more stable, or maybe the hint shows you that you're only importing 2 or 3 items; then you could double click and it would replace it with a normal import. It would also be very useful when you glob import preludes.
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 glob-import and inlay-hint entry points, then trace how explicit imports are produced; done means hints show the imported items and the proposed interaction replaces the glob import with an explicit one.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100