Reputation: 7968
I recently switched from IntelliJ to Visual Studio Code, but one thing I can't figure out is how to tell my editor to automatically write a
use std::sync::Arc;
at the top of my file when I have something like the following import error:
In IntelliJ all I had to do was click on the red error icon and select "Import" and the use
would appear at the top of the file.
I have the RLS extension for VSC. How do I do this?
Upvotes: 5
Views: 4293
Reputation: 1424
Instead of the RLS extension, I switched to using the rust-analyzer vscode extension which supports suggesting imports as one of the "Quick Fix" options in vscode.
Upvotes: 4