rust-lang / rust-analyzer

A Rust compiler front-end for IDEs
https://rust-analyzer.github.io/
Apache License 2.0
14.06k stars 1.56k forks source link

`remove all unused imports` should remove all unused imports of the file. #17878

Open dev-ardi opened 1 month ago

dev-ardi commented 1 month ago

Currently it only removes all unused imports of the current use item and we have no way of doing it for the entire file.

flodiebold commented 4 weeks ago

If you select all the use items (or the whole file), I think the assist will work on all of them. Agree that it should maybe do that by default.

dev-ardi commented 4 weeks ago

I haven't figured out how to do that in neovim

ShoyuVanilla commented 4 weeks ago

I haven't figured out how to do that in neovim

I think that you can do that with the visual mode