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

[BREAK CHANGE] workspace.onWillSaveUntil method will be removed #2704

Closed
chemzqm opened this issue Dec 11, 2020 · 3 comments
Closed

[BREAK CHANGE] workspace.onWillSaveUntil method will be removed #2704

chemzqm opened this issue Dec 11, 2020 · 3 comments
Milestone

Comments

@chemzqm
Copy link
Member

chemzqm commented Dec 11, 2020

workspace.onWillSaveTextDocument will always emit event with waitUntil(thenable: Thenable<TextEdit[] | any>): void method, use that instead.

Each handler will be called for textEdit[], and only the first returned textEdit[] (not empty) would be applied to the document, this is the same behavior as VSCode,

Multiple formatters won't work in subsequence any more (which can be buggy), create BufWritePre autocmd in your vimrc for that purpose.

@fannheyward
Copy link
Member

Does formatOnSaveFiletypes still work?

@chemzqm
Copy link
Member Author

chemzqm commented Dec 11, 2020

It should still work.

@develra
Copy link

develra commented Dec 23, 2020

Heya - apologies for the ignorance:
https://github.com/neoclide/coc-tslint-plugin/blob/master/src/index.ts#L38
Should this be updated to

workspace.onWillSaveTextDocument

?
Thanks!

{edit: attempt at a fix - https://github.com/neoclide/coc-tslint-plugin/pull/10}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants