Closed JCKodel closed 2 days ago
Thanks for your finding the problem.
I guess, what you met is the default action of vscode, you modify original file, and it becomes unsaved.
The commandBeforeSaving
, it was designed for doing something else, like modifying another file. But otherwise, it is very reasonable to call a vscode command before saving, and even modifying source file.
I did some searching, haven't find a solution, but I found may the vscode action (not a plugin action): Format on Save, should exactly fit, but would be more complex to config.
Close it, never mind to re-open it.
I have to run two commands before saving on a Dart file: one of them fixes some imports (so it can change the file) and the other sort imports (which also can change the file).
Whenever the files are changed for either commands, the file remain unsaved (if I hit save a second time, as nothing is changed anymore, then VSCode saves the file).
My config:
Tried with async with no success.