cachius
cachius

Reputation: 1905

How to configure VSCode autoimport with multiple sources for the same name?

I've entered the symbol makeStyles with multiple possible import sources into VSCode. When I trigger "Add all missing imports" via Quick Fix or by having "editor.codeActionsOnSave": { "source.addMissingImports": true } in the settings.json, it adds the wrong import

import { makeStyles } from "@mui/material";

instead of the right import

import { makeStyles } from "@mui/styles";

Is there any way to configure the correct import source? The most convenient one would be for VSCode to look at the other files and see which import sources are used for which symbols. Or some kind of map from symbol name to import source. Is this possible?

Upvotes: 1

Views: 158

Answers (0)

Related Questions