vscode-liquid
vscode-liquid copied to clipboard
Any liquid.setting is seen as an error
I have some Liquid tags in my
<style> #bar-container { position: relative; top: 65px; z-index: 5; width: 100%; background-color: {{ section.settings.announcement_bg }} ; /* Having the BG color available in the customizer */ height: 40px; display: flex; align-items: center; font-size: 14px; } </style>
The {{ section.settings.announcement_bg }}
gives the error: "property value expected".
Any way of ignoring these errors?
Hey @Jordakoes,
This is being caused because vscode is validating the <style>
tag and does not understand Liquid, you can disable validation on scripts and styles if you are infusing Liquid with those languages, add these settings to your vscode workspace settings file:
{
"html.validate.scripts": false,
"html.validate.styles": false
}
Hi,
Will this not cause all scripts and styles to be ignored, eg not checked? I don’t want my code editor to ignore all errors, just the ones where I infuse Liquid in Style, HTML or Script tags.
Cheers, Jordi
On 4 Jan 2021, at 16:55, cаввидис [email protected] wrote:
Hey @Jordakoes https://github.com/Jordakoes,
This is being caused because vscode is validating the
{ "html.validate.scripts": false, "html.validate.styles": false } — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/panoply/vscode-liquid/issues/65#issuecomment-754056746, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIMZ2YO3FTYHREGJZIJ3I23SYHQIDANCNFSM4VTFBQWQ.
I'm getting the same issue with script and style tags in theme.liquid. Declaration or statement expected
Hey @Jordakoes,
This is being caused because vscode is validating the
<style>
tag and does not understand Liquid, you can disable validation on scripts and styles if you are infusing Liquid with those languages, add these settings to your vscode workspace settings file:{ "html.validate.scripts": false, "html.validate.styles": false }
and on a .liquid file ? 🧐
Odd cause I swear I used to not have this problem with this extension a year or so ago? Am I trippin'?
@james0r If you are tripping, so am I. :)
Anyway - the workaround described by @haroldao worked for me as well. :)
🚢 Shipped v3.0.0