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

textDocument/hover responses are blank and not plaintext #543

Closed
mattmassicotte opened this issue Mar 15, 2022 · 6 comments
Closed

textDocument/hover responses are blank and not plaintext #543

mattmassicotte opened this issue Mar 15, 2022 · 6 comments

Comments

@mattmassicotte
Copy link
Contributor

Hello! Running 0.44.3.

My client is registered for hover with contentType = plaintext. But, the server is seems to always reply with kind = markdown. Not a huge deal, but thought I'd report it.

I'm also noticing that it seems to be very frequently blank, with an empty string for value. Is that how Solargraph communicate that it has no data?

@castwide
Copy link
Owner

Confirmed. I should be able to make the server return plaintext when configured to do so, although the text is likely to contain markdown/rdoc/whatever annotation exists in the original documentation.

An empty string for hover content typically means that there's no documentation available.

@mattmassicotte
Copy link
Contributor Author

Ok this makes sense, thank you!

Other servers seem to return "null" for Hover when they have no information, which is allowed by the spec. I think that may be worth considering.

Not knowing the format is a tricky one. But, don't think the server should misrepresent the content. If you cannot guarantee plaintext, I think the current behavior may be best.

@castwide
Copy link
Owner

castwide commented Aug 7, 2022

The next release will return null instead of an empty string for blank hovers.

@mattmassicotte
Copy link
Contributor Author

That's great, thank you!

@castwide
Copy link
Owner

Released in version 0.46.0.

@castwide
Copy link
Owner

castwide commented Sep 5, 2022

Version 0.47.0 will make one more related change. Instead of a null Hover.contents.value property, the textDocument/Hover message will return a null Hover object. See #583

@castwide castwide closed this as completed Sep 5, 2022
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

No branches or pull requests

2 participants