Currently, diagnostic messages do not carry any formatting information, this forces clients to be conservative when displaying them, see microsoft/vscode#22239 and the proposed solution:
Going forward. Deprecate the current way diagnostics are rendered and make them work just like the regular hover: a Markdown string which defaults to a non-monospace font but still lets language feature providers open up monospace code blocks with triple back quotes.
Currently, diagnostic messages do not carry any formatting information, this forces clients to be conservative when displaying them, see microsoft/vscode#22239 and the proposed solution: