killalau / vscode-liquid-snippets

Shopify Liquid Template Snippets
MIT License
26 stars 21 forks source link

Can we get the new section schema tags please #10

Closed ConduciveMammal closed 5 years ago

ConduciveMammal commented 6 years ago

I'm wondering if the new section schema tags can be added?

Maybe also some larger code expansion on the {% schema %} tag where it expands with some default schema?

{% schema %}
{
   "name": "section",
   "settings": [],
   "blocks": [],
   "presets": [],
}
{% endschema %{
killalau commented 6 years ago

What if we have 3 sets of schema tag, schema, schema-empty and schema-locales. And also we have stylesheet and stylesheet-scss. I've a long time didn't code with liquid, not sure if this help.

// schema
{% schema %}
{
   "name": "section",
   "settings": [],
   "blocks": [],
   "presets": [],
   "default": {}
}
{% endschema %}

// schema-empty
{% schema %}
{}
{% endschema %}

// schema-locales
{
   "locales": {
      "en": {
        "title": "Welcome"
      }
   }
}

// stylesheet
{% stylesheet %}
{% endstylesheet %}

// stylesheet-scss
{% stylesheet 'scss' %}
{% endstylesheet %}
panoply commented 5 years ago

I’ve got a PR that provides simple snippets for this if anyone can merge, that would be great. Thanks.

killalau commented 5 years ago

merged with little modification.

panoply commented 5 years ago

Thanks @killalau! You're a legend.