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

Requesting didSave notification in server capabilities #86

Merged
merged 1 commit into from
Dec 31, 2019

Conversation

Coffei
Copy link
Contributor

@Coffei Coffei commented Dec 22, 2019

A copy of JakeBecker/elixir-ls#175. It's been open there for few months without any feedback, here it probably has a better chance of getting merged.

Since the server is using didSave notification, it needs to specifically ask for
it in the server capabilities. In VS Code it works fine without this, because
the editor sends the notification regardless of what server advertises. However,
other editors, such as Emacs with lsp-mode, break without this config.

I run into this issue in Emacs lsp-mode (emacs-lsp/lsp-ui#300), when I added the %{"save" => true} to the server capabilities in the client, it fixed the problem.

Since the server is using didSave notification, it needs to specifically ask for
it in the server capabilities. In VS Code it works fine without this, because
the editor sends the notification regardless of what server advertises. However,
other editors, such as Emacs with lsp-mode, break without this config.
Copy link
Member

@axelson axelson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, thanks! ❤️

@axelson axelson merged commit 2e03a0b into elixir-lsp:master Dec 31, 2019
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.

None yet

2 participants