[Feature Request] Add on before save event
JCKodel opened this issue · 1 comments
JCKodel commented
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).
A simple option like runBeforeSave: true
and just change
vscode-run-on-save/src/extension.ts
Line 21 in 0b51ed7
pucelle commented
Sounds good and reasonable, I will extend the plugin later and add configuration items to support it.