First, this brings the quick info hover closer in terms of the expected styled look (see gif below). I will point out this is not exactly the same look; I re-used ts.QuickInfo.displayParts within translateHover as pushing lang-specific markdown into ts.QuickInfo.documentation did not give the same look. If this is the wrong approach, let me know and I can adjust.
Second, there was an issue where the first property rule would also return the <style> tag itself:
I am not 100% certain why this occurs to begin with; the hover.contents that are returned from cssLanguageService.doHover() have the style tag in it, though that's not the behavior I see when working in a regular html file. To work around that, I added a check to remove that <style> and any newline/spaces (you can see the fix in action in the gif above as well).
This addresses https://github.com/mjbvz/vscode-lit-html/issues/37 and another bug I found in the process.
First, this brings the quick info hover closer in terms of the expected styled look (see gif below). I will point out this is not exactly the same look; I re-used
ts.QuickInfo.displayParts
withintranslateHover
as pushing lang-specific markdown intots.QuickInfo.documentation
did not give the same look. If this is the wrong approach, let me know and I can adjust.Second, there was an issue where the first property rule would also return the
<style>
tag itself:I am not 100% certain why this occurs to begin with; the
hover.contents
that are returned fromcssLanguageService.doHover()
have the style tag in it, though that's not the behavior I see when working in a regular html file. To work around that, I added a check to remove that<style>
and any newline/spaces (you can see the fix in action in the gif above as well).