lua-language-server icon indicating copy to clipboard operation
lua-language-server copied to clipboard

[Feature Request] Add support for color

Open lunarwtr opened this issue 3 years ago • 4 comments

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
}

lunarwtr avatar Mar 20 '22 17:03 lunarwtr

Example image image

lunarwtr avatar Mar 20 '22 17:03 lunarwtr

There is no way to achieve it at present

sumneko avatar Jun 30 '22 16:06 sumneko

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;

lunarwtr avatar Jul 03 '22 18:07 lunarwtr

Currently the hover content is wrapped by ```lua block, it can not use html tags.

sumneko avatar Jul 04 '22 12:07 sumneko