Skip to content

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

@niontrix

Description

@niontrix

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions