# Objective Fixes #56544 The settings reference documents `format_on_save` as defaulting to `on`, but `assets/settings/default.json` ships `"format_on_save": "off"`. The reporter in #56544 hit exactly that: a fresh config, a C file, save, and nothing happens. The reason the documented default looks right to many people is that Zed enables it per language for twelve languages (Astro, Dart, EEx, Elixir, Elm, Go, GraphQL, HEEx, Kotlin, Rust, Starlark, Zig). Save formats a Rust buffer and not a C one, and neither the reference nor the reporter's mental model had anywhere to hang that difference. Checking that one entry made me wonder how many others were stale, so I compared every `Setting:`/`Default:` pair on the page against the corresponding path in `default.json`. Six more were wrong. ## Solution | Setting | Documented | Ships as | | --- | --- | --- | | `format_on_save` | `on` | `off` | | `auto_indent` | `true`, "`boolean` values" | `syntax_aware`, a three-way enum | | `diagnostics_max_severity` | `null` | `all` | | `terminal.cursor_shape` | `null` (defaults to block) | `block` | | `terminal.alternate_scroll` | `off` | `on` | | `edit_predictions.disabled_globs` | 7 globs | 10 globs | | `git.gutter_debounce` | `null` | `0` | Two of these needed more than a value swap: `auto_indent` stopped being a boolean when it became `AutoIndentMode` (`crates/settings_content/src/language.rs:411`), so the options list now covers `syntax_aware`, `preserve_indent` and `none`, and the description no longer reads as a yes/no toggle. `format_on_save` gets a sentence naming the twelve languages, so the difference between saving a Rust buffer and a C one has somewhere to hang. `diagnostics_max_severity` and `terminal.cursor_shape` were self-contradicting rather than merely stale: each section's own prose already described the real default while the `Default:` line said `null`. ## Testing `cd docs && npx prettier --check src/` passes, as required by `docs/AGENTS.md`. The change is prose and adds no `{#action}` or `{#kb}` references, so it does not depend on the action metadata that `check_docs` generates. The `[\`languages\`](#languages)` link resolves to the single `## Languages` heading on the same page. Every value in the table above was read out of `assets/settings/default.json` on `main`, and I confirmed `default.json` is authoritative for each by following the resolved-settings path (the `user_content.<x>.unwrap()` style accessors) rather than trusting the file alone. ## Notes for review Found while auditing, deliberately left out of this PR — happy to take any of them in a follow-up, or here if you would rather: - Two Rust doc comments carry the same wrong defaults and feed the settings.json schema tooltips, so the in-editor hover still disagrees with the site: `crates/settings_content/src/language.rs` says `/// Default: on` for `format_on_save`, and `crates/settings_content/src/editor.rs` says `/// Default: warning` for `diagnostics_max_severity` while also saying "Shows all diagnostics if not specified". Fixing those is a source change rather than a docs one. - `docs/src/diagnostics.md` and `docs/src/visual-customization.md` still present `diagnostics_max_severity: null`, and the latter also shows `cursor_shape: null` for the editor where `default.json` ships `bar`. Same defect class, different pages and a different presentation (defaults listings rather than a reference), so I kept this PR to the reference page. - The reference's `diagnostics_max_severity` options omit `off`, which is a live variant (`DiagnosticSeverityContent` in `crates/settings_content/src/project.rs`). That is a missing option rather than a wrong default, so it is not in scope here. - Neither the Format On Save nor the Autosave section mentions that `"autosave": {"after_delay": {...}}` disables format on save outright (`crates/workspace/src/pane.rs`), even though `default.json` carries that warning as a comment. - The twelve-language list is a maintenance cost: it has to be edited whenever a language gains or loses a default. `default.json` sets per-language defaults for `tab_size`, `soft_wrap`, `allow_rewrap`, `hard_tabs` and others too, and none of them are called out anywhere. A single general statement about per-language defaults overriding top-level ones would cover all of them and never go stale. I kept the explicit list because it is what actually answers #56544, but I will happily swap it for the general version if you prefer. ## 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
Zed
Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Installation
On macOS, Linux, and Windows you can download Zed directly or install Zed via your local package manager (macOS/Linux/Windows).
Other platforms are not yet available:
- Web (tracking discussion)
Developing Zed
Contributing
See CONTRIBUTING.md for ways you can contribute to Zed.
Also... we're hiring! Check out our jobs page for open roles.
Licensing
Zed source code is licensed primarily under GPL-3.0-or-later, with Apache-2.0 components where marked.
License information for third party dependencies must be correctly provided for CI to pass.
We use cargo-about to automatically comply with open source licenses. If CI is failing, check the following:
- Is it showing a
no license specifiederror for a crate you've created? If so, addpublish = falseunder[package]in your crate's Cargo.toml. - Is the error
failed to satisfy license requirementsfor a dependency? If so, first determine what license the project has and whether this system is sufficient to comply with this license's requirements. If you're unsure, ask a lawyer. Once you've verified that this system is acceptable add the license's SPDX identifier to theacceptedarray inscript/licenses/zed-licenses.toml. - Is
cargo-aboutunable to find the license for a dependency? If so, add a clarification field at the end ofscript/licenses/zed-licenses.toml, as specified in the cargo-about book.
Sponsorship
Zed is developed by Zed Industries, Inc., a for-profit company.
If you’d like to financially support the project, you can do so via GitHub Sponsors. Sponsorships go directly to Zed Industries and are used as general company revenue. There are no perks or entitlements associated with sponsorship.