format on save: javascript docs (#60070)

# Objective

JavaScript docs for default `format-on-save` settings are out of date.

Small docs followup to https://github.com/zed-industries/zed/pull/59710

## Solution

Change docs to say that JavaScript format-on-save is now off by default.

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
This commit is contained in:
Chris Biscardi authored and GitHub committed 2026-06-29 08:19:22 +00:00
1 parent b48281a362
commit 0befeef087
1 file changed
+18 -2
+18 -2
View File
@@ -14,8 +14,24 @@ JavaScript support is available natively in Zed.
## Code formatting
Formatting on save is enabled by default for JavaScript, using TypeScript's built-in code formatting.
But many JavaScript projects use other command-line code-formatting tools, such as [Prettier](https://prettier.io/).
Formatting on save is disabled by default for JavaScript.
To turn `format-on-save` on, you can enable the setting globally or for `JavaScript` or `TypeScript` specifically.
```json [settings]
{
"languages": {
"JavaScript": {
"format_on_save": "on"
},
"TypeScript": {
"format_on_save": "on"
}
}
}
```
Many JavaScript projects use command-line code-formatting tools, such as [Prettier](https://prettier.io/).
You can use one of these tools by specifying an _external_ code formatter for JavaScript in your settings.
See [the configuration docs](../reference/all-settings.md) for more information.