Skip to content

formatOnSave conflicts with Prettier extention #691

@peps

Description

@peps

Bug description

When "editor.formatOnSave": true and both Prettier and Prisma vscode extensions are enabled, it causes vscode to hang when a file is saved.

The file is never saved, and the following message is displayed: Saving 'myfilename.ts': Running 'Prettier - Code formatter' Formatter.

If I disable the Prisma extension everything works fine with Prettier.

This also happens on every file in my project, not just the .prisma file.

How to reproduce

  1. Install Prettier and Prisma vscode extensions
  2. Set "editor.formatOnSave": true
  3. Save any file

Expected behavior

  • The Prisma extension should play nice with Prettier,
  • or offer the option to disable formatOnSave just for .prisma files.
  • or just formatOnSave within .prisma files, ignorning other filetypes.

Environment & setup

  • OS: Windows
  • Editor: VSCode
  • Editor version: 1.52.1
  • Extension version: 2.15.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions