VS Code is stacking element attributes when I format HTML files. Is there any way to disable this?
The default setting for this is:
"html.format.wrapAttributes": "auto"
With "auto"
meaning:
Wrap attributes only when line length is exceeded.
The line length is defined in a different setting and defaults to 120
:
// Maximum amount of characters per line (0 = disable).
"html.format.wrapLineLength": 120
So setting "html.format.wrapLineLength"
to 0
should give you the desired behavior.
This worked for me. In your "Settings.json" file add the line
"prettier.printWidth": 300
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With