lua-language-server
lua-language-server copied to clipboard
[Feature Request] Add support for color
I'm using EmmyLua to document different color's in a library. It would be nice if colors could be shown visually in VSCode. Perhaps allow a limited set of html tags?
https://stackoverflow.com/questions/35465557/how-to-apply-color-in-markdown
local Colors = {
--- <span style="color:#0000FF">Blue</span>
Blue = 2
--- <span style="color:#FF0000">Red</span>
Red = 3
}
Example

There is no way to achieve it at present
https://stackoverflow.com/questions/67749752/how-to-apply-styling-and-html-tags-on-hover-message-with-vscode-api
/**
* Indicates that this markdown string can contain raw html tags. Default to false.
*
* When `supportHtml` is false, the markdown renderer will strip out any raw html tags
* that appear in the markdown text. This means you can only use markdown syntax for rendering.
*
* When `supportHtml` is true, the markdown render will also allow a safe subset of html tags
* and attributes to be rendered. See https://github.com/microsoft/vscode/blob/6d2920473c6f13759c978dd89104c4270a83422d/src/vs/base/browser/markdownRenderer.ts#L296
* for a list of all supported tags and attributes.
*/
supportHtml?: boolean;
Currently the hover content is wrapped by ```lua block, it can not use html tags.