Skip to content

Note in README about conflicting prettier and prisma formatter #666

@carmenberndt

Description

@carmenberndt

The extension already sets the formatter for prisma files, but with the prettier extension installed as well, this sets the default formatter for all files, overwriting all other formatters unfortunately.

Workaround is mentioned here: prisma/prisma#1761 (comment)

Open VS Code Settings and set:

{
  "editor.formatOnSave": true,
  "[typescript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[typescriptreact]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  }
}

Alternative solution by @LeonardSSH

{
  "editor.formatOnSave": true,
  "[prisma]": {
    "editor.defaultFormatter": "Prisma.prisma"
  },
}

AC:

  • There is a section in the README that informs users about Prisma & Prettier incompatibility and workaround.

Metadata

Metadata

Assignees

Labels

kind/docsA documentation change is required.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions