When you create models in prisma.schema file and it won't auto format after you hit save, steps below might help you:
1. "Prisma" extension
- Install "Prisma" extension by prisma.io. In my case, installing prisma alone did not work after I did the second step below.
2. In your VsCode Settings
- Go to the vscode setting and type in search the word "actions".
- On top, you will see "Editor: Code actions on save", click on the "Edit in settings.json".
- Just below the "editor.formatOnSaveMode", add the following configuration settings for the [prisma] section:
1"[prisma]": {
2 "editor.defaultFormatter": "Prisma.prisma",
3 "editor.formatOnSaveMode": "file"
4 },
5 "terminal.integrated.commandsToSkipShell": [
6 "\"[prisma]\": { \"editor.defaultFormatter\": \"Prisma.prisma\" }, "
7 ],
8
By following these steps and configuring your settings as outlined above, you should now have auto formatting enabled for Prisma on save in VSCode.