Reputation: 712
I am switching to React from SwiftUI, where I am expecting auto import of components which should be default in VSCode, According to my research. Unfortunately when I type the components, VSCode is not suggesting me the components. I have to manually type the component name also manually import the components, which is very slow and require too much effort.
How can I get auto completion of components and auto import in VSCode 1.57.0?
Upvotes: 5
Views: 16800
Reputation: 17804
There are a few things that need to be set up for this to work properly. You can see the official setup instructions for MUI Typescript here.
{
"compilerOptions": {
"lib": ["es6", "dom"],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true
}
}
At this point, you should be able to see Material components suggested when you hit cmd+space:
Upvotes: 1
Reputation: 111
I had exactly the same issue with version 1.57.
Adding "security.workspace.trust.enabled": false
to settings.json
resolved the issue for me.
Upvotes: 11