Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adopt formatOnSave changes #12

Closed
jrieken opened this issue Oct 18, 2016 · 4 comments
Closed

Adopt formatOnSave changes #12

jrieken opened this issue Oct 18, 2016 · 4 comments

Comments

@jrieken
Copy link

jrieken commented Oct 18, 2016

Since version 1.6 VS Code has a format on save option. It works by calling the registered formatting provider for the language in question and most importantly it happens before the file is saved to disk, not causing additional fs writes and event cascades.

Please adopt this code code by either removing it and trusting the new editor.formatOnSave-setting or by using the new onWillSaveTextDocument-event.

See https://code.visualstudio.com/updates#_format-on-save, microsoft/vscode#12449, and microsoft/vscode#239

@taichi
Copy link
Owner

taichi commented Oct 18, 2016

thanks for your information, i'll try it.

@jrieken
Copy link
Author

jrieken commented Oct 18, 2016

Cool - let me know if you need help or support

@taichi
Copy link
Owner

taichi commented Oct 18, 2016

@jrieken done it #13
do you have some advice?

@jrieken
Copy link
Author

jrieken commented Oct 18, 2016

Looks proper - tho note that there is the global editor.formatOnSave-setting. So when both settings are true (the former and the one from this extension) you will be called twice. That you can prevent from not listening on any save event anymore (VS Code will then call your extension)

@taichi taichi closed this as completed Oct 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants