intellij-latte icon indicating copy to clipboard operation
intellij-latte copied to clipboard

Code style - support continuation indent

Open khorsky opened this issue 4 years ago • 1 comments

Is your feature request related to a problem? Please describe. In case I have more tag (or n:tag) attributes, sometimes I keep attributes on separate lines (better overview, better diffs etc.).

"Reformat code" action with latte plugin activated, I'm not able to configure expected result. In PHP/HTML/Twig code style configuration I can use "Continuation indent" property, that is not available here.

Describe the solution you'd like

  • add configuration option "Continuation indent"
  • use option when reformatting code

Expected result

<p>
  <a
    href="#"
    class="foo"
  >
    test
  </a>
</p>

Current result

<p>
  <a
      href="#"
      class="foo"
  >
    test
  </a>
</p>

There is no pleasure to work with latte templates using tabs with 4 spaces (my case) anymore... :-)

khorsky avatar May 13 '21 07:05 khorsky

@khorsky you can use a workaround until this will be implemented.

For now, you have to format these arguments manually. And after this do not use reformat to the whole file, but only for selection (for the code you are editing). This will prevents unwanted formatting.

mesour avatar May 20 '21 17:05 mesour