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

Stop sending textDocument/didSave when server not support #853

Merged
merged 1 commit into from
May 24, 2019
Merged

Stop sending textDocument/didSave when server not support #853

merged 1 commit into from
May 24, 2019

Conversation

itome
Copy link
Contributor

@itome itome commented May 24, 2019

dart_analysis_server return Unknown method textDocument/didSave.
dart-lang/sdk#36464
We should stop sending textDocument/didSave when server capabilities doesn't include textDocumentSync > save.
microsoft/language-server-protocol#288

@yyoncho yyoncho merged commit 150a933 into emacs-lsp:master May 24, 2019
@yyoncho
Copy link
Member

yyoncho commented May 24, 2019

Thank you!

@jtpavlock
Copy link

Looks like I'm running into this issue again. I can confirm it's fixed with the referenced patch, but with the following code in the version I'm running it persists:

(defun lsp--send-did-save-p ()
  "Return whether didSave notifications should be sent to the server."
  (let ((sync (lsp:server-capabilities-text-document-sync? (lsp--server-capabilities))))
    (or (memq sync '(1 2))
        (lsp:text-document-sync-options-save? sync))))

Should I open a new issue up?

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

Successfully merging this pull request may close these issues.

3 participants