Skip to content

Conversation

@farhaven
Copy link
Contributor

@farhaven farhaven commented Apr 29, 2025

The Dart LSP insists on getting the invocation kind for completions, and on the diagnostics for the "Format" code action to be empty, but not null.

Dart's LS sends hover help responses as the deprecated protocol.MarkedString instead of protocol.MarkupContent.

This requires a tweak to the generated LSP protocol code as well, so it should probably be merged after the generated code has been updated and the replace override in go.mod has been removed.

The Dart LSP insists on getting the invocation kind for completions,
and on the diagnostics for the "Format" code action to be empty,
but _not_ `null`.

Dart's LS sends hover help responses as the deprecated
protocol.MarkedString instead of protocol.MarkupContent.

This requires [a tweak to the generated LSP protocol code](9fans/go-lsp-internal#4) as well.
@cptaffe
Copy link
Contributor

cptaffe commented Jul 7, 2025

I believe I ran into this issue today with jdtls:

2025/07/07 18:50:12 jsonrpc2: code -32603 message: json: cannot unmarshal array into Go struct field Hover.contents of type protocol.MarkupContent

I think this explains why I haven't seen javadoc snippets in hov output.

After applying this patch, updating the go-lsp to the version including your change, and removing the replace override (see this commit), it works!

Screenshot 2025-07-07 at 19 08 53

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.

2 participants