panoply / vscode-liquid

💧Liquid language support for VS Code
https://marketplace.visualstudio.com/items?itemName=sissel.shopify-liquid
Other
173 stars 22 forks source link

Incorrect comment highlighting #137

Closed davidwarrington closed 1 year ago

davidwarrington commented 1 year ago

It's not often I see a Shopify theme that actually supports article comments but I did stumble across one today which had a loop like this

{% for comment in article.comments %}
  //...
{% endfor %}

Everything after comment in the opening tag was highlighted as if it were a code comment until the schema, which was interesting. The schema was still highlighted but the text became italic, as if the comment styles for my theme were only partially applied.

I quite like the fact that the schema still has syntax highlighting inside the comment blocks so I'm not too fussed about that, even if it shouldn't have.

Another issue with subsequent code being considered comment content is that autocompletions don't seem to work inside comment blocks.

https://user-images.githubusercontent.com/9138568/207418028-bc7b1b20-8451-4430-8683-b35e0ee9a542.mov

Here's a video to demonstrate in case that helps. Hope it doesn't take too much energy to get through my 100 attempts at typing article.comments 👀

panoply commented 1 year ago

Good find, this is related to #125 which I thought to have fixed but it seems to persist in different structures. Will get onto it asap.

panoply commented 1 year ago

Solved in #138