rust-lang / rust-lang/rust-analyzer
feature request: highlight uses of wildcard import when cursor is on it
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
this is a screenshot of current behavior, where the cursor is on 'VecDeque' in the import statement. uses of 'VecDeque' are highlighted.
to me, it would be useful to also be able to see uses of wildcard imports (use ...::*), like for prelude imports where it is common to import the whole module using this. in the screen below i would want occurrences of StructA and StructC to be highlighted because the cursor is on the *.
something to think about is whether the * should be highlighted when the cursor is on any of its imported things (things are structs, enums, types, traits etc), but when the cursor is on StructA, StructC should not be highlighted
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 two wildcard-import examples shown in the issue and compare them with the existing highlighting of a named import such as VecDeque. Trace the current use-highlighting behavior, then verify that placing the cursor on * highlights its imported uses while placing it on one imported item does not highlight the other items.
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