When there's some use of a symbol SomeTrait that's from some other module and there's a similar symbol in scope (like HasSomeTrait), the option to add a use for SomeTrait should appear in vscode's action list thing as the first item, above renaming to the similar symbol.
Interesting problem! This happens because we have, effectively, three sources of light bulbs:
And we just append diagnositcs before all other assists here:
I think a better behavior would be to use this sort order:
I would be happy to work on this topic this weekend. Do you have any code example to be sure I understand the issue.
Most helpful comment
Interesting problem! This happens because we have, effectively, three sources of light bulbs:
And we just append diagnositcs before all other assists here:
https://github.com/rust-analyzer/rust-analyzer/blob/ebd1309c9a3ac0e6b0cee197f30a962d5263e727/crates/rust-analyzer/src/main_loop/handlers.rs#L704-L722
I think a better behavior would be to use this sort order: