Currently it seems that the editor is not updating after formatOnSave: true for python files when using Black. This works fine in VS code.
The file is saved, but the editor is not updated with the formatted file. So next time you try to save it says the files are out of sync and doesn’t save.
Note that isort does seem to work here and update the editor, but not formatting with Black.
Here’s my config:
"[python]": {
"editor.defaultFormatter": "mikoz.black-py",
"editor.tabSize": 4,
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
"editor.formatOnSave": true
},
"isort.args": ["--profile", "black"]
Anyone have any luck with this?
This is primarily the reason why I switched back to VSCode. I want to be able to use extensions. And black is super important for me to maintain the sanity of my mind.
Very likely you have an extension architecture problem. I’m using an M series mac and I was having issues with Cursor installing universal extensions rather than darwin-arm64 versions. On creating a new user on the machine and re-installing Cursor to that user, it then started downloading the darwin-arm64 versions (and different revisions too). When that happened, all the Python extensions started working fine again.
In the end, I had no way of forcing darwin-arm64 arch on the old user profile, so had to fully migrate to the new user. It was incredibly annoying and time consuming but did completely fix all the python issues.
@arkaydeus do you know where you were able to identify that you were not installing darwin-arm64 versions?