gtache / intellij-lsp

Plugin adding Language Server Protocol support for IntelliJ

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hover doesn't work as expected (always displaying something)

kirtilek opened this issue · comments

The implementation of Hover doesn't provide the same behaviour via plugin in Intellij IDEA as in native form in VS Code.
When there is no documentation to display (onHover() returns undefined), Intellij still displays something, usually it's documentation of the last symbol that really has it defined.

Keyword with documentation:
intellij_plus

Keyword without documentation:
intellij_nothing

I also tried to return just empty string (return { contents: "" };) instead of undefined, but that also doesn't work, because Intellij displays small blank documentation window:

intellij_blank

In VS Code both implementations work well - when there is no defined docomentation nothing is displayed. Is there a way how to make it work also in Intellij with this plugin or is it a bug that needs to be fixed?