Nader's Daily Blog
Welcome to Every Developers favorite blog in the Devosphere

New product features | The latest in technology | The weekly debugging nightmares & more!

Format prisma schema with prettier

Format prisma schema with prettier

July 25, 2023

Nader Elmahdy

Nader Elmahdy

Take my knowledge and shove it up your brain...

This little trick will make your life easier

Prisma

By default when you type some code, and you hit ctrl + s, your code gets formatted automatically, but that's not the case with Prisma.


To enable formatting Prisma schema hit ctrl + shift + p

type settings and select user settings (JSON)

Then add the following line in your settings file:

settings.json

1"[prisma]": {
2    "editor.defaultFormatter": "Prisma.prisma"
3  },

And that's it!