LSP code completion UI doesn't render documentation

Hi again,

the completion pop-up doesn’t render the documentation provided ion the LSP response markdown and only shows the first line, but even this is only rendered as plain text and not md, making it both look wrong and not very helpful:

Screenshot 2024-03-31 at 12.24.29

from response

Lua Language Server[12:25:29.014000] Received JSON-RPC response: number(60) completionItem/resolve
{
  "result" : {
    "kind" : 3,
    "data" : {
      "uri" : "file:\/\/\/Users\/olifink\/Courses\/pickaxe\/others\/hello.lua",
      "id" : 11
    },
    "insertTextFormat" : 2,
    "label" : "print(...)",
    "sortText" : "0001",
    "insertText" : "print",
    "detail" : "function",
    "documentation" : {
      "value" : "```lua\nfunction print(...any)\n```\n\n---\n\n\nReceives any number of arguments and prints their values to `stdout`, converting each argument to a string following the same rules of [tostring](http:\/\/www.lua.org\/manual\/5.4\/manual.html#pdf-tostring).\nThe function print is not intended for formatted output, but only as a quick way to show a value, for instance for debugging. For complete control over the output, use [string.format](http:\/\/www.lua.org\/manual\/5.4\/manual.html#pdf-string.format) and [io.write](http:\/\/www.lua.org\/manual\/5.4\/manual.html#pdf-io.write).\n\n\n[View documents](http:\/\/www.lua.org\/manual\/5.4\/manual.html#pdf-print)",
      "kind" : "markdown"
    }
  },
  "id" : 60,
  "jsonrpc" : "2.0"
}

Ah, good call. I’m not sure we’d seen any servers in the wild that actually took advantage of this yet. I’ll see if we can consider support for this in the next major release milestone.

Actually it’s been brought up several times already, and this issue lists all related mentions I found: Hover information missing syntax highlighting · Issue #11 · laosb/SvelteNova · GitHub

Anyway, looking forward to see this supported!

also in the same context, it appears that links rendered in the markdown for the documentation as response from a textDocument/hover request are not handled at all and do not seem to trigger anything (open browser or preview tab would make sense here)