Shopify / prettier-plugin-liquid

Prettier Liquid/HTML plugin
https://npm.im/@shopify/prettier-plugin-liquid
MIT License
93 stars 15 forks source link

disable tag attribute wraping #173

Closed ranapartap closed 1 year ago

ranapartap commented 1 year ago

Hay thanks for the hardwork

I am using the Shopify Liquid extenstion for VSCode in Windows 10. Mostly working good. I request you to please extend settigns some more.

Importantly when formatting the liquid files it wraps the html tags (eg: a, button etc.) into multiple lines. Seems its a default formatting setting. Not everyone want the tag wrapping. Like this :

Window-2023-03-15 17_43_24

Please add a setting to disable tag attribute wrapping, so it should format tags like this (instead of above style):

Window-2023-03-15 17_47_25

Thank you

charlespwd commented 1 year ago

You have two options:

  1. You can set the printWidth setting in your .prettierrc to a larger value (default 120 characters).
  2. You can disable it per tag by using the {% # prettier-ignore-attributes %} comment

Resources:

If you still feel that neither are acceptable, you are free to propose a configuration option for it (as per our opinionated principle). We would need to find that there's significant demand for this feature.