On HTML (in our case, Angular Component html), auto formatter (ALT + SHIFT + F on windows) does not wrap attributes to new line even if the param is set to force in settings.
Steps to Reproduce:
"html.format.wrapAttributes": "force" in user settings<button class="btn btn-secondary custom-btn" (click)="myGreatAndSuperMethod.show();" title="The very long title of my button" type="button">
<i class="fa fa-refresh" aria-hidden="true"></i>
</button>
It doesn't wrap attributes. I expected to have:
<button class="btn btn-secondary custom-btn"
(click)="myGreatAndSuperMethod.show();"
title="The very long title of my button"
type="button">
<i class="fa fa-refresh" aria-hidden="true"></i>
</button>
Worst, if HTML has already wrapped attributes, it replace them on the same line.
Is the setting still used?
I tried your example in 1.11.2 and I get
<button class="btn btn-secondary custom-btn"
(click)="myGreatAndSuperMethod.show();"
title="The very long title of my button"
type="button">
<i class="fa fa-refresh" aria-hidden="true"></i>
</button>
Can you start code with code --disable-extensions to see if this is caused by a extension?
Also check if there are any html related settings such as "html.format.enable": false,
"html.format.unformatted" containing 'button' that could cause this.
I uninstall extension: Beautify and then "wrapAttributes": "force-aligned" works.
Ok, running without extension solved the problem. So I'll try to re-enable them one by one. Thanks for help.
Most helpful comment
I uninstall extension: Beautify and then "wrapAttributes": "force-aligned" works.