GingerBear / vscode-liquid

vscode liquid language support
MIT License
27 stars 9 forks source link

*Request* support scss.liquid and css.liquid files #17

Open ronthedrummer opened 5 years ago

ronthedrummer commented 5 years ago

Currently, the extension only works on HTML within a liquid file. Would like to see support for style blocks within HTML files and liquid syntax highlighting for stand-alone stylesheet files (.css.liquid, .scss.liquid).

ronthedrummer commented 5 years ago

Example of what is currently seen in a *.css.liquid file.

Screen Shot 2019-04-12 at 9 58 59 AM

panoply commented 5 years ago

@UncleRemus Support for this is available in the vs-code extension.

its-me-VOID commented 4 years ago

@panoply are you sure that https://github.com/panoply/vscode-liquid support scss.liquid and css.liquid files ? in the documentation they first claim that they support. *. liquid, but in the next paragraph they warn that it is dangerous to use them for these types of files and recommends disabling them for all except .liquid (html). worse still it does not support script and style tags in html.

panoply commented 4 years ago

That's incorrect. I maintain the project.

You will need to disable code validations as Liquid is not apart of CSS or SCSS (they are completely different languages) and yes you should avoid writing Liquid infused with CSS/SCSS as if you architect you application correctly you shouldn't really need to do that. In terms of <script> and <style> tags that refers only to formatting when Liquid code is found present within said HTML tags, which again you should avoid because it's hacky.

However, syntax highlighting is supported in those languages for Liquid. Additionally, so is Liquid within script and style tags, formatting is not.

its-me-VOID commented 4 years ago

Hi @panoply Okay, I wish I was wrong about this extension that you maintain. But I'm totally confused about what she can do and what she can't . I just installed it, can you please explain to me clearly what it does and what it does not (.liquid / .scss.liquuid / .js.liquid ...) (formating / syntax highlinting / validation ...), I have a hard time understanding documentation as it contains contradictions. anyway, Thank you for your response and the time invested in developing this extension. PS: the inclusion of the liquid code in the .scss and style is mandatory, as we are developing themes that the end user must be able to customize through a GUI and the user settings are mapped through liquid to the. scss.liquid or style tags. Also inclusion of the liquid in the tags script is inevitable in for example the data structured json-ld (you can't hard code these strings).

panoply commented 4 years ago

Hey @Ben-Abbes probably best to move this conversation away from this repository as the extension grammar here is suited for the standard variation of Liquid and whereas the grammar and extension I maintain covers multiple variations (Shopify, Jekyll etc).

From what you are communicating here, it seems you are having trouble understanding some terminologies. Here is a brief breakdown of what the current version of the extension I maintain does:

  1. Supports Liquid syntax highlighting in multiple languages, so you will get support in HTML, CSS, SCSS and JavaScript languages.
  2. Supports Liquid formatting in HTML, which means it will beautify Liquid contained in HTML, additionally it will format/beautify <script>, <style>, {% schema %}, {% style %} etc tags.
  3. Supports HTML validations and completion features.

Feel free to open an issue in the repository, so as to avoid creating noise here for the maintainer.