I have a long text in p tag and Prettier splits the text in this tag to multiple lines. I have 'word wrap' enabled.
How can I stop this from happening?
I have a long text in p tag and Prettier splits the text in this tag to multiple lines. I have 'word wrap' enabled.
How can I stop this from happening?
Prettier is opinionated, it has only limited number of options. If you couldn’t find what you want in https://prettier.io/docs/en/options.html, so it’s not supported.
In general, better to accept Prettier behavior instead of fight against it. The reformatting, that prettier does, doesn’t harm.
You can try to increase width.
1. Strech VS Code Window
Simply stretch/widen your VS code window and it'll get "fixed":
2. Change Print Width
As you can see from 1, it's not a real problem.
You can however also experiment with adjusting Prettier Print Width.
Manage > Settings
Prettier: Print Width
to change it.