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

lsp-ui doesn't show pop-up for MarkedString[] by default #783

Closed
niontrix opened this issue Nov 28, 2024 · 1 comment
Closed

lsp-ui doesn't show pop-up for MarkedString[] by default #783

niontrix opened this issue Nov 28, 2024 · 1 comment

Comments

@niontrix
Copy link
Contributor

niontrix commented Nov 28, 2024

Hey folks!

I have an issue with lsp-ui not showing a pop-up on hover if the LSP sends its response as MarkedString[] instead of MarkedString or just a plain old string.
My example LSP send its hover response like this:

[Trace - 01:04:47 ] Received response 'textDocument/hover - (8)' in 10ms.
Result: {
  "contents": [
    {
      "value": "File: file:///home/someuser/diy-language-server/README.md, Characters: 302",
      "language": "markdown"
    }
  ]
}

Now, I found the variable lsp-ui-doc-include-signature which, when set to t, makes lsp-ui show the pop-up.
My questions now are:
Shouldn't this be the default behavior of lsp-ui? And what does this variable really mean / is used for? Why was it designed that way?

Thanks in advance!

KR, niontrix

Edit: The specific problem I have is with nimlangserver, which always returns its hover responses as MarkedString[] regardless if the symbol being hovered on actually includes further documentation or not. Is this the proper way to do things? I could not find any specific rules in the LSP spec about that.

@niontrix
Copy link
Contributor Author

I have created a PR that somewhat resolves the issue. 784

@niontrix niontrix closed this as completed Dec 4, 2024
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

1 participant