runem / vscode-lit-plugin

⚠️ Moved to monorepo: lit-analyzer/vscode-lit-plugin ⚠️
https://github.com/runem/lit-analyzer/tree/master/packages/vscode-lit-plugin
28 stars 2 forks source link

Add support to the HTML tooltips and highlight #6

Closed abdonrd closed 5 years ago

abdonrd commented 5 years ago

The tooltip doesn't work. Also the HTML tags highlight doesn't work when you set the cursor on a tag.

feb-23-2019 00-18-41

runem commented 5 years ago

This seems like a regression because it should work and it works fine for me. I would help me a lot to see your "tsserver.log" again after triggering the problem 👍

Here's what I see: 4eely-3snnb

abdonrd commented 5 years ago

Here it is! tsserver.log

runem commented 5 years ago

Thanks a lot! I'll look into it later today :-)

runem commented 5 years ago

I was able to reproduce it :tada: I know what's wrong and I'll fix it later this week when I ship an improved custom element parser which is much more resilient (and also takes care of parsing custom elements using static get observedAttributes / static get properties). In addition I'm working on setting up tests so we won't see these kinds of regressions again :+1:

While I work on a fix you can fix it locally by inserting if (node == null) return; on line 148 of ~/.vscode/extensions/runem.lit-plugin-0.1.1/node_modules/ts-lit-plugin/lib/parsing/parse-components/flavors/lit-element-flavor.js or reverting to version 0.1.0 of the plugin.

runem commented 5 years ago

@abdonrd I had some time to publish a fix. You should be able to upgrade the plugin to version 0.1.2 now. Please tell me if anything isn't working as expected and thanks for reporting the bug! :-)

abdonrd commented 5 years ago

Thanks @runem! Now the tooltip works! 🎉

But the highlight still doesn't work. Also the collapse option (on the line number) doesn't work. But maybe this is another issue?

runem commented 5 years ago

Great!

I'm not sure if its possible for a plugin to do highlighting and code-collapse but I'll gladly look into it. I think they should be two different issues labeled as feature requests. You are very welcome to open them or else I'll open them later today.

abdonrd commented 5 years ago

I understand that yes it should be possible: https://github.com/mjbvz/vscode-lit-html/issues/35

runem commented 5 years ago

Thanks for the heads up! I'll look into it when I have time 👍 Right now I'm working on improving the component parser which I'm expecting to be finished within a week :-)

runem commented 5 years ago

Related: #9

abdonrd commented 5 years ago

Sounds great, thanks @runem!