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

Error in latest Neovim handling textDocument/diagnostic response #810

Closed
anderseknert opened this issue Jun 8, 2024 · 0 comments · Fixed by #812
Closed

Error in latest Neovim handling textDocument/diagnostic response #810

anderseknert opened this issue Jun 8, 2024 · 0 comments · Fixed by #812
Labels
bug Something isn't working language server protocol

Comments

@anderseknert
Copy link
Member

anderseknert commented Jun 8, 2024

See: #578 (comment)

Looks like the latest version enabled some LSP features previously not supported, and a handler (in this case textDocument/diagnostic) returning an empty struct instead of null once again coming back to bite us. In our defence though, this is not a case where the specification defines null as a valid response! That and the fact that our response has been handled well by all other clients we've tried suggests that it's probably Neovim getting things wrong here. Perhaps they'll fix that later as I'm sure they'll find issues with other servers too. But no matter who's wrong, it seems like all the clients I've tried accept null as a response too, so we can probably just make that change.

Thanks @folliehiyuki for reporting this.

@anderseknert anderseknert added bug Something isn't working language server protocol labels Jun 8, 2024
anderseknert added a commit that referenced this issue Jun 8, 2024
While the specification isn't clear here, Neovim apparently had issues
dealing with the empty object response. And since all the other editors
seem to handle a null response too, let's just go with that instead.

Fixes #810

Signed-off-by: Anders Eknert <anders@styra.com>
@anderseknert anderseknert linked a pull request Jun 8, 2024 that will close this issue
charlieegan3 pushed a commit that referenced this issue Jun 10, 2024
While the specification isn't clear here, Neovim apparently had issues
dealing with the empty object response. And since all the other editors
seem to handle a null response too, let's just go with that instead.

Fixes #810

Signed-off-by: Anders Eknert <anders@styra.com>
srenatus pushed a commit to srenatus/regal that referenced this issue Oct 1, 2024
* Support ignore directives in aggregate rules

Also some light refactoring, but should hopefully not
be too distracting.

Fixes StyraInc#803

Signed-off-by: Anders Eknert <anders@styra.com>

* Return `null` in textDocument/diagnostic handler (StyraInc#812)

While the specification isn't clear here, Neovim apparently had issues
dealing with the empty object response. And since all the other editors
seem to handle a null response too, let's just go with that instead.

Fixes StyraInc#810

Signed-off-by: Anders Eknert <anders@styra.com>

---------

Signed-off-by: Anders Eknert <anders@styra.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working language server protocol
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant