visual-studio-codeprettierprettier-vscode

VS Code: Prettier splits paragraph text to multiple lines


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?

Before Save: long text enclosed in p tag before save

After Save: long text split into multiple lines after save


Solution

  • 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.