My intention is to run dart-import.fix command (that will fix some inconsistencies and sort imports). The way it is it works, but it saves, then fix the imports (so the file remains dirty).
It would be awesome if we could do exactly the same, but using the event onWillSaveTextDocument instead of onDidSaveTextDocument (so the import is run before the save).
My intention is to run
dart-import.fix
command (that will fix some inconsistencies and sort imports). The way it is it works, but it saves, then fix the imports (so the file remains dirty).It would be awesome if we could do exactly the same, but using the event
onWillSaveTextDocument
instead ofonDidSaveTextDocument
(so the import is run before the save).A simple option like
runBeforeSave: true
and just change https://github.com/pucelle/vscode-run-on-save/blob/0b51ed7c9c3a961bd50f7e254a2bf9be6e56a5aa/src/extension.ts#L21 accordingly.