I’m using Visual Studio Code (1.85.1) with Extension Pack for Java (Microsoft, 0.25.15).
The problem is that VS Code automatically adds import statements that are unwanted and lead to errors.
I’m using Visual Studio Code (1.85.1) with Extension Pack for Java (Microsoft, 0.25.15).
The problem is that VS Code automatically adds import statements that are unwanted and lead to errors.
2
Answers
While I have not personally used the Extensions Pack for Java, I do know that within File > Preferences > Settings, you can search for specific settings. Searching for "Import" or "Auto" within settings should pull up any settings related to the features added by these extensions.
Settings search example
If you aren’t able to find the source of the problem, then unfortunately the authors of said extensions did not easily add a way to configure this functionality, and you may need to toggle on/off each added extension to figure out which one is specifically causing the issue, and if you’re able to continue without that specific extension. Hope this helps!
You may have accidentally enabled the following setting, change it to
fasle
.