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

willSave and didSave notifications are always sent #360

Closed
astoff opened this issue Nov 24, 2019 · 3 comments
Closed

willSave and didSave notifications are always sent #360

astoff opened this issue Nov 24, 2019 · 3 comments

Comments

@astoff
Copy link
Contributor

astoff commented Nov 24, 2019

The server can specify in TextDocumentClientCapabilities if it wants to receive these notifications.

@nemethf
Copy link
Collaborator

nemethf commented Nov 24, 2019

I think TextDocumentClientCapabilities is sent by the client. The server can declare its support for willSave in ServerCapabilities.textDocumentSync (which is a TextDocumentSyncOptions object).

But you're right in general, it is a bug that eglot doesn't check the capabilities of the server before sending :textDocument/willSave.

The server can declare its lack of support for didSave by omitting the save attribute from textDocumentSync. Eglot doesn't seem to check this either.

@joaotavora
Copy link
Owner

But you're right in general, it is a bug that eglot doesn't check the capabilities of the server before sending :textDocument/willSave.

Yes, I believe this is a bug. But is it hurting anyone?

@nemethf
Copy link
Collaborator

nemethf commented Apr 4, 2022

Commit 21ab73c fixed this.

@nemethf nemethf closed this as completed Apr 4, 2022
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