franneck94 / Vscode-Workspace-Formatter

🔧 Format all your files in a workspace with one click. 🔧
MIT License
15 stars 1 forks source link

Randomly closes files when it's supposed to. Randomly doesn't #5

Open mnmkay opened 7 months ago

mnmkay commented 7 months ago

With: "Workspace_Formatter.closeAfterSave": true, "Workspace_Formatter.saveAfterFormat": true,

It's a coin flip as to whether files that are opened and formatted are actually closed by the extension, but it seems like usually it isn't. I tried to isolate some situations but couldn't. I thought it might be related to not closing files that didn't need formatting/saving but no luck. I tried keep closeaAfterSave as true, and changing saveAfterFormat to false, and I'd even come up with situations where every file that need formatting was opened, modified, kept dirty/unsaved, and I was never even asked to close anyone one of them, out of about a dozen.

Maybe it's an API change, maybe a timing issue.. but this auto close feature is usually not working right now.

mnmkay commented 7 months ago

Also just have situation where it randomly doesn't execute the format action on the file, either. Just to be sure I've tested with the "Format in context menus" addon (lacroixdavid1.vscode-format-context-menu) which does not exhibit this behavior.

franneck94 commented 7 months ago

I have to dig into the closing issue. THe VSCode API is there a bit strange