Unable to save files when format-on-save enabled

I have Cursor and VS Code opened side-by-side. Each has the Black Formatter for python enabled to format on save.

When I save in VS Code the file saves rather quickly, applying all recommended formatting changes w/ Black.

When I save in Cursor the UI lags, the file does not save, and I get a toast stating “Saving : Running ‘Black Formatter’ Formatter” for ~30+ seconds before the file saves.

Restarting Cursor hasn’t helped.

1 Like

I have the same issue, would love to get this fixed but for prettier. Cursor is amazing but I have to keep switching back to VSCode because of this.

2 Likes

Same. Hangs on this forever:
Screenshot 2024-12-02 at 8.05.42 AM

I disable isort, then it does the same hanging on black

Same here.

Same here. I will bypass it by reloading the window. :disappointed_relieved:

Sorry about this, we’ve logged this internally to look into, so hopefully with have it fixed soon!

3 Likes

I’m having the same issue as the other users, hangs for 30+ seconds on saving. I need to switch back to vanilla VSCode to continue working. hope it’s fixed soon!

Just to help me figure this out, are you able to cancel using the method in this post?

if it happens again I’ll provide more details here.

I have the same issue since monday, but weirdly I have it also in vscode. In the settings I have this part:
“[typescript]”: {
“editor.defaultFormatter”: “esbenp.prettier-vscode”,
“editor.codeActionsOnSave”: {
“source.organizeImports”: “explicit”,
“source.addMissingImports”: “explicit”,
“source.fixAll.eslint”: “explicit”
}
},

The file gets saved only, if I completely remove this section.

I also tried deactivating all extensions, but it did not work.

I am encountering the same issue with Vue files since a few days. Following this thread in case a fix is available soon.

Yes, it worked for me.