panoply / vscode-liquid

💧Liquid language support for VS Code
https://marketplace.visualstudio.com/items?itemName=sissel.shopify-liquid
Other
171 stars 23 forks source link

Formatter forces a newline before closing tags #193

Open ijlind opened 1 month ago

ijlind commented 1 month ago

I'm migrating a 11ty project from nunjucks to liquid and I'm using this plugin for formatting. For some reason though, this plugins formatter will force the closing tags of HTML content to always be on a new line. Is there a config I'm missing?

For example:

<section class="default-container prose">
  <h1>Main Header</h1>
  ...
</section>

→ Will become

<section class="default-container prose">
  <h1>Main Header
  </h1>
  ...
</section>

and

<ul>
  <li>Item 1</li>
  <li>Item 2</li>
  ...
</ul>

→ Will become

<ul>
  <li>Item 1
  </li>
  <li>Item 2
  </li>
  ...
</ul>

I'd understand moving the closing tag to a new line if the tag content would also be on a separate line e.g.


<h1 class="some heading classes">
  This is a really long heading 
</h1>```