How to import missing item in VsCode?


I have problem with VsCode with missing error in editor when item is not imported
In RustRover/Intelij Idea, not imported items have red color and with right click I can import them from proper location

Screenshot from 2024-01-28 12-05-57

With VsCode(with installed rust-analyzer extension) I don't see similar option and variable is colored like any other, so I cannot fast find wrong one.

Screenshot from 2024-01-28 12-23-14

Is there any settings to change that to match intelij behavior?
This is probably the last blocker that I see in migration to vscode.

If rust-analyzer is working/set up correctly, there should be a small light bulb and (maybe depending on the color theme) the fs should be red:
Does e.g. completion work in that file?

1 Like

Yes, completion works fine.

Also light bulb is visible, but only if I select item - this is problematic, because not imported module still is not red.

Additionally, I cannot always import missing module - IncludedDirectoriesModel have some problems

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.