VS code will ask you the first time but if you make the wrong choice or want to change it, here's how you change it:
- Access the Command Palette by pressing Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (Mac).
- Type and select "Format Document With..." from the command palette.
- At the bottom of the list, click on "Configure Default Formatter...".
To test, on a file use Alt-Shift-F to format.
Note for Vue: Use "Vue Official", it works better than Prettier.
To format on save, follow these steps:
- Open VS code settings (key command:
Ctrl + ,
- Search for "format on save"
- Check to box to format on save, and choose "Format on Save Mode: modifications"