Language Server: Markdown not rendering properly

A point of clarification: My TypeScript extension does use an LSP conformant language server, through Nova’s standard LanguageClient as officially supported. It does sit on top of tsserver, but from Nova and my extension’s perspective it’s a standard language server (it’s even listed here Language Servers).


GitHub - apexskier/nova-json-language-server: Advanced JSON support for Nova also uses the LSP. When originally working on it, I ran into issues in tooltips.

Previously, newlines in these hover descriptions had \ escape characters shown, sort of like you can see in LSP tooltip Markdown support. The Nova devs fixed this (pre dev forums), but I suspect it was a JSON parsing issue and that full markdown support wasn’t really added. From my testing just now, markdown in this LSP based doesn’t work, adding another reproduction of the issues in this thread.

JSON LSP no markdown formatting


I think the magic of my TypeScript extension’s formatting might the difference between descriptions and type signature information, as in the following screenshot:

type signature hover example

I suspect that’s coming from SignatureInformation, and Nova’s applying custom handling and formatting. The misformatted markdown comes from Hover.contents.

I also suspect Nova is ignoring descriptions when signature information is shown. For instance, this kind property has comment docs which should be piped through into the hover description of the symbol through SignatureInformation.documentation. (“The kind of this symbol”).

doc comment for symbol

I’d expect Nova to display the associated documentation like this:

1 Like