heybourn/headwind

Run plugin only on manual saving

Opened this issue · 0 comments

Is your feature request related to a problem? Please describe.
As described here, saving is doing funny stuff with the current cursor position. Since the plugin runs also on autosave it sometimes get's pretty unhandy editing the classes.

#72

Describe the solution you'd like
The VS-Code API offers the possibility to determine what was the trigger for saving. So I would suggest to run only on manually saving (CMD+s) or make it an option.

"headwind.runOnAutoSave": true | false

Describe alternatives you've considered
Delaying auto save for a few seconds mitigates the problem, but raises others.

Additional context
I think it would be best practice not to run on autosave. It would be also the same behavior as "eslint auto fixing", which also runs only on manual save.