You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
then the documentation is shown only in the minibuffer.
Steps to reproduce
Use for example gopls as a language server and open a Go file. gopls sends its hover responses as single strings.
Use nimlangserver and open a Nim file. nimlangserver sends its hover responses as an array of MarkedString
Expected behavior
lsp-mode should show hover responses using MarkedString[] as content in a pop-up.
Which Language Server did you use?
I used nimlangserver v1.6.0.
OS
Linux
Error callstack
No response
Anything else?
Also could you please explain how displaying the content of a textDocument/hover response works when being displayed as a pop-up as well as in the minibuffer, so I can get a better understanding of how lsp-mode works and maybe in the future contribute my own PR for issues like this?
The text was updated successfully, but these errors were encountered:
Also could you please explain how displaying the content of a textDocument/hover response works when being displayed as a pop-up as well as in the minibuffer, so I can get a better understanding of how lsp-mode works and maybe in the future contribute my own PR for issues like this?
I don't think lsp-mode has the popup for showing the hover. Are you using lsp-ui for that?
For how the textDocument/hover works in lsp-mode, you can search inside lsp-mode.el, there're 3 places (2 for describe thing at point, 1 for eldoc) that request that, and they will eventually call lsp--render-on-hover-content to display the content.
Yes, that is how far I understood it, but I couldn't really find how the pop-up is displayed in the end. But I think you're right this might potentially be a problem with lsp-ui. I'll take a look and maybe open a ticket over there.
Thanks! 👍
Thank you for the bug report
lsp-mode
related packages.M-x lsp-start-plain
Bug description
When a language server provides a
textDocument/hover
response with a single string as content like this:then the documentation is shown as a pop-up.
When a language server provides a
textDocument/hover
response with asMarkedString[]
like this:then the documentation is shown only in the minibuffer.
Steps to reproduce
gopls
as a language server and open a Go file.gopls
sends itshover
responses as single strings.nimlangserver
and open a Nim file.nimlangserver
sends itshover
responses as an array ofMarkedString
Expected behavior
lsp-mode
should showhover
responses usingMarkedString[]
as content in a pop-up.Which Language Server did you use?
I used
nimlangserver
v1.6.0.OS
Linux
Error callstack
No response
Anything else?
Also could you please explain how displaying the content of a
textDocument/hover
response works when being displayed as a pop-up as well as in the minibuffer, so I can get a better understanding of howlsp-mode
works and maybe in the future contribute my own PR for issues like this?The text was updated successfully, but these errors were encountered: