Created
March 6, 2023 14:35
-
-
Save ulziibat-n/bbfc3b0d3f6bd8a8017bb0366801492d to your computer and use it in GitHub Desktop.
Snippets - Shopify liquid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"for": { | |
"prefix": [ | |
"liquid", | |
"liquid-for" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% for ${1:item} in ${2:collection} %}", | |
" ${3:content}", | |
"{% endfor %}" | |
], | |
"description": "" | |
}, | |
"for (inline)": { | |
"prefix": [ | |
"liquid", | |
"liquid-for" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% for ${1:item} in ${2:collection} %}${3:content}{% endfor %}" | |
], | |
"description": "" | |
}, | |
"for (reversed)": { | |
"prefix": [ | |
"liquid", | |
"liquid-for" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% for ${1:item} in ${2:collection} reversed %}", | |
" ${3:content}", | |
"{% endfor %}" | |
], | |
"description": "" | |
}, | |
"for (reversed, inline)": { | |
"prefix": [ | |
"liquid", | |
"liquid-for" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% for ${1:item} in ${2:collection} reversed %}${3:content}{% endfor %}" | |
], | |
"description": "" | |
}, | |
"for (limit)": { | |
"prefix": [ | |
"liquid", | |
"liquid-for" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% for ${1:item} in ${2:collection} limit:${3:limit} %}", | |
" ${4:content}", | |
"{% endfor %}" | |
], | |
"description": "" | |
}, | |
"for (limit, inline)": { | |
"prefix": [ | |
"liquid", | |
"liquid-for" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% for ${1:item} in ${2:collection} limit:${3:limit} %}${4:content}{% endfor %}" | |
], | |
"description": "" | |
}, | |
"for (offset)": { | |
"prefix": [ | |
"liquid", | |
"liquid-for" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% for ${1:item} in ${2:collection} offset:${3:offset} %}", | |
" ${4:content}", | |
"{% endfor %}" | |
], | |
"description": "" | |
}, | |
"for (offset, inline)": { | |
"prefix": [ | |
"liquid", | |
"liquid-for" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% for ${1:item} in ${2:collection} offset:${3:offset} %}${4:content}{% endfor %}" | |
], | |
"description": "" | |
}, | |
"for (limit, offset)": { | |
"prefix": [ | |
"liquid", | |
"liquid-for" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% for ${1:item} in ${2:collection} limit:${3:limit} offset:${4:offset} %}", | |
" ${5:content}", | |
"{% endfor %}" | |
], | |
"description": "" | |
}, | |
"for (limit, offset, inline)": { | |
"prefix": [ | |
"liquid", | |
"liquid-for" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% for ${1:item} in ${2:collection} limit:${3:limit} offset:${4:offset} %}${5:content}{% endfor %}" | |
], | |
"description": "" | |
}, | |
"for (reversed, limit)": { | |
"prefix": [ | |
"liquid", | |
"liquid-for" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% for ${1:item} in ${2:collection} reversed limit:${3:limit} %}", | |
" ${4:content}", | |
"{% endfor %}" | |
], | |
"description": "" | |
}, | |
"for (reversed, limit, inline)": { | |
"prefix": [ | |
"liquid", | |
"liquid-for" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% for ${1:item} in ${2:collection} reversed limit:${3:limit} %}${4:content}{% endfor %}" | |
], | |
"description": "" | |
}, | |
"for (reversed, offset)": { | |
"prefix": [ | |
"liquid", | |
"liquid-for" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% for ${1:item} in ${2:collection} reversed offset:${3:offset} %}", | |
" ${4:content}", | |
"{% endfor %}" | |
], | |
"description": "" | |
}, | |
"for (reversed, offset, inline)": { | |
"prefix": [ | |
"liquid", | |
"liquid-for" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% for ${1:item} in ${2:collection} reversed offset:${3:offset} %}${4:content}{% endfor %}" | |
], | |
"description": "" | |
}, | |
"for (reversed, limit, offset)": { | |
"prefix": [ | |
"liquid", | |
"liquid-for" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% for ${1:item} in ${2:collection} reversed limit:${3:limit} offset:${4:offset} %}", | |
" ${5:content}", | |
"{% endfor %}" | |
], | |
"description": "" | |
}, | |
"for (reversed, limit, offset, inline)": { | |
"prefix": [ | |
"liquid", | |
"liquid-for" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% for ${1:item} in ${2:collection} reversed limit:${3:limit} offset:${4:offset} %}${5:content}{% endfor %}" | |
], | |
"description": "" | |
}, | |
"for (else)": { | |
"prefix": [ | |
"liquid", | |
"liquid-for" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% for ${1:item} in ${2:collection} %}", | |
" ${3:content}", | |
"{% else %}", | |
" ${4:content}", | |
"{% endfor %}" | |
], | |
"description": "" | |
}, | |
"for (else, inline)": { | |
"prefix": [ | |
"liquid", | |
"liquid-for" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% for ${1:item} in ${2:collection} %}${3:content}{% else %}${4:content}{% endfor %}" | |
], | |
"description": "" | |
}, | |
"for (else, reversed)": { | |
"prefix": [ | |
"liquid", | |
"liquid-for" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% for ${1:item} in ${2:collection} reversed %}", | |
" ${3:content}", | |
"{% else %}", | |
" ${4:content}", | |
"{% endfor %}" | |
], | |
"description": "" | |
}, | |
"for (else, reversed, inline)": { | |
"prefix": [ | |
"liquid", | |
"liquid-for" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% for ${1:item} in ${2:collection} reversed %}${3:content}{% else %}${4:content}{% endfor %}" | |
], | |
"description": "" | |
}, | |
"for (else, limit)": { | |
"prefix": [ | |
"liquid", | |
"liquid-for" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% for ${1:item} in ${2:collection} limit:${3:limit} %}", | |
" ${4:content}", | |
"{% else %}", | |
" ${5:content}", | |
"{% endfor %}" | |
], | |
"description": "" | |
}, | |
"for (else, limit, inline)": { | |
"prefix": [ | |
"liquid", | |
"liquid-for" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% for ${1:item} in ${2:collection} limit:${3:limit} %}${4:content}{% else %}${5:content}{% endfor %}" | |
], | |
"description": "" | |
}, | |
"for (else, offset)": { | |
"prefix": [ | |
"liquid", | |
"liquid-for" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% for ${1:item} in ${2:collection} offset:${3:offset} %}", | |
" ${4:content}", | |
"{% else %}", | |
" ${5:content}", | |
"{% endfor %}" | |
], | |
"description": "" | |
}, | |
"for (else, offset, inline)": { | |
"prefix": [ | |
"liquid", | |
"liquid-for" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% for ${1:item} in ${2:collection} offset:${3:offset} %}${4:content}{% else %}${5:content}{% endfor %}" | |
], | |
"description": "" | |
}, | |
"for (else, limit, offset)": { | |
"prefix": [ | |
"liquid", | |
"liquid-for" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% for ${1:item} in ${2:collection} limit:${3:limit} offset:${4:offset} %}", | |
" ${5:content}", | |
"{% else %}", | |
" ${6:content}", | |
"{% endfor %}" | |
], | |
"description": "" | |
}, | |
"for (else, limit, offset, inline)": { | |
"prefix": [ | |
"liquid", | |
"liquid-for" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% for ${1:item} in ${2:collection} limit:${3:limit} offset:${4:offset} %}${5:content}{% else %}${6:content}{% endfor %}" | |
], | |
"description": "" | |
}, | |
"for (else, reversed, limit)": { | |
"prefix": [ | |
"liquid", | |
"liquid-for" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% for ${1:item} in ${2:collection} reversed limit:${3:limit} %}", | |
" ${4:content}", | |
"{% else %}", | |
" ${5:content}", | |
"{% endfor %}" | |
], | |
"description": "" | |
}, | |
"for (else, reversed, limit, inline)": { | |
"prefix": [ | |
"liquid", | |
"liquid-for" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% for ${1:item} in ${2:collection} reversed limit:${3:limit} %}${4:content}{% else %}${5:content}{% endfor %}" | |
], | |
"description": "" | |
}, | |
"for (else, reversed, offset)": { | |
"prefix": [ | |
"liquid", | |
"liquid-for" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% for ${1:item} in ${2:collection} reversed offset:${3:offset} %}", | |
" ${4:content}", | |
"{% else %}", | |
" ${5:content}", | |
"{% endfor %}" | |
], | |
"description": "" | |
}, | |
"for (else, reversed, offset, inline)": { | |
"prefix": [ | |
"liquid", | |
"liquid-for" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% for ${1:item} in ${2:collection} reversed offset:${3:offset} %}${4:content}{% else %}${5:content}{% endfor %}" | |
], | |
"description": "" | |
}, | |
"for (else, reversed, limit, offset)": { | |
"prefix": [ | |
"liquid", | |
"liquid-for" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% for ${1:item} in ${2:collection} reversed limit:${3:limit} offset:${4:offset} %}", | |
" ${5:content}", | |
"{% else %}", | |
" ${6:content}", | |
"{% endfor %}" | |
], | |
"description": "" | |
}, | |
"for (else, reversed, limit, offset, inline)": { | |
"prefix": [ | |
"liquid", | |
"liquid-for" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% for ${1:item} in ${2:collection} reversed limit:${3:limit} offset:${4:offset} %}${5:content}{% else %}${6:content}{% endfor %}" | |
], | |
"description": "" | |
}, | |
"if": { | |
"prefix": [ | |
"liquid", | |
"liquid-if" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% if ${1:condition} %}", | |
" ${2:content}", | |
"{% endif %}" | |
], | |
"description": "" | |
}, | |
"if (inline)": { | |
"prefix": [ | |
"liquid", | |
"liquid-if" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% if ${1:condition} %}${2:content}{% endif %}" | |
], | |
"description": "" | |
}, | |
"if (else)": { | |
"prefix": [ | |
"liquid", | |
"liquid-if" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% if ${1:condition} %}", | |
" ${2:content}", | |
"{% else %}", | |
" ${3:content}", | |
"{% endif %}" | |
], | |
"description": "" | |
}, | |
"if (else, inline)": { | |
"prefix": [ | |
"liquid", | |
"liquid-if" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% if ${1:condition} %}${2:content}{% else %}${3:content}{% endif %}" | |
], | |
"description": "" | |
}, | |
"if (else, elsif)": { | |
"prefix": [ | |
"liquid", | |
"liquid-if" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% if ${1:condition} %}", | |
" ${2:content}", | |
"{% elsif ${3:condition} %}", | |
" ${4:content}", | |
"{% else %}", | |
" ${5:content}", | |
"{% endif %}" | |
], | |
"description": "" | |
}, | |
"if (else, elsif, inline)": { | |
"prefix": [ | |
"liquid", | |
"liquid-if" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% if ${1:condition} %}${2:content}{% elsif ${3:condition} %}${4:content}{% else %}${5:content}{% endif %}" | |
], | |
"description": "" | |
}, | |
"if (elsif)": { | |
"prefix": [ | |
"liquid", | |
"liquid-if" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% if ${1:condition} %}", | |
" ${2:content}", | |
"{% elsif ${3:condition} %}", | |
" ${4:content}", | |
"{% endif %}" | |
], | |
"description": "" | |
}, | |
"if (elsif, inline)": { | |
"prefix": [ | |
"liquid", | |
"liquid-if" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% if ${1:condition} %}${2:content}{% elsif ${3:condition} %}${4:content}{% endif %}" | |
], | |
"description": "" | |
}, | |
"if (elsif, else)": { | |
"prefix": [ | |
"liquid", | |
"liquid-if" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% if ${1:condition} %}", | |
" ${2:content}", | |
"{% elsif ${3:condition} %}", | |
" ${4:content}", | |
"{% else %}", | |
" ${5:content}", | |
"{% endif %}" | |
], | |
"description": "" | |
}, | |
"if (elsif, else, inline)": { | |
"prefix": [ | |
"liquid", | |
"liquid-if" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% if ${1:condition} %}${2:content}{% elsif ${3:condition} %}${4:content}{% else %}${5:content}{% endif %}" | |
], | |
"description": "" | |
}, | |
"if (elsif, elsif)": { | |
"prefix": [ | |
"liquid", | |
"liquid-if" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% if ${1:condition} %}", | |
" ${2:content}", | |
"{% elsif ${3:condition} %}", | |
" ${4:content}", | |
"{% elsif ${5:condition} %}", | |
" ${6:content}", | |
"{% endif %}" | |
], | |
"description": "" | |
}, | |
"if (elsif, elsif, inline)": { | |
"prefix": [ | |
"liquid", | |
"liquid-if" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% if ${1:condition} %}${2:content}{% elsif ${3:condition} %}${4:content}{% elsif ${5:condition} %}${6:content}{% endif %}" | |
], | |
"description": "" | |
}, | |
"if (elsif, elsif, else)": { | |
"prefix": [ | |
"liquid", | |
"liquid-if" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% if ${1:condition} %}", | |
" ${2:content}", | |
"{% elsif ${3:condition} %}", | |
" ${4:content}", | |
"{% elsif ${5:condition} %}", | |
" ${6:content}", | |
"{% else %}", | |
" ${7:content}", | |
"{% endif %}" | |
], | |
"description": "" | |
}, | |
"if (elsif, elsif, else, inline)": { | |
"prefix": [ | |
"liquid", | |
"liquid-if" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% if ${1:condition} %}${2:content}{% elsif ${3:condition} %}${4:content}{% elsif ${5:condition} %}${6:content}{% else %}${7:content}{% endif %}" | |
], | |
"description": "" | |
}, | |
"case": { | |
"prefix": [ | |
"liquid", | |
"liquid-case" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% case ${1:condition} %}", | |
" {% when ${2:condition} %}", | |
" ${3:content}", | |
" {% when ${4:condition} %}", | |
" ${5:content}", | |
" {% else %}", | |
" ${6:content}", | |
"{% endcase %}" | |
], | |
"description": "" | |
}, | |
"case (inline)": { | |
"prefix": [ | |
"liquid", | |
"liquid-case" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% case ${1:condition} %}{% when ${2:condition} %}${3:content}{% when ${4:condition} %}${5:content}{% else %}${6:content}{% endcase %}" | |
], | |
"description": "" | |
}, | |
"case (else)": { | |
"prefix": [ | |
"liquid", | |
"liquid-case" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% case ${1:condition} %}", | |
" {% when ${2:condition} %}", | |
" ${3:content}", | |
" {% when ${4:condition} %}", | |
" ${5:content}", | |
" {% else %}", | |
" ${6:content}", | |
"{% endcase %}" | |
], | |
"description": "" | |
}, | |
"case (else, inline)": { | |
"prefix": [ | |
"liquid", | |
"liquid-case" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% case ${1:condition} %}{% when ${2:condition} %}${3:content}{% when ${4:condition} %}${5:content}{% else %}${6:content}{% endcase %}" | |
], | |
"description": "" | |
}, | |
"case (when)": { | |
"prefix": [ | |
"liquid", | |
"liquid-case" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% case ${1:condition} %}", | |
" {% when ${2:condition} %}", | |
" ${3:content}", | |
" {% when ${4:condition} %}", | |
" ${5:content}", | |
"{% endcase %}" | |
], | |
"description": "" | |
}, | |
"case (when, inline)": { | |
"prefix": [ | |
"liquid", | |
"liquid-case" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% case ${1:condition} %}{% when ${2:condition} %}${3:content}{% when ${4:condition} %}${5:content}{% endcase %}" | |
], | |
"description": "" | |
}, | |
"unless": { | |
"prefix": [ | |
"liquid", | |
"liquid-unless" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% unless ${1:condition} %}", | |
" ${2:content}", | |
"{% endunless %}" | |
], | |
"description": "" | |
}, | |
"unless (inline)": { | |
"prefix": [ | |
"liquid", | |
"liquid-unless" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% unless ${1:condition} %}${2:content}{% endunless %}" | |
], | |
"description": "" | |
}, | |
"unless (else)": { | |
"prefix": [ | |
"liquid", | |
"liquid-unless" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% unless ${1:condition} %}", | |
" ${2:content}", | |
"{% else %}", | |
" ${3:content}", | |
"{% endunless %}" | |
], | |
"description": "" | |
}, | |
"comment": { | |
"prefix": [ | |
"liquid", | |
"liquid-comment" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% comment %}", | |
" ${1:content}", | |
"{% endcomment %}" | |
], | |
"description": "" | |
}, | |
"comment (inline)": { | |
"prefix": [ | |
"liquid", | |
"liquid-comment" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% comment %}${1:content}{% endcomment %}" | |
], | |
"description": "" | |
}, | |
"capture": { | |
"prefix": [ | |
"liquid", | |
"liquid-capture" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% capture ${1:variable} %}", | |
" ${2:content}", | |
"{% endcapture %}" | |
], | |
"description": "" | |
}, | |
"capture (inline)": { | |
"prefix": [ | |
"liquid", | |
"liquid-capture" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% capture ${1:variable} %}${2:content}{% endcapture %}" | |
], | |
"description": "" | |
}, | |
"assign": { | |
"prefix": [ | |
"liquid", | |
"liquid-assign" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% assign ${1:variable} = ${2:content} %}" | |
], | |
"description": "" | |
}, | |
"increment": { | |
"prefix": [ | |
"liquid", | |
"liquid-increment" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% increment ${1:variable} %}" | |
], | |
"description": "" | |
}, | |
"decrement": { | |
"prefix": [ | |
"liquid", | |
"liquid-decrement" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% decrement ${1:variable} %}" | |
], | |
"description": "" | |
}, | |
"echo": { | |
"prefix": [ | |
"liquid", | |
"liquid-${" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{{ ${1:content} }}" | |
], | |
"description": "" | |
}, | |
"liquid": { | |
"prefix": [ | |
"liquid", | |
"liquid-liquid" | |
], | |
"scope": "liquid", | |
"body": [ | |
"{% liquid", | |
" ${1:content}", | |
"%}" | |
], | |
"description": "" | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment