panoply / vscode-liquid

đŸ’§Liquid language support for VS Code
https://marketplace.visualstudio.com/items?itemName=sissel.shopify-liquid
Other
171 stars 23 forks source link

Bug in Liquid Tags syntax highlighting - lost texmate scopes granularity #178

Open muchisx opened 8 months ago

muchisx commented 8 months ago

After the new update most tags haven't been able to be associated with their scope identity.

Most of them are being associated with just entity.name.tag.other.liquid when in the past we had granularity (so we can edit how each token looks by color and text style etc..)

for example. the ones under ITERATION used to be entity.name.tag.iteration.liquid

Here's a test

image

{% # ---------------------- VARIABLE %}

{% # assign %}
{% assign variable_name = value %}

{% # capture %}
{% capture variable %}
  value
{% endcapture %}

{% # decrement %}
{% decrement variable_name %}

{% # increment %}
{% increment variable_name %}

{% # ---------------------- CONDITIONAL %}

{% # unless %}
{% unless condition %}
  test
{% endunless %}

{% # case %}
{% case variable %}
  test
  {% when condition %}
  test
  {% else %}
{% endcase %}

{% # if %}
{% if condition %}
  test
  {% elsif condition2 %}
  test  
  {% else %}
  test
{% endif %}

{% # ---------------------- HTML %}

{% # form %}
{% form 'name', product %}
{% endform %}

{% # style %}
{% style %}
  div {
    color: blue;
  }
{% endstyle %}

{% # ---------------------- ITERATION %}

{% # for %}
{% for item in collection %}
  {% break %}
  {% continue %}
  {% else %}
  {% cycle 'odd', 'even' %}
{% endfor %}

{% # tablerow %}
{% tablerow variable in array %}
  expression
{% endtablerow %}

{% # paginate %}
{% paginate array by page_size %}
  {% for item in array %}
    forloop_content
  {% endfor %}
{% endpaginate %}

{% # ---------------------- SYNTAX %}

{% # comment %}
{% comment %}
  content
{% endcomment %}

{% # echo %}
{{ variable }}
{% liquid
  echo variable
%}

{% # liquid %}
{% liquid
  assign message = ''
%}

{% # raw %}
{% raw %}
  {{ 2 | plus: 2 }} equals 4.
{% endraw %}

{% # ---------------------- THEME %}

{% # include %}
{% include 'filename' %}

{% # layout %}
{% layout name %}

{% # render %}
{% render 'filename' %}

{% # section %}
{% section 'filename' %}

{% # sections %}
{% sections 'name' %}

{% # stylesheet %}
{% stylesheet %}
  div {
    color: blue;
  }
{% endstylesheet %}

{% # javascript %}
{% javascript %}
  const test = 'test'  
{% endjavascript %}
panoply commented 8 months ago

Interesting, I cannot re-create on my end. No changes applied to scopes, test cases passed. Looking into this now.

muchisx commented 8 months ago

@panoply I have a vscode profile with only Liquid extension and I can still replicate, would you like me to do a different test?