# Stop formatting SQL by default with prettier \(\#32268\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/899153d9a4f39a1356b2732c7805c33e8fea2529)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 899153d9a4f39a1356b2732c7805c33e8fea2529

Requested commit: 899153d9a4f39a1356b2732c7805c33e8fea2529

Commit: 899153d9a4f39a1356b2732c7805c33e8fea2529

Tree: effc8761496c007f57384b9faf43a7efb5f30460

Author: Peter Tripp

Committer: GitHub

## Message

```
Stop formatting SQL by default with prettier (#32268)

- Closes: https://github.com/zed-industries/zed/discussions/32261
- Follow-up to: https://github.com/zed-extensions/sql/pull/19
- Follow-up to: https://github.com/zed-industries/zed/pull/32003

The underlying `sql-formatter` used by `prettier-plugin-sql` needs to
have the SQL dialect (mysql, postgresql) passed as the prettier language
name, while Zed passes `sql`, which default will corrupt sql files with
vendor specific extensions (postgresql jsonb operators, etc).

I improved the [Zed SQL Language
Docs](https://zed.dev/docs/languages/sql) in
https://github.com/zed-industries/zed/pull/32003 to show how to use
`sql-formatter` directly as an external formatter.

Release Notes:

- SQL: Disable `format_on_save` using `prettier-plugin-sql` by default.
Please see the [Zed SQL Language
Docs](https://zed.dev/docs/languages/sql) for settings to use
`sql-formatter` directly instead.
```

## Parents

- [77ead25f8cc2d3f375266d2bace74693a5402003](https://git.cafe/gitcafe/zed/commit/77ead25f8cc2d3f375266d2bace74693a5402003?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/899153d9a4f39a1356b2732c7805c33e8fea2529?format=markdown)
