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

79 Views Asked by At

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?

0

There are 0 best solutions below