Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vscode "applying code action organize Imports"

Currently got an annoying issue with VS and saving ts files.

every time I save a ts file I get a little popup in the bottom right telling me its "applying code action organize Imports".

I've tried uninstalled VSCode, removing all extensions, deleting the code folder in Roaming. As far as I can tell all my user settings are blank and it should be back to a clean install of VSCode. I've tried looking in the settings for something similar, even adding this to my settings.

{
"editor.codeActionsOnSave": {
    "source.organizeImports": false
}

}

However, I'm still getting the same message on save and its restructuring the imports.

I've got vs code installed on another 2 machines and don't get the same issue.

Any ideas?

like image 605
Agentwalker Avatar asked Mar 28 '20 11:03

Agentwalker


Video Answer


2 Answers

I had forgotten to select a Python interpreter in vscode. Once I did this, the pop up on bottom right telling saying its "applying code action organize Imports" stopped appearing. This solved it for me.

like image 170
Elena Avatar answered Oct 17 '22 13:10

Elena


Turns out the folder I was opening had its own custom .vscode folder with its own settings.json which had the organizeImports setting enabled. So no matter what I did to my local settings file this one was always overriding it and nothing was showing up within VS directly.

like image 23
Agentwalker Avatar answered Oct 17 '22 13:10

Agentwalker