707a8a67bba437bef189253c1443a39d9db64350
104
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
63b29c2edd |
Add support for the "..." entry in terminal.path_hyperlink_regexes (#64552)
## Objective Allow custom terminal path regexes to extend inherited entries without copying them. This PR also corrects the existing mismatch between the documented and shipped default regexes. This is the last submission in the #64399 series, following #62769, #64222, #64440, #64484, and #64540. ## Solution The `"..."` entry is intentionally supported at the top level only. A `"..."` line inside a multiline entry remains regex text. Existing configurations that use bare `...` as a three-character regex can preserve that behavior by writing `["..."]` as an entry instead. The shipped regexes and hyperlink matching behavior are unchanged. ## Testing All focused tests and all hyperlink tests pass on macOS. The documented default expressions were checked against the shipped values. ## 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: - Added support for `"..."` in `terminal.path_hyperlink_regexes` to extend inherited regexes without repeating them. |
||
|
|
36726df0c3 |
sidebar: Group threads sidebar settings (#64395)
## Objective Group the threads sidebar settings together in JSON and the Settings Editor, using consistent “Threads Sidebar” terminology. This follows up on #63452 now that #62883 has added configurable default width, and includes the auto-open setting added since then. ## Solution - Group `position`, `default_width`, and `auto_open` under `agent.threads_sidebar`, and display their controls together in Settings. - Automatically migrate `agent.sidebar_side`, `agent.threads_sidebar_default_width`, and `agent.threads_sidebar_auto_open` across supported settings scopes, preserving existing nested values. - Apply changes to the default width immediately, including when the sidebar was manually resized, and clear the saved width override. Unrelated settings changes preserve manual sizing. - Document all three settings, including the previously missing position entry. ## Testing The following targeted checks passed on the local changes: - `cargo test -p migrator nest_agent_threads_sidebar_settings` — 7 tests passed. - `cargo test -p sidebar -p workspace -p agent_settings -p gpui_platform --features gpui_platform/runtime_shaders --lib -- width threads_sidebar_settings test_open_directory_in_existing_window` — 9 tests passed. - `cargo fmt --all` completed successfully. - `git diff --check` passed. - From `docs`: `npx prettier --check src/reference/all-settings.md src/ai/parallel-agents.md` passed. Coverage includes migration precedence and supported scopes, settings defaults and width limits, manual sizing and resets, persisted widths, and auto-open behavior. Full application tests and manual UI testing were not run. Clippy was not rerun after the final terminology changes. ## 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: - Improved threads sidebar settings by grouping position, default width, and auto-open together, and applying default-width changes even after manual resizing. |
||
|
|
4c7f3574f2 |
Add support for "..." in edit_predictions_disabled_in (#64546)
## Objective Let projects and language-specific settings add scopes where edit predictions are disabled without repeating inherited scopes. Part of #64399. ## Solution Extend the `"..."` convention from #62769, #64222, #64440, #64484, and #64540 to `edit_predictions_disabled_in`. For example, a global `["comment"]` and a language override of `["string", "..."]` disable predictions in both scopes. Inherited scopes are inserted at `"..."`, and duplicates keep their first occurrence. Omitting the marker replaces the list, `[]` clears it, and omitting the setting preserves inheritance. The default remains `[]`. ## Testing Tested on macOS through settings loading, covering project and language-specific overrides, inheritance, replacement, and clearing. The language settings tests passed. Live editor behavior has not been checked manually. To check manually, configure global `["comment"]` and a language override of `["string", "..."]`. Confirm predictions are disabled in both scopes, then remove `"..."` and repeat with `[]` to check replacement and clearing. ## 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: - Added support for `"..."` in `edit_predictions_disabled_in` so project and language-specific settings can extend inherited scopes. --------- Co-authored-by: Kirill Bulatov <mail4score@gmail.com> |
||
|
|
5a137cbc9b |
Add support for "..." in edit_predictions.disabled_globs (#64540)
## Objective Let users and projects add edit prediction exclusion patterns without repeating defaults or inherited patterns. Part of #64399. ## Solution Extend the `"..."` convention from #62769, #64222, #64440, and #64484 to `edit_predictions.disabled_globs` using `SplicingVec`. Inherited patterns are inserted at `"..."`, and duplicates retain their first occurrence. Omitting the marker replaces the list, `[]` clears it, and omitting the setting preserves inheritance. Opening an absent setting now initializes it with `["..."]` instead of clearing inherited patterns, and the selection is located by parsing the JSON instead of a regex, so a commented-out or nested `"disabled_globs"` can no longer capture it. Cursor imports append `"..."` like the `files.exclude` import does, so Zed's sensitive-file defaults survive an import; empty lists and empty or literal `"..."` entries are dropped, matching `enabled_patterns`. ## Testing Tested on macOS with settings merge and loading tests, Cursor import tests, the UI settings update and selection path (including commented-out and nested decoy keys), the new `settings_json` key-path lookup, and Copilot integration coverage. To check manually, configure custom disabled patterns alongside `"..."` and confirm that both custom patterns and inherited sensitive-file patterns remain disabled. Repeat without `"..."` and with `[]` to verify replacement and clearing. Opening the setting when it is absent should preserve inherited patterns. ## 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: - Added support for `"..."` in `edit_predictions.disabled_globs` so custom patterns can extend inherited exclusions, and fixed "Configure Excluded Files" selecting the wrong list when a commented-out `disabled_globs` precedes it. --------- Co-authored-by: Kirill Bulatov <kirill@zed.dev> |
||
|
|
526c95d474 |
Improve internal links across documentation (#64481)
## Summary - Adds 63 internal links across 41 documentation pages. - Connects existing terms such as Agent Panel, semantic tokens, edit predictions, and language-specific debugging to their detailed reference pages. - Uses existing wording for 60 links and makes three small wording changes where a natural anchor did not already exist. ## Why this matters Readers can now move from overview and configuration pages to the relevant detailed guidance without searching the documentation manually. The changes add navigation only. They do not change product behavior or documented requirements. ## Jev experiment This PR came from a local experiment using Jev to audit internal links across the published documentation. The audit scripts are not included in this PR. - Code shortlisted 2,715 possible source and destination page pairs. - Jev made two separate decisions for each pair: whether the link would help the reader, and which exact existing phrase should become the anchor. - Five strong links without existing anchor text went to GPT-5.6 Luna for minimal rewrite options. Jev then selected among those fixed options. - A local review interface surfaced the results for Pass or Fail decisions before any files changed. Human review approved 66 changes. Two no longer matched the current `main` branch, and review removed one circular link, leaving the 63 links in this PR. ## Validation - `pnpm dlx prettier@3.5.0 <changed docs> --check` - `lychee --exclude '^http' './docs/src/**/*'` — 0 errors - `mdbook build docs` - Verified that the diff adds exactly 63 Markdown links Release Notes: - Improved links between related documentation pages. |
||
|
|
916fc2b8cb |
Add support for the "..." entry in hidden_files (#64484)
## Objective Let projects add hidden file patterns without repeating defaults or patterns inherited from user settings. Part of [#64399](https://github.com/zed-industries/zed/discussions/64399). ## Solution Extend the `"..."` behavior from #62769, #64222, and #64440 to `hidden_files`. `"..."` includes the resolved inherited list, omitting it replaces the list, and `[]` clears it. Duplicate entries retain their first occurrence. The default remains `["**/.*"]`, and `project_panel.hide_hidden` still controls visibility. ## Testing Tested on macOS with settings merge, worktree integration, and Settings Editor metadata tests. To check manually, configure different user and project hidden file patterns and enable `project_panel.hide_hidden`. Include `"..."` to retain inherited patterns, then repeat without it and with `[]` to verify replacement and clearing. ## 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: - Added support for `"..."` in `hidden_files` so project settings can extend inherited hidden-file patterns. |
||
|
|
968be64a02 |
Align "..." documentation for file pattern settings (#64452)
## Objective Make the `"..."` convention easier to understand across the settings that support it. This is a meta follow-up to [#64399](https://github.com/zed-industries/zed/discussions/64399), establishing a documentation pattern that subsequent PRs can follow. ## Solution Give each setting a succinct, self-contained explanation of `"..."`, with matching wording and examples in its Rust doc comment and settings reference: - `file_scan_exclusions` • #62769 - `file_scan_inclusions` • #64440 - `read_only_files` • #64222 This keeps the explanation consistent across both surfaces and aligns the content for future documentation generated from Rust comments. ## Testing Built the docs locally on macOS and verified the examples, links, and anchors. The existing settings merge tests pass. ## 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 |
||
|
|
74a6468b54 |
Add support for the "..." entry in file_scan_inclusions (#64440)
## Objective Let projects add inclusion patterns without repeating defaults or patterns inherited from user settings. Part of #64399. ## Solution Extend the `"..."` behavior from #62769 and #64222 to `file_scan_inclusions` using the shared merge implementation. `"..."` includes the resolved inherited list, omitting it replaces the list, and `[]` clears it. Duplicate entries retain their first occurrence. Stop importing VS Code’s `files.watcherInclude` as inclusion patterns because it configures additional watch roots rather than overriding Git ignores. ## Testing Tested on macOS with settings merge, VS Code import, and worktree integration tests. Coverage includes preservation of the `.env*` default, layered inheritance, replacement, clearing, and deduplication. The worktree test verifies that inherited and project-specific patterns include Git-ignored files while exclusions still take precedence. To check manually, configure different user and project inclusion patterns and add ignored files matching each. Include `"..."` to retain inherited patterns, then repeat without it and with `[]` to verify replacement and clearing. Confirm that excluded files remain absent. ## 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: - Added support for `"..."` in `file_scan_inclusions` so project settings can extend inherited inclusion patterns. |
||
|
|
19096d4c87 |
Document hidden_files setting (#64403)
## Objective While suggesting #64399, I realized `hidden_files` didn’t have an entry in the settings reference. This PR fills that gap. ## Testing Checked the descriptions against the implementation and existing tests. ## 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 |
||
|
|
534319bd05 |
which_key: Improve pending keystrokes indicator to include untimed chords (#64362)
Closes #64338 The pending keystrokes indicator now shows chords without a timeout, with no countdown circle. For example, pressing `cmd-k` shows that Zed is waiting for another key. Few cases which needed special handling for untimed chords case: - Hovering already pauses a timed chord, and GPUI preserves that pause when the chord advances. An untimed chord has no paused timeout to carry forward. We pause its newly created timeout if the pointer is still over the indicator or popover. - For timed chords, the timeout already stays paused during the popover's 300 ms dismissal delay. If an untimed chord gains a timeout during that delay, it now follows the same rule. The popover still closes at the original deadline, then the timeout resumes with a full second remaining. <img width="308" height="182" alt="CleanShot 2026-09-17 at 11 45 33 AM@2x" src="https://github.com/user-attachments/assets/9baa5fde-de9b-447d-9b02-b712a3065685" /> Release Notes: - Improved the pending keystrokes indicator to show chords without a timeout, such as shortcuts starting with `cmd-k`. |
||
|
|
52e0b848da |
Add a setting for Threads Sidebar auto-open (#64259)
Closes https://github.com/zed-industries/zed/discussions/64266 Opening a folder in an existing window force-opens the Threads Sidebar, and there is no way to prevent it. `open_paths` called `MultiWorkspace::open_sidebar` unconditionally on the reused window, so the sidebar reopened on every such open regardless of whether the user had closed it. This adds `agent.threads_sidebar_auto_open`, defaulting to `true` so current behavior is unchanged. With `false`, the folder still opens in the existing window, but the sidebar stays closed. This path is reached when `default_open_behavior` or `cli_default_open_behavior` is set to `existing_window`. `open_sidebar` was doing double duty: besides showing the sidebar, it pinned the workspace being navigated away from so it survives the switch. When the setting is disabled, `retain_active_workspace` is called instead, so only sidebar visibility changes. https://github.com/user-attachments/assets/fc299df0-27e2-4ac6-98cb-d817d5f71d0e ## Tests Two tests in `multi_workspace_tests.rs` cover both branches: the sidebar opens by default, and stays closed when the setting is disabled while the folder still opens in the same window. Release Notes: - Added `agent.threads_sidebar_auto_open` to control whether opening a folder in an existing window also opens the Threads Sidebar |
||
|
|
55a43c22fd |
Document new git_panel settings in all-settings reference (#64282)
## Objective Document newly added `git_panel` settings in the all-settings reference, and fix related docs mismatches. ## Solution - Document `tree_view`, `show_count_badge`, `diff_stats`, `commit_title_max_length`, and `entry_primary_click_action` - Document missing `file_icons` / `folder_indicator` for `git_panel` - Correct `dock` defaults for git/collaboration/outline panels to match `assets/settings/default.json` (`right`) ## Testing Docs-only changes; no runtime behavior change. --- Release Notes: - N/A --------- Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Kirill Bulatov <kirill@zed.dev> |
||
|
|
aef893e276 |
Add a setting for the Threads Sidebar width (#62883)
## Objective
The Threads Sidebar opens at a hard-coded 300px and can be resized only
by dragging. `agent.default_width` controls the Agent Panel rather than
the sidebar, leaving no way to configure the sidebar’s preferred width.
## Solution
Add `agent.threads_sidebar_default_width` for the width used when no
user-chosen sidebar width is stored. The value is clamped to the
existing 200–800px drag range. Existing, unresized sidebars follow
settings changes immediately. Double-clicking the divider resets the
sidebar to the configured width and resumes following subsequent
settings changes.
The sidebar previously saved its width whenever any sidebar state
changed, not only when the divider was dragged. `SerializedSidebar` now
records `width_set_by_user`, so settings-driven widths are no longer
persisted. Manually resized widths take precedence until the divider is
reset.
## Testing
- `test_threads_sidebar_default_width` in
`crates/agent_settings/src/agent_settings.rs` covers the default, a user
override, fallback for `null` and an unset field, and preservation of
the Agent Panel width and sidebar position.
- Five width-focused tests in `crates/sidebar/src/sidebar_tests.rs`
cover reset behavior, live settings updates, clamping, legacy-width
restoration, and persistence. They also check that manually resized
widths resist settings changes and that resetting resumes following the
setting.
- To check by hand: set `"agent": { "threads_sidebar_default_width": 360
}`, reset the divider, and confirm the sidebar is 360px wide. Change the
setting and confirm the width updates immediately. Drag it wider,
restart, and confirm the dragged width is kept. Double-click the divider
and confirm it returns to the configured width. Set the value to `5000`
and confirm the untouched sidebar clamps to 800px.
## 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:
- Added `agent.threads_sidebar_default_width` for setting the width of
the Threads Sidebar.
|
||
|
|
5151c7953d |
Clarify how agent.flexible affects agent.default_width (#63020)
## Objective `agent.default_width` is described as the Agent Panel’s default width, but panels docked to the left or right use proportional sizing while `agent.flexible` is enabled. Because flexible sizing is enabled by default, double-clicking the outer resize handle restores the default proportion rather than the configured pixel width. This can make `agent.default_width` appear to be ignored. ## Solution Clarify that `agent.default_width` controls the fixed width used when `agent.flexible` is disabled, while resetting a flexibly sized Agent Panel restores its default proportion. Update the default settings comments, settings documentation, Settings UI description, and visual customization guide. Add `agent.flexible` to the Agent Panel configuration example and explain how it affects reset behavior. No sizing behavior changes. ## Testing - `cargo fmt --all -- --check` - No runtime testing—the change only updates settings descriptions and documentation. ## 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 |
||
|
|
169a2b11ab |
Add support for the "..." entry in read_only_files (#64222)
## Objective Let projects add read-only file patterns without repeating the patterns inherited from user settings. ## Solution Extend the `"..."` behavior introduced in #62769 to `read_only_files`. A `"..."` entry includes the inherited patterns. Omitting it replaces the list, and `[]` clears it. ## Testing Tested on macOS with settings merge, VS Code import, and project integration tests. The project test verifies that user and project patterns both apply while unrelated files remain editable. To check manually, configure different user and project patterns, include `"..."` in the project list, and open matching files. Repeat without `"..."` after restarting Zed to verify replacement. Linux, Windows, and manual app testing were not performed. ## 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: - Added support for `"..."` in `read_only_files` so project settings can extend inherited read-only patterns. --------- Co-authored-by: Kirill Bulatov <kirill@zed.dev> |
||
|
|
45ff33717b |
Refine recent commands' UX (#64181)
Follow-up to https://github.com/zed-industries/zed/pull/63388 https://github.com/user-attachments/assets/2a855451-141b-4030-8475-92f23c661d51 Release Notes: - Improved recent commands' UX |
||
|
|
ba7da93e5c |
Drop settings that no longer exist from the reference (#64210)
# Objective Follow-up to #64196, which corrected documented default *values*. This one covers documented *settings* — four entries in the reference name settings that have been renamed, moved, or removed outright, so a reader who copies them gets a key Zed either ignores or silently rewrites on load. Each claim below links to the code that makes it true: | Documented as | Reality | Evidence | | --- | --- | --- | | `features` | Gone | [`m_2026_02_02/settings.rs#L19-L27`](https://github.com/zed-industries/zed/blob/7f00507e015636cfc8ab5dc053340ad7f74f6aca/crates/migrator/src/migrations/m_2026_02_02/settings.rs#L19-L27) moves the provider out and deletes `features` once empty; no `pub features` exists in [`crates/settings_content/`](https://github.com/zed-industries/zed/tree/7f00507e015636cfc8ab5dc053340ad7f74f6aca/crates/settings_content/src) | | `edit_prediction_provider` | `edit_predictions.provider` | same migration, plus [`default.json`](https://github.com/zed-industries/zed/blob/7f00507e015636cfc8ab5dc053340ad7f74f6aca/assets/settings/default.json) ships `"edit_predictions": { "provider": "zed" }` | | `agent_font_size` | `agent_ui_font_size` | [`m_2025_10_03/settings.rs#L10-L11`](https://github.com/zed-industries/zed/blob/7f00507e015636cfc8ab5dc053340ad7f74f6aca/crates/migrator/src/migrations/m_2025_10_03/settings.rs#L10-L11) — "Renames the setting `agent_font_size` to `agent_ui_font_size`" | | `projects_online_by_default` | Gone | no match in `crates/` or `assets/` | ## Solution `## Features` is deleted. Its only child, [Edit Prediction Provider](https://zed.dev/docs/reference/all-settings#edit-prediction-provider), moves under [Edit Predictions](https://zed.dev/docs/reference/all-settings#edit-predictions) to sit with the other `edit_predictions` settings, and its `Setting:` line becomes `provider`. Nothing else had to change in that subsection — its JSON examples already used the `edit_predictions.provider` shape, which is what made the stale wrapper easy to miss. `agent_font_size` is renamed in place, heading included. `projects_online_by_default` is removed. The Edit Predictions example also listed seven `disabled_globs` where `default.json` ships ten. #64196 corrected that number on the [Disabled Globs](https://zed.dev/docs/reference/all-settings#disabled-globs) entry immediately below it, so the two were contradicting each other on the same page; the example is now synced. ## Testing `cd docs && npx prettier --check src/` passes, per [`docs/AGENTS.md`](https://github.com/zed-industries/zed/blob/main/docs/AGENTS.md). Code fences stay balanced, the moved heading is unique on the page, and no page links to `#features`, `#agent-font-size`, `#projects-online-by-default`, or `#edit-prediction-provider`, so the restructure breaks no anchors. No `{#action}` or `{#kb}` references are added, so this does not depend on the action metadata `check_docs` generates. Found by extracting every ``Setting:`` name on the page and checking it against the keys `assets/settings/default.json` actually contains, then confirming each miss against `crates/settings_content/` and `crates/migrator/`. ## Notes for review - The same sweep says 24 scalar settings that `default.json` ships have no entry on this page at all, including `hide_mouse`, `word_diff_enabled`, `minimum_contrast_for_highlights`, `modeline_lines`, `lsp_results_location` and `zoomed_padding`. That is #53323 territory and a much larger piece of writing, so it is not here — happy to take it on if you want it. - `auto_update_extensions` and `terminal.font_features` are documented but absent from `default.json`. Both are real settings ([`extension.rs`](https://github.com/zed-industries/zed/blob/7f00507e015636cfc8ab5dc053340ad7f74f6aca/crates/settings_content/src/extension.rs), [`terminal.rs`](https://github.com/zed-industries/zed/blob/7f00507e015636cfc8ab5dc053340ad7f74f6aca/crates/settings_content/src/terminal.rs)) that simply have no shipped default, so I left them alone. - Still outstanding from #64196's review notes: `crates/settings_content/src/language.rs` and `editor.rs` carry `/// Default:` comments that feed the settings.json schema tooltips and still disagree with the site, and `docs/src/diagnostics.md` and `docs/src/visual-customization.md` still show the old `diagnostics_max_severity` and `cursor_shape` defaults. ## 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 |
||
|
|
7f00507e01 |
Correct wrong default values in the settings reference (#64196)
# 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 |
||
|
|
450775244f |
gpui: Prevent idle sleep during AI response streaming (#53130)
Release Notes: - Added button tu prevent idle sleep during AI response streaming **Context / Motivation:** When an AI agent takes a long time to generate a response, the operating system might enter an idle sleep (or display sleep) state if there is no user interaction (mouse or keyboard). This can interrupt the workflow. This PR aims to prevent the system from sleeping during an active AI turn by invoking native OS APIs, and provides a UI toggle for users to control this behavior. **Key Changes:** 1. **Cross-Platform Idle Sleep Prevention in GPUI (`gpui`, `gpui_*`)** - Added a new `prevent_idle_sleep` method to the `Platform` trait. It returns a RAII-based `PreventIdleSleepToken`, which automatically restores the original sleep policy when dropped. - **macOS**: Utilizes `NSProcessInfo`'s `beginActivityWithOptions` with `NSActivityIdleDisplaySleepDisabled`. - **Windows**: Uses `SetThreadExecutionState` to prevent display and system sleep, incorporating a reference counter to handle concurrent requests safely. - **Linux**: Uses `ashpd` to request `org.freedesktop.portal.Inhibit` (inhibiting `Idle` and `Suspend` states) via D-Bus. 2. **AI Agent State Integration (`crates/acp_thread`)** - Introduced idle sleep prevention logic in `AcpThread`: Acquires the token at the beginning of `run_turn`, and automatically releases it when the turn completes normally, errors out, or is explicitly canceled by the user. - Added comprehensive unit tests to ensure the token is correctly acquired and released under various cancellation and concurrency scenarios. 3. **Settings and UI (`crates/agent_settings`, `crates/agent_ui`)** - Added `AgentOutputIdleSleepControl` to global state. - Added a new toggle button (screen icon) to the toolbar at the bottom of the `ThreadView` (AI conversation panel). Users can hover to view the tooltip and click to toggle the feature on or off. <img width="419" height="132" alt="截屏2026-04-04 16 09 08" src="https://github.com/user-attachments/assets/619da9ff-10f7-46e0-b959-d7c74b16b918" /> --------- Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com> Co-authored-by: Kirill Bulatov <kirill@zed.dev> |
||
|
|
e2534d2357 |
docs: Describe how preview tabs actually behave (#63875)
# Objective - Fixes #33819 - The `preview_tabs` documentation says preview tabs "close automatically when you switch to another file unless you explicitly pin them". They do not close. Moving to another file leaves the preview tab open — either still as the preview tab, or converted into a regular one. Four people ran into this on the issue over the past year. - The same section then lists the ways to turn a preview tab into a regular tab, and two of them are missing, including the pinning that the sentence above uses as its counter-example. ## Solution Two corrections to the `Preview tabs` section of `docs/src/reference/all-settings.md`. No behaviour was touched. **The description.** A pane holds a single `preview_item_id`, so there is at most one preview tab at a time. What happens to it when you move to another file depends on the path: - Opening a not-yet-open file in preview mode from the project panel or file finder goes through `Pane::open_item`, which calls `close_current_preview_item` — that really does close the old tab (`remove_item`) and hands back its index, and the new file is inserted there. - Code navigation with the default `enable_keep_preview_on_code_navigation: false` instead calls `unpreview_item_if_preview` on the old item *before* `replace_preview_item_id`, so the previous file stays open as a regular tab. A third path, the file finder with the default `enable_preview_from_file_finder: false`, opens the new file as a regular tab and leaves the existing preview tab alone entirely. Rather than spell out every path in a settings description — the `enable_preview_*` settings immediately below already cover them — the new wording sticks to what holds in all of them: a pane keeps at most one preview tab and opening another file in preview mode takes over that slot, and switching to a file that is already open does not close the preview tab. That second half is the case the issue actually reports. **The list.** Two more ways to convert a preview tab into a regular tab: - Pinning it — `change_tab_pin_state` calls `unpreview_item_if_preview` on the `Pin` branch. - `pane::TogglePreviewTab` — the action dedicated to exactly this, registered whenever preview tabs are enabled. ## Testing - Built a debug Zed and walked through the steps from the issue on a scratch project of `a.txt` / `b.txt` / `c.txt`: with `a.txt` open as a regular tab and `b.txt` opened as a preview tab, clicking back to `a.txt` leaves the `b.txt` preview tab open, which is what the current wording says should not happen. Single-clicking `c.txt` takes over the same slot rather than adding a second preview tab, and pinning the preview tab drops the italics. - Ran the docs steps from `run_tests.yml` locally: `zed --dump-all-actions > crates/docs_preprocessor/actions.json`, then `mdbook build ./docs` on mdbook 0.4.37 to match CI. Exit 0 with no preprocessor errors, and both new `{#action ...}` references resolve — the rendered page reads "pane: toggle pin tab" and "pane: toggle preview tab" in the same style as the existing "project panel: open permanent". - `cargo test -p workspace --lib` — 272 passed, 0 failed, including `test_close_other_items_unpreviews_active_item`, `test_reopening_closed_item_after_unpreview`, and the proptest that opens random paths with random `allow_preview` and asserts a pane never holds more than one preview item. ## Notes for review - Several people on the issue would rather the *behaviour* changed, so that preview tabs close on any tab switch the way the docs currently describe. I left that alone deliberately: the issue is typed `Docs`, so this PR only makes the prose match the implementation. Happy to open a discussion separately if it is worth pursuing. - Saving a file also unpreviews it (`Pane::save_item`), but I left it off the list as redundant — you have to edit a file before you can save it, and editing is already there. Say the word if you would rather it were explicit. - The comment on `preview_tabs.enabled` in `assets/settings/default.json` words this as "close automatically when you open another preview tab". That is right for the project-panel path and carries the same code-navigation caveat as above; I left it alone to keep this diff to one file, and am happy to align it in a follow-up. ## Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments — N/A - [x] The content adheres to Zed's UI standards — N/A, docs only - [x] Tests cover the new/changed behavior — N/A, no behaviour change; the docs build is verified locally - [x] Performance impact has been considered and is acceptable — N/A --- Release Notes: - N/A |
||
|
|
1d25e83fe8 |
project_panel: Honor preview setting for keyboard opens (#63758)
Closes #63725 Honor `preview_tabs.enable_preview_from_project_panel` when opening files with `project_panel::Open` (Space), matching the setting-aware single-click behavior. Add a regression test covering previews disabled. Testing: - `cargo test -p project_panel --lib` - `cargo build -p zed` - Manually verified with the setting disabled that Space opens two permanent tabs - Manually verified with the setting enabled that Space replaces the previous preview tab - `./script/clippy -p project_panel --tests` is blocked by an unrelated existing `clippy::drain_collect` diagnostic in `crates/rpc/src/proto_client.rs` Manual verification: Preview disabled — Space opens both files as permanent tabs: <img width="1920" height="1032" alt="Preview disabled: Space opens both files as permanent tabs" src="https://github.com/user-attachments/assets/4b772aad-031e-401d-ac85-5a7f82a74bc1" /> Preview enabled — Space replaces the previous preview tab: <img width="1920" height="1032" alt="Preview enabled: Space replaces the previous preview tab" src="https://github.com/user-attachments/assets/cfef36af-0cd5-4522-99b5-99d3bb2c3f9d" /> Release Notes: - Fixed the project panel preview-tab setting being ignored when opening files with the keyboard. --------- Co-authored-by: Chara <249489759+cmdr-chara@users.noreply.github.com> Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com> |
||
|
|
ba6b83f89d |
workspace: Add configurable window title formatting (#54379)
## Summary
- Add `window_title_format` and `window_title_separator` settings for
customizing the window title
- Expose `${projectName}`, `${fileName}`, `${filePath}`,
`${relativePath}`, `${fileStem}`, `${remoteName}`, `${remoteHost}`,
`${appName}`, and `${separator}` as the native Zed window-title
variables
- Keep the collab `↗/↙` indicator hard-appended
- Translate VS Code `window.title` / `window.titleSeparator` aliases
into Zed's canonical variables during settings import, including
`${appName}` passthrough support and mapping VS Code's
`${activeEditorMedium}` onto Zed's `${relativePath}`
- Gate path-, remote-, and release-channel-derived lookups on whether
the active template references the corresponding variable, so the
default template avoids the extra work and still uses the existing
`last_window_title` cache to skip redundant platform updates
An alternative approach is at #49638. I went with `${variable}` names
over `$ZED_*`, canonical Zed variable names with VS Code aliases handled
at import time, kept `${separator}` as the only structural token, and
left `${dirty}` out of scope.
## Implementation reasoning and notes
### Variables considered but not included
- **collab/shared indicator variable**: kept hard-appended instead.
Folding it into the template would need whitespace/separator logic the
other variables don't need, and I'd rather not bake those semantics in
without a concrete need for it.
- **dirty variable**: The glyph choice and interaction with OS-level
edited indicators (like macOS's titlebar dot via `set_window_edited`)
felt like a separate design call I wasn't confident making here.
A separator-style config for each of collab/shared/dirty would solve the
above, but I didn't want to add too many additional settings initially.
### Performance
`update_window_title` is on a hot path, so two short-circuits apply:
- Path-, remote-, and release-channel-derived lookups (`absolute_path`,
relative-path string, `file_stem`, `remote_connection_options`,
`ReleaseChannel::try_global`) are gated on `template.contains(...)` via
`WindowTitleNeeds::from_template`, so the default template avoids the
extra work.
- The existing `last_window_title` cache still skips the platform call
when the rendered title is unchanged.
## Screenshots
Settings Editor entries for `window_title_format` and
`window_title_separator`:
<img width="774" height="324" alt="Settings Editor screenshot"
src="https://github.com/user-attachments/assets/b3378ec7-5649-4de3-9de6-164a42bce3fd"
/>
Customized Zed window titles in AltTab app switcher (remote, local,
empty):
<img width="774" height="324" alt="AltTab app switcher screenshot"
src="https://github.com/user-attachments/assets/a189945e-fc68-41b9-aab9-6dc04d5ef4ab"
/>
## 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 is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Closes #14534
Release Notes:
- Added configurable window title formatting with `window_title_format`
/ `window_title_separator`, including `${appName}` / `${remoteName}` /
`${remoteHost}` variables and VS Code `window.title` import support
---------
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
|
||
|
|
d85eade7ab |
which_key: Add a pending key binding indicator (#63343)
This PR makes Zed's one-second key binding delay visible. Say both ctrl-w and ctrl-w left have bindings. After you press ctrl-w, Zed waits to see whether left follows. The PR shows that wait in the status bar with a countdown. Hovering the indicator shows which bindings can still match. It also adds a setting to hide the indicator. It does not change how Zed resolves key bindings. <img height="100" alt="dyn-db84a840272e2f6250a3f527a59b1efd" src="https://github.com/user-attachments/assets/e42c6a6c-4677-499f-a1d3-835960ebb21a" /> <br/> <img height="100" alt="dyn-8012278d030b41bc8ebfae1540504eff" src="https://github.com/user-attachments/assets/250928d5-f913-40f0-9068-00ccb5cdf59f" /> <br/> <img height="100" alt="file-5e6ffa90944faa294e7870f471b4e65b" src="https://github.com/user-attachments/assets/c250e6eb-a269-4e2c-a5a0-0be9b5006f99" /> Release Notes: - Added a status bar countdown for pending multi-stroke key bindings. --------- Co-authored-by: Kirill Bulatov <kirill@zed.dev> |
||
|
|
ad251e0a04 |
docs: Document focus_follows_mouse (#63646)
Release Notes: - N/A |
||
|
|
810c6a04a6 |
Add on_new_window setting (#63522)
> [!NOTE] > This is a remake of #63335 as it's unlikely to be reopened just from my [mention](https://github.com/zed-industries/zed/pull/63335#issuecomment-5452544138). Apologies for the noise! # Objective Closes #59368, where users (including me) are asking for a way to show the Launchpad instead of an empty tab when opening a new window. As per advice from https://github.com/zed-industries/zed/issues/60720#issuecomment-4936162420, adding a separate setting from `restore_on_startup` is more ideal. `on_new_window` allows for two values: - `empty_tab` - `launchpad` (default) ## Testing Added a regression test which opens a new window with `on_new_window` set to `launchpad` and asserts that no item gets opened in the window's pane. I've verified it fails without the setting gate, and confirmed configuring this setting works manually (see Showcase). ## Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [ ] 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 ## Showcase https://github.com/user-attachments/assets/bf339bd1-8c62-4243-ac9d-1045d1a14865 --- Release Notes: - Added `on_new_window` setting to configure the opening of new windows. |
||
|
|
8ce383f221 |
Improve visibility and wording around close panel on toggle setting (#63548)
# Objective - Improve documentation for `close_panel_on_toggle` setting. ## Solution - Previous docs were a bit ambiguous and since refactoring the setting name is not possible at the time, I improved the documentation. ## 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) - [ ] Tests cover the new/changed behavior - [ ] Performance impact has been considered and is acceptable Release Notes: - Added the`close_panel_on_toggle` setting to the settings UI and improved its documentation. |
||
|
|
e8fbacb6d7 |
outline_panel: Add setting to hide symbols in multi-buffer views (#63404)
Closes https://github.com/zed-industries/zed/issues/60242 # Objective When reviewing a branch diff — or project search results — the outline panel lists every affected excerpt and symbol beneath each file. On a diff touching more than a handful of files, this consumes so much vertical space that you cannot see the list of changed files at all, which is usually the thing you want the panel for. Existing settings don't cover this: - `expand_outlines_with_depth: 0` still renders excerpt rows and top-level symbol rows. - Collapsing a file row in the panel is coupled to folding that buffer in the editor, so it can't be used purely to tidy the panel. ## Solution A display-only mode that reduces multi-buffer views to just the directory/file tree. - New `outline_panel.multi_buffer_hide_symbols` setting (default `false`). When enabled, multi-buffer views render only directory, file and folded-directory rows — excerpt, symbol and search-match rows are hidden. - New `outline panel: toggle symbols` action, plus a button in the panel footer, which toggles an in-memory per-panel override of the setting (the same pattern as `editor: toggle inlay hints`). Changing the setting clears the override, so the setting wins. - Single-file views are exempt, and the footer button is not shown there — the panel contains only symbols in that case, so hiding them would leave it empty. - The filter is display-only: `collapsed_entries` and editor buffer folding are never touched. - Outline fetching is skipped while the mode is active, so large diffs don't pay for outlines that will not be rendered. Turning the mode off re-triggers fetching. This adds one new icon, `file_code_off`, used by the footer button when symbols are hidden. cc @zed-industries/design for review per the icon guidelines — it is `file_code` with the slash and outline gaps from `file_ignored`, keeping the parts of the chevrons that fall on the near side of the slash. ## Testing Three new tests in `crates/outline_panel/src/outline_panel.rs`: - `test_hide_symbols_in_multibuffer` — outline rows are present by default; only `Fs`/`FoldedDirs` entries remain once the mode is enabled via the setting (which also exercises the settings observer) and via the action; outline rows return when it is toggled off, confirming outlines are re-fetched; asserts `collapsed_entries` is unchanged at every step, covering the display-only guarantee. - `test_hide_symbols_exempts_singleton` — a single-file view still renders its outline with the setting enabled. - `test_hide_symbols_hides_search_matches` — project search match rows are hidden while files and directories still render, and return when toggled off. `cargo test -p outline_panel` (15 passing), `cargo test -p icons`, `cargo test -p settings_ui -p settings_content`, and `./script/clippy` on the touched crates are all green. Tested manually on macOS against a branch diff, project search results, and single-file buffers, checking both the setting and the action (from the panel footer button and from the command palette with focus outside the panel), and that expanding/collapsing directories and editor folding still behave as before. ## 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 ## Showcase <!-- Screenshots go here: branch-diff before/after, footer button icon states, search before/after, single-file exemption --> | | Symbols shown (default) | Symbols hidden | | --- | --- | --- | | **Footer toggle** | <img src="https://github.com/user-attachments/assets/393f128d-1a7c-43a8-97b8-8176a07b45c7" width="260"> | <img src="https://github.com/user-attachments/assets/87c60dd4-d5b7-48f8-9255-226c4a94a586" width="260"> | | **Branch diff** | <img src="https://github.com/user-attachments/assets/79357325-7d7d-40f7-8067-4ae59a824f87" width="420"> | <img src="https://github.com/user-attachments/assets/8a3bbc7e-90d4-4638-9f1d-1ba3091eccfd" width="420"> | | **Project search** | <img src="https://github.com/user-attachments/assets/76e3cf18-d624-42f8-8801-f496bf54a552" width="420"> | <img src="https://github.com/user-attachments/assets/2a34e899-b9f4-465e-b571-75d3d54d00eb" width="420"> | Single-file views are unaffected — symbols still render, and the toggle is not offered: <img src="https://github.com/user-attachments/assets/76c47884-96db-4071-bcc1-931c4283e36f" width="640"> --- Release Notes: - Fixed too many outlines shown per excerpt in the outline panel. Added an `outline_panel.multi_buffer_hide_symbols` setting and an `outline panel: toggle symbols` action to show only files and directories in the outline panel for multi-buffer views. --------- Co-authored-by: Kirill Bulatov <kirill@zed.dev> |
||
|
|
669bede5c5 |
editor: Add language detection for untitled buffers (#61412)
# Objective Closes #4868. Reintroduce automatic language detection for user-created untitled buffers without allowing it to override language choices made by users or owning surfaces. More details: + https://github.com/zed-industries/zed/pull/61201 + https://github.com/zed-industries/zed/pull/61351 ## Solution VS Code distinguishes between inferred and explicitly selected languages, and only continues automatic detection in the former state. This change introduces a buffer-local opt-in flag with the same purpose. It defaults to disabled and is enabled only for user-created untitled buffers and restored untitled buffers that did not persist a language. Choosing a language through the language picker disables detection, while automatically detected languages remain eligible for later redetection. Buffers whose language is assigned by their owning surface, such as Channel Notes, never opt in. Rather than adding persisted state or changing the database schema, restoration reuses the existing optional serialized language. An opted-in buffer that remains Plain Text is serialized without a language and resumes detection after restoration. Once automatic detection has selected a language, that language is serialized normally and restoration leaves detection disabled, effectively treating it as an explicit selection. This also matches VS Code's effective default after restoration. Candidate selection adopts VS Code's confidence-group filtering. Results below the minimum confidence are discarded, and candidate groups are accepted only after a clear confidence gap. The detector then selects the first available Zed language without eagerly loading every candidate. I then added a separate switching rule: Zed keeps the current language unless another candidate has a clear confidence advantage, reducing language changes as model scores fluctuate during editing. Model inference runs off-thread on a bounded sample, and stale results are discarded. I also evaluated penalizing YAML and using stricter global switching thresholds, but neither reliably resolves the ambiguity between Markdown and YAML. In the reproduction from #61351, Betlang assigns YAML more than 80% confidence during editing and peaks around 90%. This is reasonable from the content alone: `#` denotes a YAML comment, while `-` denotes a sequence item. Adding ordinary prose or a fenced code block shifts the model strongly toward Markdown. A fixed penalty would overfit this example and risk suppressing legitimate YAML detection. Since known-language buffers do not opt in and manual language selection takes precedence, I consider this level of ambiguity acceptable and prefer not to introduce language-specific score tuning. Model inference itself is fast. As noted in #61201: > In release builds on Linux with an Intel Core i5-13600KF, the `betlang::detect` call alone typically completes within 3 ms when processing the maximum sampled input. The main concern is the work surrounding inference. Without debouncing, rapid typing creates a snapshot and launches a background detection task on every keystroke, while the detected language may change before the user has finished typing. This change therefore adds a 200 ms debounce delay, allowing detection to run and update the language only after the user pauses. ## Testing Automated coverage verifies that short inputs remain Plain Text, sufficient Rust content is detected as Rust, replacing it with Go content triggers redetection, and manually selecting Plain Text prevents subsequent automatic changes. Restoration coverage verifies that a stored language keeps detection disabled, while an empty language-less untitled buffer resumes detection. Beyond the automated tests, I manually tested automatic language detection while editing untitled buffers. ## 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 ## Showcase https://github.com/user-attachments/assets/103fc731-e12e-48d6-ae89-03978f1c9d74 --- Release Notes: - Added automatic language detection for untitled buffers. --------- Co-authored-by: Max Stevens <maxstevens2708@gmail.com> Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com> |
||
|
|
8166e3d7b8 |
Add folder_indicator setting to show chevron and folder icon together (#62393)
# Objective - Enable panels to show chevron and icon at the same time. - Closes #8661 ## Solution - Replaces `folder_icon` with a new `folder_indicator` which converts from a boolean to enum (`both`, `chevron`, `icon`) for the three display cases ## Testing - gpui and migration tests had been applied ## 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 ## Showcase ### project panel both | chevron | icon --- | --- | --- <img width="400" alt="both_project_panel" src="https://github.com/user-attachments/assets/4c21e1a1-a7a4-4471-b7de-fe867373ddbd" /> | <img width="400" alt="chevron_project_panel" src="https://github.com/user-attachments/assets/a626a82e-e5b7-470d-9d93-ed5787dc83d6" /> | <img width="400" alt="icon_project_panel" src="https://github.com/user-attachments/assets/20f9c55e-87c4-477a-b4c9-b070d6e5a1db" /> ### git panel both | chevron | icon --- | --- | --- <img width="400" alt="both_git_panel" src="https://github.com/user-attachments/assets/3dc166dd-9e63-4943-b803-df3f167876b6" /> | <img width="400" alt="chevron_git_panel" src="https://github.com/user-attachments/assets/8dfd2c10-3a68-439a-8019-4951b72e17d1" /> | <img width="400" alt="icon_git_panel" src="https://github.com/user-attachments/assets/d78a9938-91e7-4d39-a3c8-04647da67768" /> ### outline panel both | chevron | icon --- | --- | --- <img width="400" alt="both_outline_panel" src="https://github.com/user-attachments/assets/1b58c679-0bea-4600-a8ac-e800b0e8d24c" /> | <img width="400" alt="chevron_outline_panel" src="https://github.com/user-attachments/assets/0a9358e4-ec89-40d8-8d5e-a53b784ed30a" /> | <img width="400" alt="icon_outline_panel" src="https://github.com/user-attachments/assets/d8bf5199-5a8c-4de0-b516-00247e6531a5" /> --- Release Notes: - Added a `folder_indicator` setting that can show the disclosure chevron and folder icon at the same time in the project, outline, and git panels. --------- Co-authored-by: Kirill Bulatov <kirill@zed.dev> |
||
|
|
ec312b2701 |
Add LSP call hierarchy modal (#53239)
<img width="1128" height="953" alt="image" src="https://github.com/user-attachments/assets/b2017c0a-e25a-49d7-9342-d074014d085c" /> Closes #14203 Release Notes: - Initial Call Hierarchy support in Zed --------- Co-authored-by: Alexey Olshanskiy <gh@aohoy.dev> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Kirill Bulatov <kirill@zed.dev> |
||
|
|
1475887faf |
Enable project search on type by default (#62506)
Closes https://github.com/zed-industries/zed/issues/9318 Most of the diff is tests. Notable behavior changes during this mode, compared to current mode: * unsaved changes in multi buffer won't spawn any "save or not" pop-ups during typing — submitting the query still does it, as before. Unsaved files will stay so after being sorted out on typing: we cannot save them by default as file-less buffers need a save modal; Zed should already be able to persist and restore such changes on restart. * gutter may jump during search, if new excerpts with large line numbers appear during query input — yet it would not shrink back to avoid excessive flickering and rewraps Release Notes: - Enabled project search on type by default (use `{ "search": { "search_on_type": false } }` to restore the previous behavior) |
||
|
|
cb1352a29d |
Add configurable inline completion debounce timeout (#61568)
# Objective Add configurable inline completion debounce timeout Fixes/implements #23159 ## Solution I initially wanted to make a global setting for this, but it would conflict with hardcoded debounces in codestral (150ms) and copilot (75ms) which I assume are there for a reason. So I ended up using the same mechanism used for the hardcoded debounce in Codestral (`DEBOUNCE_TIMEOUT`) and Copilot (`COPILOT_DEBOUNCE_TIMEOUT`) and made it accessible and configurable for all providers. Also fixed a bug with `DelayMs` `Display` trait adding "ms" into the input field which then fails to parse something like "150ms" as a `u64` by implementing `FromStr` which strips the "ms" suffix if present. So now both "1000" and "1000ms" are parsed correctly and apply. If the parsing fix is not relevant enough I can open a separate issue + PR for that (and the inconsistent use and therefore display of `Option<u64>` vs `Option<DelayMs>` in other ms input fields). ## Testing #### Did you test these changes? If so, how? Added a separate test which passes `test_refresh_prediction_from_buffer_honors_debounce_duration` Manually tested with openapi compatible prediction All other tests in affected crates pass (`cargo test -p settings_content -p settings_ui -p editor -p edit_prediction -p language `) #### How can other people (reviewers) test your changes? Is there anything specific they need to know? Open provider settings and adjust debounce, then see how long it takes for a prediction to render. #### If relevant, what platforms did you test these changes on, and are there any important ones you can't test? Tested on Fedora 43 KDE, but it shouldn't matter as none of the affected code is platform specific. ## 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 ## Showcase https://github.com/user-attachments/assets/14efa628-765e-4c2a-ac44-01aaa3657097 --- Release Notes: - Added configurable inline completion debounce timeout, fixes #23159 --------- Co-authored-by: Ben Kunkle <ben@zed.dev> |
||
|
|
a7d74150ac |
Fix the git_gutter_width setting (#62704)
# Objective - Fixes #62645 ## Solution Since the default value isnt constant.It now has two options 1) Default 2) custom where user inputs a value. ## Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [ ] 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) - [ ] Tests cover the new/changed behavior - [ ] Performance impact has been considered and is acceptable ## Showcase <img width="798" height="361" alt="Screenshot 2026-08-16 at 4 29 54 PM" src="https://github.com/user-attachments/assets/0af302f6-4733-4a23-9e93-1f9d98dd772f" /> <img width="798" height="92" alt="Screenshot 2026-08-16 at 4 30 13 PM" src="https://github.com/user-attachments/assets/2c87c2a3-2947-45c7-8495-f6a0b36dd793" /> Release Notes: - Added git_gutter_width setting to the Settings UI with default (font-size-scaled) and custom (fixed pixel width) options --------- Co-authored-by: Abdul Rafey Ahmed <abdul.r@hyperverge.co> Co-authored-by: MrSubidubi <finn@zed.dev> |
||
|
|
cf08569e82 |
Add support for the "..." entry in file_scan_exclusions (#62769)
## Objective `file_scan_exclusions` replaces the defaults instead of adding to them, so excluding one extra directory means restating all eleven default globs and never picking up defaults added in later Zed releases. ## Solution `file_scan_exclusions` now accepts the `"..."` entry, which expands to the value it overrides, so `["**/node_modules", "..."]` adds to the inherited globs instead of replacing them. Entries listed by name keep their position, and leaving `"..."` out still replaces the list outright, so existing settings behave exactly as they do today. ## Testing - Four unit tests in `crates/settings_content/src/project.rs` cover splicing versus replacing, accumulation across successive layers, and edge cases: a repeated `"..."`, an empty list clearing the value, and a bare `["..."]` leaving it unchanged. - To check by hand: set `"file_scan_exclusions": ["**/node_modules", "..."]` in user settings and confirm `node_modules` disappears from the project panel and file finder while `.git` and `.DS_Store` stay excluded. Remove `"..."` and confirm only `node_modules` is excluded. Repeat in a project's `.zed/settings.json` to confirm it splices the resolved user settings rather than the defaults. - Tested on macOS. This is platform-independent settings-merge logic with no OS-specific code paths, so I did not test Linux or Windows. ## 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: - Added support for the `"..."` entry in `file_scan_exclusions`. Custom exclusions can now extend the defaults instead of replacing them. |
||
|
|
2893b86b04 |
gpui_macos: Add simple fullscreen mode that covers the notch (#60020)
Closes #60013 # Objective Right now Zed can go full screen but it does not allow you to fix the hole screen, by that I mean that Zed can go behind the notch so you don't have extra useless room left. ## Solution You can now use the `fullscreen_mode` = `simple` setting to use the new simple full screen feature, that lives besides the normal full screen feature. But allows you to have an option to go 100% full screen without losing any useless space on your macbook screen. **Note** this is mostly usefull when you have a macbook that has a notch whitch is kinda in the way of your work flow. ## 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 ## Showcase **Before** <img width="5712" height="4284" alt="IMG_0339" src="https://github.com/user-attachments/assets/9f908ffd-7cef-4999-a454-c80f72c40dc8" /> **After** (Note now Zed is behind your notch when using the simple full screen feature) <img width="5712" height="4284" alt="IMG_0360" src="https://github.com/user-attachments/assets/5917ed4d-2a64-4464-a794-bc46fd034521" /> --- Release Notes: - Added support for simple fullscreen mode using the `fullscreen_mode` setting, set it to `simple` to try it out. |
||
|
|
a8b5f6b94f |
docs: Fix some links (#62758)
This PR fixes some links in the docs to use relative links instead of pointing to `docs.zed.dev` (which isn't where the docs actually live). Release Notes: - N/A |
||
|
|
18be72fd68 |
Make file scanner less eager in non-git-tracked directory trees (#62583)
Fixes https://github.com/zed-industries/zed/issues/35780 Collab schema migration PR: https://github.com/zed-industries/cloud/pull/3422 The corresponding database schema migration has been created in the Cloud repo and applied to the production database. Before, Zed scanned each and every entry in the tree down from the directory it was opened in, except gitignored files and scan exclusions. The approach is unchanged, if Zed detects it was open inside a git repository: e.g. the directory open in Zed contains `.git` directory. For the rest of the projects, 2 optimizations are made: * Limit the depth of file scan traversal. Now, `file_scan_depth` (default `5`) restricts Zed from traversing any directory that has same number or more segments in its file path. Such directories behave similar to gitignored directories: their contents is not available in file finder, project search and project panel, but can be lazily traversed when the directory is expanded (e.g. project panel expands it or a nested file is open by path via terminal, etc.) To indicate that to the users, a status entry is shown firs time the limitation is hit in the project: <img width="858" height="133" alt="image" src="https://github.com/user-attachments/assets/7da6cfbb-98b4-4cc3-bf2a-8902a9597a15" /> * During the scan, any git repositories that are not direct children of the directory open in Zed (depth >= 2), are traversed and indexed normally, but their git metadata is never fetched eagerly. Only when Zed opens a buffer from that repo the git metadata is fetched and applied. All that combined now uses a way more moderate amount of CPU and RAM when opening `~`: <img width="1717" height="368" alt="Screenshot 2026-08-13 at 17 43 53" src="https://github.com/user-attachments/assets/ec83e2a9-f7cc-452b-8eb7-af158284ca4e" /> File scan inclusions and exclusions are considered still for such projects. Set `file_scan_depth` to `0` to enable old behavior. The setting is supported in the project settings, so custom values can be set based on the project's structure. --- Release Notes: - Fixed Zed using a lot of memory and CPU in large, non-git-tracked, directory trees |
||
|
|
08827f9208 |
Add starts_open setting to terminal panel (#54373)
## Summary - Add `terminal.starts_open` setting so the terminal panel can open automatically in new workspaces, like project and git panels already can - Expose the setting through terminal settings docs, default settings, Settings Editor metadata, and the terminal panel implementation - I also added a matching settings page item for the existing `git_panel.start_open` setting 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 is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [ ] Tests cover the new/changed behaviour - I decided not to add tests as the behaviour seems covered by the existing settings tests, and similar areas don't seem to have their own explicit tests. - [x] Performance impact has been considered and is acceptable Related to #51542 (issue mentions possibly adding for all panels, closed with implementation for `git_panel`) Release Notes: - Added `terminal.starts_open` to control whether the terminal panel opens automatically in new workspaces |
||
|
|
35cb7558a9 |
editor: Add configurable git gutter width setting (#61304)
## Summary
Adds a `gutter.git_gutter_width` setting that lets users pin the width,
in pixels, of the git diff hunk indicators in the editor gutter.
Previously the width was always derived from the buffer font size
(`floor(0.275 * line_height)`), which can render too thin or too thick
depending on font family and display pixel density. This adds an
optional override:
```json
{
"gutter": {
"git_gutter_width": 6
}
}
```
When the setting is unset (`null`, the default), the width continues to
scale with the buffer font size, so existing behavior is unchanged.
## Motivation
Requested in [discussion
#27799](https://github.com/zed-industries/zed/discussions/27799). Beyond
the width itself, participants noted the git hunk hit target is
extremely narrow and hard to click. Because the hunk hitbox reuses the
painted strip bounds, setting a wider `git_gutter_width` also widens the
clickable area, addressing that complaint with the same setting.
## Changes
- `settings_content`: new `git_gutter_width: Option<f32>` on
`GutterContent`.
- `editor`: mirror field on the resolved `Gutter`; `gutter_strip_width`
now consults the setting, and the value flows through `diff_hunk_bounds`
(including the deleted-hunk marker) and the gutter layout anchors for
line numbers, folds, and expand toggles.
- `settings` (VS Code import): pass through the new field.
- Docs + `default.json`: document the new setting.
## Notes
- `Eq` was dropped from `GutterContent`/`Gutter` because `f32` is not
`Eq`; this matches the existing `EditorSettingsContent` convention for
float-bearing settings.
Release Notes:
- Added a `gutter.git_gutter_width` setting to configure the width of
git diff indicators in the editor gutter
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
||
|
|
5e1fd392f6 |
git: Add diff_base setting for showing changes since the default branch (#61501)
# Objective Let git indicators — the editor gutter, file colors, and `git::Diff` — show all changes on the current branch relative to its merge base with the default branch, instead of only uncommitted changes. Supersedes #60398; thanks to @samuelcolvin for the original implementation and motivation. Closes FR-135 ## Solution - New `git.diff_base` setting (`"head"` | `"default_branch"`), applied live and toggleable per session from the editor controls menu ("Diff Against Default Branch"). - Statuses come from a real merge-base-to-worktree tree diff (`git diff --merge-base`), so local edits that revert branch changes correctly show as unchanged. - `GitStore` shares one `DiffBufferList` per repository with the Branch Diff view; `repo_snapshots` and `project_path_git_status` keep returning index/worktree truth, while display surfaces use separate `display_*` APIs. - `BufferDiff` now records what its base is (`DiffBaseKind`); hunks whose base isn't HEAD are read-only in the gutter — stage/restore buttons and keybindings are inert, so committed work can't be silently rewritten. - `git::Diff` follows the setting; new `git::DiffHead` always opens the HEAD diff; `git::BranchDiff` is renamed `git::DiffBranch` (deprecated alias kept). Tradeoffs / known limitations: - Hunk-level staging is unavailable while in `default_branch` mode (whole-file staging via the git panel still works). Staging just the uncommitted sub-ranges of a branch hunk is a follow-up. - Remote hosts running an older server ignore the new `GetTreeDiff.includes_worktree` proto field and degrade to committed-changes-only branch diffs. - Repositories with no resolvable default branch fall back to HEAD-relative behavior; a failed first resolution retries on the next branch-list change. ## Testing - Real-git-repo tests for the merge-base-to-worktree diff's edge cases: files recreated after index deletion, committed deletions recreated on disk, and symlinks. - GPUI tests for status semantics (a branch change reverted on disk shows clean), `git::Diff` routing, live setting changes, and read-only hunk enforcement (restore/stage leave buffer and index untouched). ## 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: - Git: Added a `git.diff_base` setting (`"head"` or `"default_branch"`) that makes the editor gutter, file colors, and diff view show all changes on the current branch since its merge base with the default branch, instead of only uncommitted changes. --------- Co-authored-by: Ben Kunkle <ben@zed.dev> |
||
|
|
9c7a5c9485 |
docs: Document the --existing CLI option (#61979)
# Objective Fixes #61730. Document the `-e`, `--existing` CLI option, which was missing from the CLI reference. ## Solution - Added documentation for the `-e`, `--existing` CLI option. - Added a usage example. - Updated the default behavior note to include `-e`. ## Testing - Built the documentation locally using `mdbook`. - Verified that the new section renders correctly in the CLI Reference page. - Confirmed the example and updated default behavior note appear as expected. ## Self-Review Checklist - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [ ] The content adheres to Zed's UI standards (Not applicable) - [ ] Tests cover the new/changed behavior (Documentation change only) - [x] Performance impact has been considered and is acceptable ## Showcase The CLI Reference now includes documentation for the `-e`, `--existing` option. <details> <summary>Documentation Preview</summary> <img width="935" height="539" alt="Screenshot 2026-07-31 151714" src="https://github.com/user-attachments/assets/c2e4ad05-a961-4fe1-8c22-5e3a474e96ca" /> </details> --- Release Notes: - Improved CLI documentation by adding the missing `--existing` option. |
||
|
|
58a3c0fa0e |
docs: Fix mismatch of default dock position setting in project panel (#61971)
# Objective Fixes #56277, the document-source mismatch of the default dock position setting in project panel. I also have found that the visual customization guide has the same issue, so this PR fixes it too. ## Solution I have updated the corresponding markdown files. ## Testing I have tested the updated documents by rendering them in my local. ## 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 |
||
|
|
27ca052629 |
docs: Add missing font fallback documentation (#55779)
Adds missing documentation about font fallbacks on `appearance.md` and `all-settings.md` `all-settings.md` only lacked terminal font fallback documentation so that's the only thing I added there. Self-Review Checklist: - [X] I've reviewed my own diff for quality, security, and reliability - [it's a doc update] Unsafe blocks (if any) have justifying comments - [there is no ui] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [it's a doc update] Tests cover the new/changed behavior - [i really hope that my extra bytes on documentation cause no performance impacts] Performance impact has been considered and is acceptable Release Notes: - N/A |
||
|
|
36911f8cab |
docs: Clarify window_decorations currently only works on Linux (#61883)
Also add the setting to our docs at https://zed.dev/docs -- it’s currently missing. Updated a stale comment as well -- window decorations were [always supported on X11](https://github.com/zed-industries/zed/pull/13611)? Closes #61788. --- Release Notes: - N/A |
||
|
|
8c7811ea72 |
Split VSCode and Zed keymap files (#61532)
Currently, Zed's "VSCode" keymap has certain discrepancies that are not changed for compatibility reasons, e.g. opening inline assistant is different in each editor. To simplify the transition, extract VSCode bindings its own keymap so in the future it's simpler to accept changes to each keymap separately. Caveat: people who had ever changed the keymap, will have VSCode keymap in their settings which will change their bindings slightly after this commit is released. I had to introduce more logic to `null` handling as had to somehow disable `ctrl-enter` on mac from spawning the inline assistant block for VSCode keymap (it's cmd-i there). Release Notes: - Split VSCode and Zed keymap files |
||
|
|
97d854b89b |
project: Prevent empty external formatter output from clearing buffers (#61276)
## Context Zed runs external formatters as stdin/stdout filters: it writes the current buffer to stdin and replaces the buffer with the formatter's stdout. Commands such as `cargo fmt` instead rewrite files on disk and exit successfully without producing stdout, causing Zed to interpret the empty output as the formatted contents and clear a non-empty buffer. The fix treats empty stdout from a successful external formatter as no output when the original buffer is non-empty. Zed leaves the buffer unchanged and displays a notification explaining that the formatter did not return formatted contents. The formatter documentation now clarifies the stdin/stdout contract and recommends using the Rust language server or invoking `rustfmt` directly. Closes #56344 Behavior before the fix : [Screencast from 2026-07-19 02-58-29.webm](https://github.com/user-attachments/assets/61fc5bf9-4420-43f1-94a3-394bbbc4f2a0) Behavior after the fix : [Screencast from 2026-07-19 02-55-35.webm](https://github.com/user-attachments/assets/21062065-6b95-4cd4-8200-506f5681d98e) ## How to Review **crates/project/src/lsp_store.rs** Start with `format_via_external_command`, which now checks whether a successful formatter returned empty stdout while the input buffer was non-empty. In that case, it returns `None` before constructing a diff, preventing the buffer contents from being replaced with an empty string. Then review the external formatter branch in `apply_formatter`: when it receives `None`, it skips extending the formatting transaction, logs the condition, and emits an `LspStoreEvent::Notification` explaining why the buffer was left unchanged. **crates/editor/src/editor_tests.rs** Adds a GPUI regression test that configures an external command to consume stdin and return no stdout. It uses platform-specific commands for Windows and Unix, invokes manual formatting on a non-empty Rust buffer, and verifies that the buffer remains unchanged, the operation is not recorded as a formatter failure, and a notification is emitted. **docs/src/reference/all-settings.md** Extends the external formatter documentation to state that formatters must return the formatted buffer through stdout. It calls out file-rewriting tools such as `cargo fmt` as incompatible and recommends using the Rust language server or `rustfmt --emit stdout`. ## Self-Review Checklist - [x] I've reviewed my own diff for quality, security, and reliability - [ ] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the UI/UX checklist - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - Fixed external formatters that produce no output clearing non-empty buffers |
||
|
|
54c5db8346 |
Disable LSP for files with very long lines (#61447)
Release Notes: - Fixed ui stutters when opening large single line files like minified javascript due to running LSP requests against them |
||
|
|
34bfb3842d |
title_bar: Add show_worktree_name setting (#61137)
Adds a title_bar.show_worktree_name setting (default: true) that hides the worktree picker button in the title bar, mirroring how show_branch_name gates the branch picker. The "/" separator only renders when both buttons are visible, and the container is omitted entirely when both are hidden. The setting is hide-only: it deliberately does not join the render_project_items gate, so configurations with show_branch_name and show_project_items both disabled keep hiding the whole group as before. Requested in discussion [zed-industries/zed#54902](https://github.com/zed-industries/zed/discussions/54902). # Objective The worktree name is always present in the title bar even when unused. Unlike the branch name it has no dedicated option to disable it. Requested in discussion [zed-industries/zed#54902](https://github.com/zed-industries/zed/discussions/54902). ## Solution Adds a `title_bar.show_worktree_name` setting (default: true) that hides the worktree picker button in the title bar, mirroring how show_branch_name gates the branch picker. The "/" separator only renders when both buttons are visible, and the container is omitted entirely when both are hidden. The setting is hide-only: it deliberately does not join the render_project_items gate, so configurations with show_branch_name and show_project_items both disabled keep hiding the whole group as before. ## Testing I tested the setting added by running the application by adding, removing and toggling the `title_bar.show_worktree_name` setting in the `settings.json` ## Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [ ] 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 - [ ] Performance impact has been considered and is acceptable ## Showcase <img width="1496" height="982" alt="title_bar.show_worktree_name = false" src="https://github.com/user-attachments/assets/b2c502de-a8d8-4409-ba04-5ab807c77a8e" /> <img width="1496" height="982" alt="title_bar.show_worktree_name = true" src="https://github.com/user-attachments/assets/6cea7eb5-0e88-454c-9c97-3b4ad62aed51" /> --- Release Notes: - title_bar: Added title_bar.show_worktree_name (default: true) to hide worktree picker button Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
d06ebb7c03 |
Disable all spinners in Zed (#60614)
Closes https://github.com/zed-industries/zed/pull/48577 Part of https://github.com/zed-industries/zed/issues/8043 See https://zed-industries.slack.com/archives/C07NUKHLVUZ/p1783335475957139 for context. Release Notes: - Allow to reduce animations with `"reduce_motion": "on"` settings |
||
|
|
b9f3396b68 |
Add support for format_on_save only changed lines (#49964)
## Summary Introduces `format_on_save` variants that format only modified lines, limiting formatting to lines changed since the last commit. This prevents massive diffs when editing legacy codebases. Aligns with VS Code's `editor.formatOnSaveMode` naming: - `"modifications"` — formats only git-diffed lines. Requires source control; skips formatting if no diff is available. - `"modifications_if_available"` — formats only git-diffed lines, falling back to full-file formatting for untracked files, when source control is unavailable, or when the LSP does not support range formatting. Also supports importing equivalent VS Code settings (`formatOnSaveMode`). This PR uses the range-based whitespace/newline infrastructure from the dependency PR above. ## Changes <details> <summary><b>New settings, modified ranges computation, VS Code import</b></summary> ### New settings (`language.rs`, `default.json`, `all-settings.md`) Two new `FormatOnSave` variants: `Modifications` and `ModificationsIfAvailable`. ### Modified ranges computation (`items.rs`) - `compute_format_decision()` — reads `format_on_save` setting across all buffers, determines whether to use ranged formatting (`Ranges`), full formatting (`Full`), or skip (`Skip`). - `compute_modified_ranges()` — extracts modified line ranges from git diff hunks via `BufferDiffSnapshot`. - `is_empty_range()` — helper to detect deletion-only hunks that produce no formatable content. The `save()` method calls `compute_format_decision()` and dispatches accordingly. ### Modifications mode in `lsp_store.rs` - Adds `FormatOnSave::Modifications | FormatOnSave::ModificationsIfAvailable` to the formatter selection match arm. - `ModificationsIfAvailable` falls back to full-file formatting when ranged formatting produces no results. ### VS Code settings import (`vscode_import.rs`, `settings_store.rs`) Imports `editor.formatOnSaveMode` mapping: - `"modifications"` → `FormatOnSave::Modifications` - `"modificationsIfAvailable"` → `FormatOnSave::ModificationsIfAvailable` - `"file"` → `FormatOnSave::On` </details> ## Tests - `test_modifications_format_on_save` — basic modifications mode formatting with dirty buffer - `test_modifications_format_no_changes` — clean buffer triggers no formatting - `test_modifications_format_lsp_no_range_support` — LSP without range formatting skips entirely for `Modifications` - `test_modifications_format_lsp_returns_empty_edits` — empty edits handled gracefully - `test_modifications_format_multiple_hunks` — two non-adjacent edits produce two separate range formatting requests --- 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 is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Closes #16509 Depends on #53942 Release Notes: - Added `modifications` and `modifications_if_available` options to `format_on_save`, which format only git-changed lines instead of the entire file - When using modifications mode, `remove_trailing_whitespace_on_save` and `ensure_final_newline_on_save` are also scoped to changed lines, preventing unwanted diff jitter in legacy codebases - Added support for importing VS Code's `editor.formatOnSaveMode` setting --------- Co-authored-by: Kirill Bulatov <kirill@zed.dev> |