Search code examples
visual-studio-codeprettier

How to make "Prettier" the default formatter in VS Code?


I've installed Prettier extension in VS Code, and when I attempt to format a file, VS Code asked me:

Do you want to format with the default formatter or with prettier formatter?

I accidentally chose the default formatter. How can I change this to format with Prettier as default?


Solution

  • Don't know why but setting Default Formatter to ebsenp.prettier didn't work for me. But I found a similar command that worked.

    1. ctrl + shift + p
    2. Format document with
    3. Configure default formatter
    4. Choose prettier