To make Black and Isort below work, I need to save manually by pressing Ctrl+S on VSCode:
// "settings.json"
{
...
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter", // For Black
"editor.formatOnSave": true // For Black
"editor.codeActionsOnSave": {
"source.organizeImports": true // For Isort
}
}
}
Now, I enabled Auto Save as shown below, then Auto Save itself works but Auto Save doesn't work with Black and Isort so I still need to save manually by pressing Ctrl+S to make Black and Isort work:
// "settings.json"
{
...
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter", // For Black
"editor.formatOnSave": true // For Black
"editor.codeActionsOnSave": {
"source.organizeImports": true // For Isort
}
},
"files.autoSave": "afterDelay", // For Auto Save
}
So, how can I make Black and Isort work with Auto Save on VSCode?