935e2b0bd034b7ae46832e691e6ba7bc053edcb5
1870
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
74405573c9 |
gwen: Rebrand documentation to Gwen
Rewrite product prose and local path/command examples across the docs to match the shipped application (gwen CLI, Gwen config paths, Gwen.app, com.yrkaierx.Gwen). Upstream distribution channels, service URLs and package identifiers stay factually intact. |
||
|
|
b015cdf8be |
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. |
||
|
|
a18b1a1026 |
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. |
||
|
|
fbd6cc5dcf |
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> |
||
|
|
3a7b16da5d |
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> |
||
|
|
24f3009720 |
Import VS Code files.exclude into file_scan_exclusions (#64492)
## Objective Import VS Code’s `files.exclude` into `file_scan_exclusions`. The previous `files.watcherExclude` mapping was dead code: it expected an array, while VS Code stores an object of `pattern: bool`. `files.watcherExclude` only stops watching, and the files stay visible in VS Code, so it is not a match for `file_scan_exclusions`. `files.exclude` hides files from the explorer and search, which matches `file_scan_exclusions`, and its default set is nearly identical to Zed's. Related to #62769, reported during the review of #64484. A meta follow-up to #64399. ## Solution Import nonempty `files.exclude` patterns enabled with `true`, ignoring disabled and malformed entries, including VS Code's `{"when": ...}` form. Append `"..."` so the imported list extends inherited exclusions instead of replacing them. Inputs with no usable patterns leave the inherited list unchanged. `files.watcherExclude` is no longer imported. ## Testing The new regression tests reproduce the bug and verify the fix. To check manually, import `{"files.exclude":{"**/build/**":true,"**/cache/**":false}}` and verify that `file_scan_exclusions` becomes `["**/build/**", "..."]`, and that `.git` stays hidden in the project panel. ## 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: - Fixed importing VS Code `files.exclude` into `file_scan_exclusions`. --------- Co-authored-by: Kirill Bulatov <kirill@zed.dev> |
||
|
|
313f63eb71 |
Ignore invalid file patterns individually (#64525)
## Objective Prevent one invalid file pattern from discarding valid patterns or causing settings loading to panic. The pre-existing exclusion-matcher bug was reported during review of #64492 (part of #64399). ## Solution Ignore invalid entries individually and log their errors in `file_scan_exclusions`, `file_scan_inclusions`, `file_types`, `hidden_files`, `private_files`, and `read_only_files`. Preserve valid inherited entries without changing `"..."`, replacement, or empty list behavior. Valid brace inclusion patterns remain usable, including when an alternative spans multiple directories. ## Testing Reproduced matcher loss and inclusion and file type panic paths before fixing them. Targeted tests pass on macOS for mixed, inherited, replacement, empty, and all-invalid lists, including inherited `.git` exclusions, private file protections, and inclusion rescans with brace patterns. Windows and Linux execution remains untested. ## 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: - Fixed invalid file patterns discarding valid exclusions, hidden file rules, or read-only rules, or causing inclusion settings to panic. Also fixed invalid private file patterns discarding valid protections and invalid file type patterns causing settings loading to panic. --------- Co-authored-by: Kirill Bulatov <kirill@zed.dev> |
||
|
|
a439f856b8 |
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. |
||
|
|
94436f0873 |
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. |
||
|
|
25fccf11c1 |
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 |
||
|
|
2229b4e2d6 |
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. |
||
|
|
13b33084ab |
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 |
||
|
|
890edba9ce |
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`. |
||
|
|
d9abcde22a |
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 |
||
|
|
e0590874fd |
Share generics better and strip rodio audio features (#64260)
* Preserve bundle compiler flags commit commit is a follow-up to https://github.com/zed-industries/zed/pull/63432 Linux bundling script had custom `RUSTFLAGS` set which eradicated prior config. Moved all flags into `.cargo/bundle-config.toml` instead. * Trim audio features and compress resources commit removes unused `rodio` features and enables resource compression The win from the latter seems not that large, so can revert if needed, but seemed very easy to enable. With compiler wrappers disabled, `cargo clean --target-dir target/binary-size-split-build` and `cargo build --locked -p zed`: Before: 135.6s wall, 1569.8s CPU, zed binary 1175563800 bytes After: 130.5s wall (-3.8%), 1488.7s CPU (-5.2%), zed binary 1171527064 bytes (-0.3%, -4.0MB) With `ZED_BUNDLE=true CXXFLAGS=-stdlib=libc++` and `cargo --config .cargo/bundle-config.toml build --locked --release -p zed -p cli --target aarch64-apple-darwin`: Before: 369.4s wall, 3861.6s CPU, zed binary 381662328 bytes After: 369.4s wall (+0.01%), 3866.1s CPU (+0.1%), zed binary 377836968 bytes (-1.0%, -3.8MB) Release Notes: - N/A |
||
|
|
1469507d1b |
deepseek: Update DeepSeek Flash to V4.1 (#64014)
# Objective deepseek API: https://api-docs.deepseek.com/updates/ ## Solution deepseek rename deepseek v4 flash to deepseek flash https://github.com/user-attachments/assets/72c473c9-a4bf-49e0-a7d6-0217a6dcc65b --- Release Notes: - agent: Added support for DeepSeek Flash 4.1 --------- Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com> Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de> Co-authored-by: Bennet Bo Fenner <bennet@zed.dev> |
||
|
|
130bd49edf |
Fix accidental /// comments and a docs typo (#64287)
## Objective Fix small comment/docs typos left out of #64282. ## Solution - Replace accidental Rust-style `///` comments with `//` in `assets/settings/default.json` (`git_panel.tree_view` and `git.gutter_debounce`) - Fix typo in `docs/src/visual-customization.md`: `"enable_language_server" if false` ? `is false` ## Testing Comment/docs-only changes; no runtime behavior change. --- Release Notes: - N/A Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|
|
7f6d81014b |
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> |
||
|
|
3c779a6df0 |
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.
|
||
|
|
94d29d40f1 |
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 |
||
|
|
593d6a4d66 |
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> |
||
|
|
0446ad2294 |
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 |
||
|
|
c7a50ea221 |
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/977458038b62d8a989903aeb0f0c67cd12e8eb00/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/977458038b62d8a989903aeb0f0c67cd12e8eb00/crates/settings_content/src) | | `edit_prediction_provider` | `edit_predictions.provider` | same migration, plus [`default.json`](https://github.com/zed-industries/zed/blob/977458038b62d8a989903aeb0f0c67cd12e8eb00/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/977458038b62d8a989903aeb0f0c67cd12e8eb00/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/977458038b62d8a989903aeb0f0c67cd12e8eb00/crates/settings_content/src/extension.rs), [`terminal.rs`](https://github.com/zed-industries/zed/blob/977458038b62d8a989903aeb0f0c67cd12e8eb00/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 |
||
|
|
977458038b |
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 |
||
|
|
f05265c624 |
outline_panel: Show deleted files inside the file tree (#63570)
# Objective In a branch diff — or any multi-buffer containing deleted files — deleted files render as flat "external file" rows above the outline panel's tree, instead of at the path they used to occupy. They lose all directory context and appear as a bare list of filenames detached from the tree, which is confusing precisely when you are trying to review what a branch changed. The cause is that `File::project_entry_id` returns `None` for `DiskState::Deleted`, while the outline panel's tree is keyed end-to-end by `ProjectEntryId` — depth map, collapse state, children counts. A deleted buffer therefore falls through to the external-file path in `update_fs_entries`, even though its `File` still carries a perfectly good worktree and path. ## Solution Synthesize the missing entries at the point of classification and let the existing pipeline run unchanged. - Entries are synthesized for the deleted file **and** for any ancestor directories that no longer exist, so a wholly-deleted folder still appears nested at its old location. An ancestor is only taken from the worktree if it is a directory; a path that is a file now but was a directory when the deleted file existed is synthesized too, and sorted after the file so the nesting pass keeps the directory on its stack. - Ids come from a per-panel registry that hands them out sequentially downward from just below `ProjectEntryId::MAX`, keyed by path and kind. Real ids count up from zero, so the ranges cannot meet; sequential allocation means two entries can never share an id (the entry maps are keyed by id alone, so a collision would drop a row); and the registry is kept across updates, so collapse state on synthesized rows survives. - Whether a buffer with no worktree entry is a deletion is decided by its `DiskState`: `Deleted` always, `Present` never, `Historic` by its own flag, and `New` only when git status reports a deletion or the excerpt's diff has a base text. The last case is a file deleted in a commit on the branch: it is absent from disk, the working-tree status says nothing about it, and `GitStore::display_status` only reflects branch-diff statuses when `git.diff_base` is `default_branch`. A deletion has a base version; a path that never existed has none. A scan-excluded file, which also has no entry, is `Present` and stays an external row. - Auto-fold stops where deletion state changes, so a surviving `parent/` is never struck through together with its deleted child, and `select_parent` treats a folded row as a valid parent of the folded row beneath it. - Auto-reveal resolves a deleted row's ancestors from the panel's own `fs_entries` rather than re-querying the worktree, and only real directories are ever passed to `Project::expand_entry` (a synthesized id would go out as an `ExpandProjectEntry` a remote host rejects). Opening a deleted row resolves its excerpt from the buffer id, since `path_for_entry` cannot resolve a synthesized entry. Deleted rows are struck through by a `line_through` on the row's label wrapper. `HighlightedLabel` builds its text runs from `window.text_style()`, so an ancestor's style reaches them even though `LabelLike`'s own `strikethrough()` does not; nothing outside `crates/outline_panel` changes. Colour is deliberately left to git status, matching deleted editor tabs — a committed deletion leaves the working tree clean, so strikethrough is the only signal in a branch diff. ## Testing Thirteen new tests, each asserting the rendered tree through `display_entries`, which now prints external files and marks deleted rows: - deleted file nests under its surviving parent; deleted file inside a wholly-deleted directory gets synthesized ancestors at the right depth - a file absent from disk and from git status nests when its excerpt carries a base text, while a buffer on a path that never existed stays an external file, unmarked - a modified, scan-excluded tracked file stays an external file, unmarked - same-path file + synthesized directory: nesting and auto-reveal both pick the directory - auto-fold stops at the deletion boundary; `select_parent` climbs from a folded deleted chain to the folded parent above it - opening a deleted row scrolls the editor to its excerpt - auto-reveal expands the ancestors of a deleted file and ignores an external file on a nonexistent path - buffers with no `File` still become `ExternalFile` - synthetic ids are distinct per path and kind, and stable `./script/clippy`, `cargo fmt --all -- --check`, `cargo test -p outline_panel` (33) are green. Tested manually on macOS against a fixture branch with a committed file deletion, a wholly-deleted directory under a surviving empty one, a directory replaced by a same-path file, an uncommitted deletion, a scan-excluded modified file, and a modified and an added file. ## Suggested .rules additions - `GitStore::display_status` only reflects branch-diff statuses when `git.diff_base` is `default_branch`; the branch diff view can be open while the setting is `head`. Do not use it to detect committed deletions — a commit-deleted file's buffer is `DiskState::New`; check the excerpt's diff for a base text instead. - Outline panel: a directory with mixed children is marked unfolded while `fs_entries` is built, so an auto-fold chain only forms through single-subdirectory links. Tests for folding must use that shape. - `HighlightedLabel` builds its runs from `window.text_style()` at render time, so `LabelLike` modifiers such as `strikethrough()` and `italic()` are no-ops on it; put the style on an ancestor element instead. ## 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 The same branch diff, which deletes `src/utils/format.rs` (its directory survives) and the whole of `src/legacy/` (including a nested `internal/`), alongside a modified and an added file. | Before | After | | --- | --- | | <img src="https://github.com/user-attachments/assets/bf503759-77a7-4f31-80bb-a85936de0b8a" width="300"> | <img src="https://github.com/user-attachments/assets/c558b94b-4ca5-447f-a049-a3ab280c679a" width="300"> | | Deleted files sit above the project root as bare filenames, detached from the tree | Each is nested at its original path, with `legacy/` and `internal/` synthesized since they no longer exist on disk | Note that `utils/` renders normally while `legacy/` and `internal/` are struck through: the marking is per-entry, not applied to every ancestor on a deleted file's path. --- Release Notes: - Fixed deleted files appearing outside the file tree in the outline panel when viewing a diff --------- Co-authored-by: Kirill Bulatov <kirill@zed.dev> |
||
|
|
d66b5d2050 |
agent_ui: Enable terminal thread renaming from the Agent Panel (#63660)
## Summary - Follow up on #63578 by extending the existing `agent::RenameSelectedThread` action to the active Terminal Thread in the Agent Panel. - Preserve the existing Threads Sidebar behavior and default keybindings. - Document custom keymap assignment and add focused Agent Panel regression coverage. ## Testing - `cargo test -p agent_ui agent_panel::tests::test_rename_selected_thread_action --lib` - `cargo test -p sidebar rename_selected_thread --lib` - `cargo fmt --package agent_ui -- --check` - `npx prettier --check src/ai/terminal-threads.md` - Manually tested locally with a custom `AgentPanel > Terminal` keymap binding. Release Notes: - Added support for custom keybindings to rename Terminal Thread titles from the Agent Panel. ### screenshots <img width="921" height="205" alt="Screenshot 2026-09-02 at 18 40 31" src="https://github.com/user-attachments/assets/b1edabfc-35f9-42ef-b368-486003202349" /> |
||
|
|
797fa3b3d9 |
Update Zed trial copy for the $5 GPT Luna offer (#63969)
## Summary Updates Zed trial copy for [CLO-1373](https://linear.app/zed-industries/issue/CLO-1373/update-zed-to-show-the-dollar5-gpt-luna-trial). - Show $5 of GPT Luna and unlimited edit predictions across pre-sign-in, Free-plan, and active-trial onboarding. - Clarify that the 14 days begin when the trial starts, rather than when the welcome panel is viewed, and retain no-credit-card messaging. - Update hosted-model trial descriptions and use "Start Free Trial" for onboarding and AI configuration trial CTAs. - Document GPT Luna-only trial hosted-model access and the shared Zed/Delta $5 trial balance. This is a copy-only change. Trial eligibility, subscription creation, trial timing, billing, model-access enforcement, button actions, URLs, and telemetry are unchanged. Paid, Student, Business, and VIP plan descriptions are unchanged. This does not implement the offer on the backend. ## Verification - Rust formatting and `git diff --check` passed. - Prettier check passed for the pricing documentation. - Source checks confirmed the offer wording and unchanged callbacks, URLs, telemetry, and other plan definitions. - Katie built and launched Zed with `cargo run -p zed --bin zed`, then reviewed Component Preview and requested the final CTA wording. Formatting and diff checks were rerun after that wording adjustment; the final adjustment has not been rebuilt. - Confirmed the branch merges cleanly with the latest `main`. Release Notes: - Improved trial descriptions to show $5 of GPT Luna and unlimited edit predictions for 14 days from trial start. |
||
|
|
3d0649186f |
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> |
||
|
|
3a904a7722 |
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 |
||
|
|
2e9b4fe596 |
Unify copy actions for agent panel and markdown (#63884)
Before, it was not possible at all to copy the text from the agent panel, only its markdown. The PR breaks the existing ctrl/cmd-c binding there by using the same approach markdown preview does: copy as text by default, allow to copy as markdown via the context menu. Before: https://github.com/user-attachments/assets/2014f363-5167-4700-be86-9c0774d7e4fd After: https://github.com/user-attachments/assets/1dad253c-7a3b-4ca7-99c8-e8df8b3c3fd6 Release Notes: - Changed agent panel to copy text with cmd/ctrl-c, as markdown preview does. `markdown::CopyAsMarkdown` action is available still and can be bound if needed. |
||
|
|
99b0964454 |
agent_skills: Count description length in characters (#63766)
Closes #63620 Count Agent Skill descriptions by Unicode characters rather than UTF-8 bytes across validation, load-time warnings, the skill creator counter, and imported-description truncation. This aligns Zed with the Agent Skills specification and reference validator. Testing: - `cargo test -p agent_skills --lib` - `cargo test -p settings_ui --lib` - `cargo build -p zed` - Manually verified that a 342-character CJK description containing 1,026 UTF-8 bytes can be saved successfully - `./script/clippy -p agent_skills -p settings_ui --tests` is blocked by an unrelated existing `clippy::drain_collect` diagnostic in `crates/rpc/src/proto_client.rs` <img width="667" height="210" alt="Successfully created Unicode test skill" src="https://github.com/user-attachments/assets/2427fce2-9f0f-462d-959f-e08ad160b3d1" /> Confirmed that the Codex agent panel discovers the skill and exposes it in command completion without a length warning. <img width="953" height="367" alt="image" src="https://github.com/user-attachments/assets/8c100197-2e6e-4627-b3f8-862bdfaac918" /> Release Notes: - Fixed valid multibyte Agent Skill descriptions being rejected for exceeding a byte-based length limit. --------- Co-authored-by: Chara <249489759+cmdr-chara@users.noreply.github.com> Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com> |
||
|
|
d977c888b2 |
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> |
||
|
|
1aab982b0a |
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>
|
||
|
|
cac6725147 |
markdown_preview: Group settings and add automatic preview opening (#63462)
## Objective Markdown preview appearance settings are split between root theme settings and `markdown_preview`, and Markdown files always open as source editors even when a user primarily wants the rendered preview. ## Solution - Group the Markdown preview font settings under `markdown_preview`, migrate their legacy keys across supported settings scopes, and update defaults, Settings UI, and documentation. - Add `markdown_preview.open_markdown_files_in_preview`, defaulting to false. When enabled, clean Markdown opens are replaced by a rendered preview while preserving dirty editors, temporary-tab behavior, pane activation and focus, targeted navigation, workspace restoration, and the escape back to source. ## Testing - Manually verified on macOS that enabling the setting opens Markdown files as preview-only. - `cargo test -p markdown_preview` (three consecutive runs) - `cargo test -p migrator nest_markdown_preview` - `cargo test -p settings_content` - `cargo check -p markdown -p markdown_preview -p migrator -p settings -p settings_content -p settings_ui -p theme_settings -p workspace` - `./script/clippy -p gpui_apple -p markdown -p markdown_preview -p migrator -p settings -p settings_content -p settings_ui -p theme_settings -p workspace --features gpui_apple/runtime_shaders` - `cargo fmt --all -- --check` - `git diff --check` ## 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 ## Recordings https://github.com/user-attachments/assets/032ab36d-f934-4ef7-aa18-53f3955a7df8 https://github.com/user-attachments/assets/dc872265-2fe0-45ac-95eb-ff820d3a8164 Release Notes: - Added a setting to open Markdown files directly in preview mode and grouped Markdown preview settings together. |
||
|
|
d4424eec68 |
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> |
||
|
|
9be65a8dfe |
Strip local symbols from macOS and Linux release bundles (#63429)
Not sure if this PR is 100% good, since it removes symbols from local traces, leaving addresses only — but this what Windows seem to do already, and we have those symbols on Sentry to restore from, which were needed to normally read Linux perf traces already (see `perf.zip` in https://github.com/zed-industries/zed/issues/59689#issuecomment-5452720248) On the upside, uncompressed binaries' are now ~100MB less, which is a lot — hence decided to open the PR for the review ------------------- Strips debug info and local symbols from shipped macOS and Linux binaries, matching what Windows already does with PDBs: `bundle-mac` now always runs `dsymutil` before a new `strip -x` step, and `bundle-linux` adds `--discard-all` plus `zed.dbg`/`remote_server.dbg` extraction via `--only-keep-debug`. Sentry uploads are unchanged and precede stripping. The macOS binary UUID and the GNU build id survive stripping, so user-provided traces stay recoverable without rebuilding at the reporter's commit: `sample` output resolves via `atos` against the archived `zed.dwarf`, and `perf.data` via `perf buildid-cache` against the Sentry-archived binary. zed binary: macOS (2026-08-29 nightly): 420478976 -> 316503984 bytes (-24.7%, -104.0MB) Linux (v1.17.2 aarch64): 439417448 -> 336967256 bytes (-23.3%, -102.5MB) Downloads shrink far less, symbols compress ~7:1: the macOS DMG loses only ~15MB. Release Notes: - Improved installed size on macOS and Linux by stripping debug symbols from release binaries (roughly -25%) |
||
|
|
bfad3a6108 |
docs: Document focus_follows_mouse (#63646)
Release Notes: - N/A |
||
|
|
74f3fa1454 |
Support Emmet's wrap with abbreviation (#63383)
Closes https://github.com/zed-industries/zed/issues/15588 https://github.com/user-attachments/assets/2813d235-6dac-4fe6-9ae0-2783e16270ac Release Notes: - Added Emmet's wrap with abbreviation support |
||
|
|
7e7087a589 |
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. |
||
|
|
04fc4edf86 |
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. |
||
|
|
7402d91b26 |
sidebar: Add title renaming for Terminal Threads (#63494)
The Agent Panel already lets users rename Terminal Threads. This adds the same option to the Threads Sidebar. A rename in either place updates the other. <p> <img width="321" height="89" alt="image" src="https://github.com/user-attachments/assets/189a8598-f0da-4622-a5b0-b6a18a5750b7" /> </p> <p> <img width="324" height="77" alt="image" src="https://github.com/user-attachments/assets/2fc9f7aa-c791-4568-8729-fd3a78322d63" /> </p> Release Notes: - Added support for renaming Terminal Threads from the Threads Sidebar. |
||
|
|
bb501d9221 |
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> |
||
|
|
c99db2149e |
Fix repo docs (#63486)
* ensures The Rule cannot be accidentall removed * fixes the perf command example to capture call graphs, to avoid round-trips like https://github.com/zed-industries/zed/issues/59689#issuecomment-5453623044 (samples without call graphs are not quite usable for investigating bugs like these) Release Notes: - N/A |
||
|
|
951357a916 |
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> |
||
|
|
ee83eeca60 |
docs: Update documentation for YARA (#63340)
## Description Fixed documentation bug in \docs/src/languages.md\: - **Issue**: \Yara\ was incorrectly linked to \./languages/yarn.md\ and there was a duplicate \Yarn\ entry - **Fix**: Changed \Yara\ link to \./languages/yara.md\ and removed the duplicate \Yarn\ entry ## Testing - Verified both \yara.md\ and \yarn.md\ files exist in \docs/src/languages/\ - Applied Prettier formatting to the file --- Release Notes: - N/A --------- Co-authored-by: Kunall Banerjee <hey@kimchiii.space> |
||
|
|
0b1f4f4020 |
Delay-load ETW profiling DLLs (#62647)
Since we're here, improve the UX by prompting for a path when you save rather than when recording begins. Fixes #62334 Release Notes: - N/A |
||
|
|
05154a14af |
helix: Add m i m/m a m and preserve the selection after those actions (#59201)
# Objective - Preserve Helix mode selections after surround-related commands such as adding, deleting, and replacing surrounds. - Add Helix-compatible closest-pair behavior for `m i m` / `m a m` and surround commands that target `m`. - Avoid long stalls in Helix text-object boundary scans by removing repeated syntax-scope classification during textual scans. - Keep workflows like selecting text with `m i w`, applying `m s`, and continuing with `i`, `a`, or another surround command aligned with Helix behavior. ## Solution - Add selection anchors that preserve each pre-edit selection range and direction through surround edits. - Update Helix surround add so the resulting selection includes the added delimiters, allowing surround commands to compose and insert/append actions to land outside the pair. - Apply preserved selections to Helix surround delete and replace so non-empty selections are not collapsed to the cursor after the edit. - Add Helix-specific text-object bindings so `m` selects the closest surrounding pair, `t` selects types/classes, `c` selects comments, and `x` selects XML/HTML elements in Helix mode. - Match the current closest pair through language bracket queries, so delimiters inside strings or comments do not count as surrounding pairs. - Resolve the textual boundary scanner's `CharClassifier` once per scan and pass it by reference instead of recomputing the same classifier for every scanned character. Word and subword boundaries still clone it only to apply the `ignore_punctuation` flag. ## Performance The textual boundary scanner previously called `char_classifier_at(from.0)` inside the per-character comparison closures for the four `ImmediateBoundary` scan methods and `FuzzyBoundary::to_boundary`. That lookup resolves the language scope through the syntax layers, and the value was loop-invariant because every iteration used the scan's starting offset. Local debug benchmark, using `] m` in a roughly 540 KB buffer with no pair characters so the scan runs to EOF across all pair boundaries: | | `] m` | | ------ | -----: | | Before | 36.3 s | | After | 210 ms | This speeds up the remaining textual scanner paths, including `m i (` / `m i "`-style pair objects, word/sentence/paragraph objects, `]` / `[` text-object navigation, and `] m` / `[ m`. The current-pair `m i m`, `m a m`, `m d m`, and `m r m` paths use the tree-sitter closest-pair path instead. ## Testing - Ran `cargo test -p vim test_helix_surround -- --nocapture`. - The focused Helix surround test filter passed: 10 passed, 0 failed. - Added coverage for closest-pair selection, Helix-specific text-object keys, and surround selection preservation. ## 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 Helix mode support for closest-pair text objects with `m i m` and `m a m`. - Fixed Helix mode surround commands to preserve selections after edits and avoid slow textual boundary scans. |
||
|
|
7472da6de7 |
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> |
||
|
|
c684a6a537 |
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> |
||
|
|
3ba893e4ac |
editor: Add file permalink support to tabs and the Project Panel (#62177)
# Objective - Add file-level hyperlink support for opening and copying hyperlinks for Git remote source control to project panel and tabs - Unify the language for Git remote hyperlinks across blame, project panels, and tabs to be similar to GitLens' definitions (which are commonly used in VS Code) ## Solution - Updated the Git crate to expose relevant metadata to surface new options within the editor - Added new options for `Open File on Remote` and `Copy Remote File URL` to project panel/file explorer and file tabs - Altered the blame UI options to be consistent with new labels / more clear ## Testing - Ran `cargo run` to boot app and manually smoke test (see proof below) - Added unit tests for this change ## 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/d600ca4f-47e7-438c-90e1-f40124a606b4 --- Release Notes: - Added options to open or copy whole-file permalinks from file tabs and the Project Panel. --------- Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com> |