Commit Graph

2965 Commits

Author SHA1 Message Date
Fusora 563319c3f4 Sync Neovim default key mappings (#66759)
## Summary

Sync a few missing keymaps from Neovim.

## References

- https://neovim.io/doc/user/lsp/#gra
- https://neovim.io/doc/user/treesitter/#v_%5Dn

## Self-review

- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.

Release Notes:

- Added `g r t` keymap for `editor: go to type definition`.
- Added `] n` and `[ n` keymaps for `vim: select next/previous syntax
node`.
2026-11-13 16:24:06 +00:00
Finn Evers 3e23a0c482 Change the default settings value for file_finder.prefill_query_from_selection (#66856)
Closes https://github.com/zed-industries/zed/issues/66651

Changes the default for `prefill_query_from_selection`, as this is a
rather intrusive setting/breaking change and should not have went in
like it did here for all finders.

## Testing

Updated the existing tests.

## Self-review

- [X] I've reviewed my diff for quality, security, reliability, and
performance.
- [N/A] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [X] Tests cover the new or changed behavior.

Release Notes:

- Breaking: Changed the default value for the
`file_finder.prefill_query_from_selection` from `true` to `false`. If
you want to return to the previous behavior, toggle the setting at
[zed://settings/file_finder.prefill_query_from_selection](zed://settings/file_finder.prefill_query_from_selection)
2026-11-12 00:08:05 +00:00
overcome ba06cc5191 Add setting to show/hide title bar (#65671)
## Summary

Restores `title_bar.show` from #37428 with `always`, `never`, and
`hide_in_full_screen`.

- On macOS the whole native titlebar is hidden, so fullscreen no longer
reveals an empty bar at the top edge.
- The Threads Sidebar and thread history headers drop their window
controls together with the title bar.
- With client-side decorations, the window frame is square at corners
where no title bar, status bar or sidebar rounds the content.
- Leaving the Threads Sidebar falls back to the workspace when the
previously focused element is gone.

Includes macOS window-control handling adapted from #42540.

Related discussion: #55183.

## Testing

Tests and clippy for the touched crates pass on macOS and Linux.
Not run on Windows or under a real Linux compositor.

## Self-review

- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover visibility changes and focus restoration.

Release Notes:

- Added a setting to hide the title bar always or only in fullscreen.
- [GPUI] Added `Window::set_native_titlebar_visibility` on macOS and
`FocusHandle::is_rendered`.
- [GPUI] Fixed fullscreen changes not notifying window bounds observers
on Wayland and X11.
- [GPUI] Fixed the macOS titlebar staying opaque after a failed
fullscreen entry.

---------

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2026-11-11 19:41:02 +00:00
Michal Matczuk 051a638727 git_ui: Add commit view defaults for descriptions and files (#66331)
The commit view always opens with the description folded and all files
expanded.

This PR adds two settings so you can choose how it opens:

```json
"git": {
  "commit_view": {
    "expand_description": false,
    "expand_files": true
  }
}
```

Set `expand_description` to `true` to show the full commit message, or
`expand_files` to `false` to start with all changed files collapsed.
The defaults preserve the current behavior.
They are also available in Settings → Version Control → Git Commit View.
That section also absorbs the existing "Show Full File by Default"
setting from the former "File Diff" section, so everything for views
opened from a commit lives together. The JSON keys are unchanged.

The settings follow the existing `git.file_diff` pattern, and file
collapsing reuses the logic for folding binary files after the diff
loads.

Related: https://github.com/zed-industries/zed/discussions/64543

<!-- Add a screenshot of the "Git Commit View" section in Settings →
Version Control. -->

## Testing

Manually tested on Linux (Fedora 44, Wayland) with a debug build.



https://github.com/user-attachments/assets/d3db1251-de37-4978-9770-825dda15c0b0


## Self-review

- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.

Release Notes:

- Added `git.commit_view.expand_description` and
`git.commit_view.expand_files` to control whether the commit view opens
with the full commit message shown and the changed files expanded.
2026-11-09 11:03:27 +00:00
Oleksandr Kholiavko d2a4fb6ded tabular_data_preview: Range selection, edge jumps, and page navigation (#65161)
## Summary

Part of the tabular data preview navigation & selection series (see [PR
1 (#64916)](https://github.com/zed-industries/zed/pull/64916) for the
full overview and roadmap).

### Changes in this PR (2/8)

- **Range Selection (`tabular_data::ExtendSelection`):**
Extends cell selection bounding box with `Shift+Up/Down/Left/Right`,
keeping the anchor fixed in data-space.
- **Edge Navigation (`MoveUnit::Edge`):**
Jumps to the top/bottom or leftmost/rightmost cell on
`Cmd/Ctrl+Up/Down/Left/Right` and `Home/End`.
- **Symmetric Page Jumps (`MoveUnit::Page`):**
Moves by visible page height (`visible_rows - 2`) on `PageUp/PageDown`
to maintain a consistent 1-row context overlap.
- **Clear Selection (`tabular_data::ClearSelection`):**
  Clears the active selection cursor on `Escape`.

---

Release Notes:

- N/A
2026-11-08 20:08:14 +00:00
Frederick Morlock 9a8ab54db4 agent: Allow auto title generation to be disabled (#63998)
# Objective

The objective of this PR is to add a configuration option to disable
automatic title generation for agent threads. This feature is desirable
for users (e.g. as discussed in #63701) with token-based or compute
constraints as it can prevent unnecessary (for some) overhead from title
generation in addition to unnecessary large cache misses.

My personal motivation is that automatic title generation pushes my
entire context to my compute backend, which is a complete cache miss
because (it appears) the prefix to the prompt is different. Whether it
is intentional or not, automatic title generation can fire concurrent to
actual generation (see Misc Notes [1]), slowing down my machine (and the
output) considerably.

## Solution

This PR adds a configuration option, which is exposed in the UI as well
as through the standard settings.json channels, to disable automatic
title generation. It's worth noting that manual title generation, as
well as manual thread renaming, is still preserved. The configuration
merely disables the _automatic_ title generation when the option is
enabled.

Ignoring the code for setting up the configuration option, this PR
effectively adds a single condition to the `generate_title` call in
`thread.rs` (in `run_turn_internal` that constitutes the automatic title
generation. To my knowledge, this is what constitutes the "automatic
title generation" and in the situation where I've seen it triggered
reliably, it is no longer triggered when the disabling option is set.

## Testing

- Did you test these changes? If so, how?
- _Yes. I tested the functionality manually through disabling the
"Auto-Generate Thread Titles" option in the Settings UI and triggering
the condition where I knew automatic title generation would fire
(described in Misc Notes [1]). I also tested manual title renaming and
the "Regenerate thread title" function to ensure those functions were
not affected. I also ran `cargo test --workspace`, which succeeded, and
did UI regression tests (although it appears that my settings menu
changes were not covered by them, since they did not fail when I didn't
update the baseline)_
- _I also added automated tests for the feature, as well as tests to
ensure that manual title generation is not affected._
- Are there any parts that need more testing?
- _I was unable to fully test "Regenerate thread title" because it seems
incompatible with my local LLM (it gets updated to a blank string after
the compute backend returns). This is the case with the latest stable
Zed (v1.19.2) and does not constitute a regression in my eyes. The
automated tests I wrote should cover any regressions for users with a
fully functional "Regenerate thread title" button._
- How can other people (reviewers) test your changes? Is there anything
specific they need to know?
- _Try to trigger automatic title generation with "Auto-Generate Thread
Titles" enabled and disabled. You can verify that manual title
generation ("Regenerate Thread Title") and manual title renaming also
works._
- _It's worth noting that hosting my own compute backend (oMLX) was
crucial in discovering and diagnosing this problem. If a tester does not
have access to this, they will need to find another method of knowing if
the `generate_title` method fires (such as a simple `println!`)._
- If relevant, what platforms did you test these changes on, and are
there any important ones you can't test?
- _**I only tested my changes on macOS 27 beta**, although the change
set should be platform agnostic._

## 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

I have provided a screenshot of the location of the new toggle below

<details>
  <summary>Click to view screenshot of Settings page</summary>
<img width="1012" height="863" alt="Screenshot 2026-09-09 at 9 41 27 PM"
src="https://github.com/user-attachments/assets/5dd14f38-8cd1-46d1-b5bf-f2a6fb68c628"
/>

Above is a screenshot of the placement of the new Settings Menu item
("Auto-Generate Thread Titles"). It is disabled, which is not the
default.

</details>

## Misc Notes

[1]: My "sure fire" way of triggering the automatic title generation (at
an inconvenient time) is to stop a prefill request after sending a
message in an existing thread (which will trigger the automatic title
generation) then resend the message. Perhaps a healthier behaviour would
be to cancel in-progress title generation if another generation request
come in, but I think it is advantageous to give users an option to
disable automatic title generation regardless.

**LLM-Use Disclosure:** I used an LLM to assist in isolating the part of
the code responsible for automatic title generation triggering and
generating a portion of the code I am posting here. I have thoroughly
understood, checked, and tested the code which I am submitting manually,
and take full professional responsibility for its quality. I have added
a `Signed-off-by` section to my commit message to indicate my signing
off, and a `Co-Authored-By` section to indicate LLM use.

**No LLM was used in the writing of this PR text or commit message.**

Thank you! Please let me know if you want me to change anything.

---

Release Notes:

- Feature: Added a configuration option to disable automatic title
generation for agent threads

---------

Signed-off-by: Frederick Morlock <me@freddy.us>
Co-authored-by: Hennadii Chernyshchyk <genaloner@gmail.com>
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2026-11-06 19:51:13 +00:00
scarf e231594b6b git: Add date format and per-view date style settings (#66533)
## Summary

resolves #15272, take 2 of #58950
tl;dr: add following options:

```json
{
  "git": {
    "date_format": "locale", // "locale" (default), "iso", or a strftime format like "%Y-%m-%d %H:%M"
    "blame":         { "date_style": "relative" },
    "inline_blame":  { "date_style": "relative" },
    "branch_picker": { "date_style": "relative" },
    "stash_picker":  { "date_style": "relative" }
  },
  "git_panel": { "date_style": "relative" },
  "git_graph": { "date_style": "absolute" }
}
```

design per
https://github.com/zed-industries/zed/pull/58950#issuecomment-6017682621,
also pinging @smitbarmase per request

## Testing

screenshots are taken on fedora linux 44 + kde plasma 6.7.5

<img width="2560" height="1440" alt="image"
src="https://github.com/user-attachments/assets/0784f1f7-0e00-4be5-893d-775d617b33e4"
/>
<img width="1125" height="937" alt="image"
src="https://github.com/user-attachments/assets/7ae6c876-3a93-4876-a151-85632d54d982"
/>
<img width="1407" height="340" alt="image"
src="https://github.com/user-attachments/assets/2178804a-444b-4613-9024-3700b15e0cfe"
/>

changed each config values `Date Format {locale/iso/strftime} x Date
Style {relative/absolute}` and they all seem to work without issues
also, invalid date format will default to `locale` (with an warning log
like below)
```
2026-11-05T00:14:08+09:00 WARN  [project::project_settings] Invalid git.date_format: invalid component name `Q` at byte index 1
```

## Self-review

- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.

Release Notes:

- Added `git.date_format` and per-view `date_style` settings for git
dates

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2026-11-06 14:35:38 +00:00
Dmytro Danilenkov 4ba7d82f68 keymap: Fix cmd-o in macOS JetBrains keymap opening file dialog instead of project symbols (#66137)
## Summary

Closes #66136

With the JetBrains keymap on macOS, cmd-o opens the file dialog instead
of expected symbol search.

The fix: unbind the inherited Open with zed::Unbind, like
linux/emacs.json does for ctrl-n/ctrl-p. so after fix File > Open no
longer shows cmd-o

## Testing

- added test_jetbrains_project_symbol_shortcuts_override_open. Also
added shared helped in tests for similar case with emacs.
- manually tested on macOS. ran cargo run, choose jetbrains keymap on
startup, and voila cmd-o opens symbols.

## Self-review

- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.

Release Notes:

- Fixed `cmd-o` opening the file dialog instead of project symbol search
when using the JetBrains keymap on macOS.

---------

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2026-11-05 08:56:32 +00:00
Michal Matczuk 2dcdc4f216 git_ui: Make JetBrains Ctrl-K focus the commit message (#66330)
In the JetBrains keymap, `ctrl-k` (`cmd-k` on macOS) toggles focus on
the Git Panel.
If the panel is on History, the shortcut leaves you there instead of
taking you to the commit message.

This PR binds the shortcut to `git_panel::FocusEditor` and makes that
action available from the workspace.
It opens the Git Panel, switches to Changes, shows the commit editor if
hidden, and focuses it.

Pressing the shortcut again keeps focus on the commit message.
`alt-0` / `cmd-0` still toggles focus between the Git Panel and the
editor, and the existing `tab` / `shift-tab` bindings in the changes
list keep their behavior.

## Testing

Manually tested on Linux (Fedora 44, Wayland) with a debug build and
`"base_keymap": "JetBrains"`.

1. With the Git Panel on History and the editor focused, press `ctrl-k`:
the panel switches to Changes and focuses the commit message.
2. Repeat with the History list focused and with the Git Panel closed.
3. Hide the commit editor and press `ctrl-k`: it becomes visible and
receives focus.

## Self-review

- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.

Release Notes:

- Fixed `ctrl-k` (`cmd-k` on macOS) in the JetBrains keymap to focus the
commit message, including when the Git Panel is on History or closed.

---------

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2026-11-05 08:14:38 +00:00
chrisknsmn 4814ef66aa Document how preferred_line_length affects Rewrap (#66534)
Closes #47449

## Summary

The docs for `preferred_line_length` only describe soft wrap, but the
setting also controls the column `editor::Rewrap` wraps to, even when
soft wrap is off. This adds that to the setting's entry in
`all-settings.md` and to its comment in `default.json`.

The old description also appears in
`crates/settings_content/src/language.rs` and
`crates/settings_ui/src/page_data.rs`. I left those alone to keep this
docs-only, but I'm happy to update them too if you'd like.

## Testing

Tested on macOS with Zed 1.26.2, the installed release, since this PR
only changes docs and a comment.

1. Add these settings:
   ```json
   "languages": {
     "Plain Text": {
       "preferred_line_length": 40,
       "soft_wrap": "none"
     }
   }
   ```
2. In a `.txt` file, paste one long line of text with spaces and run
`editor: rewrap`. It wraps at column 40.
3. Undo, change `soft_wrap` to `editor_width`, and run `editor: rewrap`
again. It still wraps at column 40.

## Self-review

- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [ ] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist). (N/A: no UI
changes)
- [ ] Tests cover the new or changed behavior. (N/A: docs and comment
only)

Release Notes:

- N/A

---------

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2026-11-05 07:57:51 +00:00
Ahmed Tajelsir 504abf602a feat: config to toggle edit prediction button in the status bar (#66450)
## Summary

Resolves https://github.com/zed-industries/zed/discussions/26095


https://github.com/user-attachments/assets/fca26dcc-e526-4e69-b611-4b3cdcc91066

## Testing

Manually test your changes; report results, mention platforms if
relevant.
How can reviewers test this easily? Include setup and steps.

## Self-review

- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [ ] Tests cover the new or changed behavior.

Release Notes:

- Added an `edit_predictions.button` setting to toggle the edit
prediction button in the status bar
2026-11-03 09:14:29 +00:00
Piotr Osiewicz 00b86477f8 debugger: Allow configuring the default panel size (#66435)
Closes #66412

Add `debugger.default_width` for left/right docking and
`debugger.default_height` for bottom docking, along with controls in the
Settings Editor. Both default to 300 pixels, preserving the existing
default size.

## Testing

- All 22 debugger panel tests and 76 Settings Editor tests pass.
- Built and visually checked the Settings Editor on macOS with defaults
of 300/300 and custom values of 495/275 after relaunch.
- Rust formatting, documentation formatting, and `git diff --check`
pass.

Release Notes:

- Added support for configuring the debugger panel’s default size via
`debugger.default_width` and `debugger.default_height`.

Co-authored-by: Amp <amp@ampcode.com>
2026-11-02 17:27:20 +00:00
Andriy Massimilla 5a534d7b5d git: Add git auto fetch (#53089)
## Summary

Adds an opt-in periodic background `git fetch --all` for local
repositories, so remote-tracking branches and ahead/behind counts stay
current without a manual fetch.

Because the fetch runs unattended, it behaves differently from a
user-initiated fetch:

- **Trusted repositories only.** Re-checked on every tick, since a
worktree can be trusted or restricted at any point in a session.
- **Never prompts.** Credentials that need no interaction (e.g. an SSH
agent, or a credential helper answering from a keychain) still work.
Anything that would need input fails instead of blocking on a prompt
nothing will answer.
- **Silent.** No activity indicator in the status bar, since a spinner
every minute is noise. Failures are logged at debug level.
- **Stays out of the user's way.** It runs off the repository's serial
job queue, so status refreshes and staging aren't stalled behind the
network. A user-initiated fetch, pull, or push preempts an in-flight
background fetch rather than waiting for it.
- **Leaves the repository clean when stopped.** Stopping a fetch (a
settings change, preemption, closing the project) asks git to terminate
so it can remove its ref lockfiles, rather than killing it and leaving a
stale `.lock` behind that breaks every later fetch. It also never
triggers auto-maintenance on the user's behalf.

## Configuration

```json [settings]
{
  "git": {
    "auto_fetch": {
      "enabled": false,
      "interval_secs": 60
    }
  }
}
```

- `enabled` (default `false`): whether to fetch from all remotes in the
background.
- `interval_secs` (default `60`, clamped to a minimum of `15`): how
often to fetch.

Both are exposed in the settings UI under **Version Control > Git
Integration**, where the interval is only shown while auto-fetch is
enabled, and documented in `docs/src/reference/all-settings.md`.
Unrelated settings changes don't restart the timer.

## Implementation design

### `GitCaller`

The remote-capable `GitRepository` methods (`fetch`, `pull`, `push`,
`commit`) take a `GitCaller` instead of a bare `AskPassDelegate`:

```rust
pub enum GitCaller {
    /// A user started this and is waiting on it. Prompts route to the UI.
    User(AskPassDelegate),
    /// No user attached. Never prompts, and stops when the receiver resolves.
    Background(Option<oneshot::Receiver<()>>),
}
```

Every such command goes through `GitBinary::run_remote_command`, which
applies everything the caller implies. git, credential helpers, and ssh
each prompt through a different mechanism, so keeping the list in one
place means no call site can miss one. For `Background`:

| Prompt channel | Mitigation |
| --- | --- |
| git's own terminal prompt | `GIT_TERMINAL_PROMPT=0` |
| Credential helpers | `credential.interactive=false`, which is narrower
than clearing `credential.helper` so helpers that answer without
prompting keep working |
| askpass | `core.askPass=`, and `GIT_ASKPASS`/`SSH_ASKPASS` unset |
| ssh (key passphrases, host key confirmation) | `-o BatchMode=yes`
composed onto the ssh command git would otherwise use
(`GIT_SSH_COMMAND`, then `core.sshCommand`, then `ssh`), so custom ssh
commands keep working. Setups that only set the deprecated `GIT_SSH` are
left alone, since setting `GIT_SSH_COMMAND` would silently replace them.
|

`gc.auto=0` is also set, since auto-maintenance can repack the whole
repository. gpg's pinentry when signing isn't covered, as no background
caller signs.

### Cancellation

A background command is spawned with `kill_on_drop` and raced against
its cancel receiver, where a dropped sender counts as cancellation:

1. If already cancelled before spawning, git is never started.
2. On cancellation, git is sent `SIGTERM`
(`util::process::request_termination`), which runs its handlers that
remove lockfiles.
3. If it hasn't exited within a 2s grace period, it's killed.

Windows has no equivalent signal, so cancellation there is a kill.

### Scheduling

- Each repository has a timer task, restarted only when `enabled` or
`interval_secs` change.
- On each tick, the timer checks trust, then tries to acquire the
repository's `fetch_lock` semaphore and skips the tick if it's held. It
spawns a **detached** fetch task that holds the permit until the fetch
settles.
- `AutoFetchState.cancel` holds the sender, and is the only thing
bounding the fetch's lifetime. It's dropped on a settings change, on
preemption, and when the repository is dropped, so every way of stopping
a fetch goes through graceful cancellation.
- Running off the serial job queue is safe because auto-fetch mutates no
`Repository` state. It only updates remote-tracking refs, which git
guards with its own lockfiles, and the results reach the UI via the
resulting git directory rescan. Manual fetch stays on the queue, since
it also writes snapshot state via `refresh_branch_list`.
- `fetch`, `pull`, and `push` call `preempt_auto_fetch()`, which drops
the cancel sender, then wait on `fetch_lock` inside their job. That wait
is bounded by a cancelled fetch shutting down rather than by the
network, and stops them failing with "cannot lock ref" against a
background fetch.

## Test plan

`test_auto_fetch` covers:

- [x] An untrusted repository is never auto-fetched, and fetching begins
once its worktree is trusted
- [x] Timer fires on schedule, and again on the following interval
- [x] Unrelated settings change mid-interval doesn't reset the timer
- [x] Disabling `auto_fetch` stops all fetches
- [x] Re-enabling with a longer interval respects the new cadence

## Review
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

Addresses
#24611(https://github.com/zed-industries/zed/discussions/24611)

Release Notes:

- git: Added option (off-by-default) to automatically fetch upstream of
the current branch and default upstream of the project. Enable it with:
```
{
  "git": {
    "auto_fetch": {
      "enabled": false,
      "interval_secs": 60
    }
  }
}
```.

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Codex (GPT-6) <noreply@openai.com>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2026-10-29 10:48:05 +00:00
Gabriel 28917a970d helix: Fix system clipboard clobbering (#55455)
Hi! Pleased to be able to contribute

In Helix, plain `y`/`d`/`c`/`p`/`R` operate on register `"` and the
system clipboard is reached with `+y`/`+d`, etc... Under
`vim.use_system_clipboard: "always"`, the plain operations also
clobbered the system clipboard. For ex:

- Pressing `d` on a blank line empties the OS clipboard
- Pressing `d` on a selection overwrites the clipboard with the deleted
text

This restores Helix's separation between the `"` and `+` registers in
helix mode only. Regular vim mode is not affected by the 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 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

I'm pretty sure this is related to #42975 

Release Notes:

- fix(helix): system clipboard clobbering

---------

Co-authored-by: Lukas Wirth <lukas@zed.dev>
2026-10-29 10:19:39 +00:00
Agus Zubiaga 182d15a629 icons: Add SquareR icon (#66168)
## Summary

Adds a `SquareR` icon to `IconName`, matching the existing `SquarePlus`,
`SquareDot`, and `SquareMinus` status badges. It's meant for marking
renamed files in diff and changes lists. The artwork is by Danilo.

No Zed code uses it yet; this only adds the icon.

## Testing

- `cargo check -p icons`
- Rendered the SVG to confirm the artwork.

## Self-review

- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [ ] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [ ] Tests cover the new or changed behavior.

Release Notes:

- N/A
2026-10-26 13:46:57 +00:00
Kirill Bulatov 5d47f83542 Allow opening README files by default (#65389)
Closes https://github.com/zed-industries/zed/discussions/38228


https://github.com/user-attachments/assets/4f80a4a8-8e4a-499b-b51f-4d389fe1f781

Release Notes:

- Added a way to open README files by default, use `"on_new_window":
"readme",` to configure
2026-10-22 09:26:30 +00:00
Chinmay Talnikar d7adf3e7e2 project_panel: Add extension sort order (#65776)
Adds an `extension` value to `project_panel.sort_order` so files with
the same extension appear consecutively.

- Files are grouped by lowercased last extension in ascending order
(`foo.tar.gz` groups under `gz`).
- Extensionless files and dotfiles come first.
- Within a group, names use the existing natural sort.
- `sort_mode` still controls directories vs. files. Directories count as
having no extension so `mixed` mode keeps a consistent (transitive)
ordering.

Includes unit tests in `util`, a panel-level test, a benchmark entry,
and settings/docs updates.

Release Notes:

- Added an `extension` option to `project_panel.sort_order` that groups
files by extension

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2026-10-21 08:48:46 +00:00
Tortes afff3d2616 debugger: Add hover tree UI (#53198)
Closes #32932

## Summary

- Show debugger values as an expandable tree, with the first level
visible immediately and deeper variables loaded on demand.
- Show the debugger value without waiting for a slow language server,
then show LSP documentation below it when it arrives. If debug
evaluation fails, keep the regular LSP hover.
- Keep the hover within the editor while expanding or resizing, with a
visible scrollbar and a hint for variable actions.
- Support mouse, keyboard, Vim, and Helix navigation. Long values remain
readable through wrapping or scrolling; the variable menu can copy a
value or expression and add an expression to Watch.
- Handle bare identifiers such as `a` in `let c = a;`.

## Testing

- `cargo test -p editor hover_popover -- --nocapture`
- `cargo test -p debugger_ui hover_values -- --nocapture`
- `cargo test -p project test_hover_ -- --nocapture`
- `cargo test -p ui compact_scrollbar_thumb_tracks_the_visible_fraction
-- --nocapture`
- `cargo test -p vim test_digraph_keymap_conflict -- --nocapture`
- `cargo fmt --all -- --check`

## Demo

Earlier recording (before the latest interaction refinements):
https://github.com/user-attachments/assets/dfb6d4d7-b52e-45a3-b921-dc14719ccd50

Release Notes:

- Improved debugger hovers with an expandable, keyboard-accessible
variable tree.

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Amp <amp@ampcode.com>
2026-10-19 14:36:18 +00:00
Matthew 2d4c483194 gpui_apple: Display P3 option for MetalRenderer's colorspace (#64394)
# Objective

Add an optional Display P3 support for macOS metal_renderer. The idea
for the change originates from the Ghostty's setting `window-colorspace
= display-p3' which slightly enhances even BGRA8Unorm colors.

Closes #8293
## Solution

- Added an option to the settings, marked it as `(macOS only)`. The
option is `Display P3` in the UI and `use_display_p3` in the config.
- Modified `metal_renderer.rs` to create a native colorspace object and
made it be used by the created MetalRenderer.

## Testing

Manually tested on Macbook M4 Pro (supports wide gamut). 
I believe, it needs no specific tests as long as they are no dedicated
tests for creating MetalRenderer

## 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 --- See Testing section
- [x] Performance impact has been considered and is acceptable

## Showcase

<img width="1512" height="982" alt="p3shot-2026-09-17-191715"
src="https://github.com/user-attachments/assets/548a208c-e5c0-4cfe-8fff-47368885cc4a"
/>

---

Release Notes:

- Added support for P3 color space on macOS (`use_display_p3` in
options).
- [GPUI] Added support for P3 color space to Metal renderer (macOS
only).

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Amp <amp@ampcode.com>
2026-10-16 17:00:17 +00:00
sebascadpi ef376006f3 tab_switcher: Add setting to disable file preview (#56235)
Closes [#45068](https://github.com/zed-industries/zed/issues/45068)

I added a setting that allows for files to not be displayed in the
editor while cycling through the tab switcher, it personally caused me
some confusion when I had to switch from one file to another and I was
shown other files' code I didn't care about, so I thought it would be
nice to have an option for only displaying the selected tab when you
release the ctrl key. See:


[zed-show_file_preview_false.webm](https://github.com/user-attachments/assets/3e49a253-2add-4e68-add6-08ecd1c81d01)

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

Release Notes:

- Added `tab_switcher.show_file_preview` setting to control whether
files previews are shown while cycling through the tab switcher (the
default behavior is true)

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Amp <amp@ampcode.com>
2026-10-13 12:01:51 +00:00
Kashish Sahu 9f94d13160 markdown_preview: Fix navigating back to the preview tab (#65299)
## Summary

Closes #64454

Going back (`ctrl-o` in Vim mode, the mouse back button, or the back
button in the tab bar) after switching away from a markdown preview
skipped the preview and landed on the tab before it.

Panes record history entries when an item is deactivated, but only if
the item adds itself: `Item::set_nav_history` and `Item::deactivated`
default to doing nothing, and `MarkdownPreviewView` didn't implement
either. The preview now stores its `ItemNavHistory` and pushes an entry
when deactivated, the same way other items do.

The entry carries no navigation data, so going back reactivates the
preview without restoring its scroll position. If the preview has been
closed, its entry is skipped, since it has no project path to reopen.

In Vim mode, `ctrl-o`/`ctrl-i` were only bound for editors, so pressing
them while the preview was focused opened the file dialog instead of
navigating. They're now also bound in the `MarkdownPreview` context.

## Testing

- Added `go_back_returns_to_preview_after_opening_another_file`. It
opens a markdown file and its preview, opens another file, goes back,
and asserts that the preview is active again. It fails without the fix.
- Manually tested on Linux (KDE Wayland): open a markdown file, open its
preview, open another file with the file finder, then go back with
`ctrl-o` and with the tab bar's back button. Both return to the preview,
and going forward returns to the other file.
- In Vim mode, `ctrl-o` and `ctrl-i` from the focused preview now go
back and forward instead of opening the file dialog.

## Self-review

- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] Tests cover the new or changed behavior.

Release Notes:

- Fixed navigating back to a markdown preview tab after switching to
another file, and `ctrl-o`/`ctrl-i` in Vim mode opening the file dialog
when the preview is focused.
2026-10-09 08:37:05 +00:00
Sha1rholder ef33e891bf Make mermaid diagram font family configurable (#63430)
# Objective

Fix #63428

## Solution

Add a settings option `"mermaid_font_family"` to allow escape from
`"ui_font_family"`. Does not affect any default behavior.

## 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

<img width="2426" height="1456" alt="Image"
src="https://github.com/user-attachments/assets/70ec2ae3-a184-4523-bce2-272c8f33b840"
/>

<img width="1838" height="668" alt="image"
src="https://github.com/user-attachments/assets/93711957-8f9c-42cd-afc0-a1ac84f1d7a3"
/>

Release Notes:

- Make mermaid diagram font family configurable to fix #63428

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Amp <amp@ampcode.com>
2026-10-06 12:47:57 +00:00
Kim Wittenburg 7c4f6ddad1 keymap: Fix shift-enter in search bar for JetBrains keymap (#65129)
## Summary

This PR fixes https://github.com/zed-industries/zed/issues/62696.
The current JetBrains keymap binds `shift-enter` to
`editor::NewlineBelow`. While that is correct for most contexts, in the
search bar it is not. In the search bar JetBrains products use
`shift-enter` to search backwards. The current keymap already tries to
rectify this by adding an explicit `search::SelectPreviousMatch`
mapping. However the precedence of this mapping is shadowed by an
`Editor && mode == auto_height` match.

This PR fixes the issue by giving the `search::SelectPreviousMatch` a
higher precedence by making it more specific to the search bar.

## Testing

(instructions for macOS)

1. Run a build with the modified keymap
2. Open a file and search via Cmd+F
3. Enter some text that occurs multiple times in the file
4. Press Shift-Enter. Notice that this searches in the document and
rotates through the matches in reverse order.

A note for test code: At first I didn't add a test for this change but
then I saw that a test for a similar change exists
(`test_thread_search_shift_enter_navigates_with_jetbrains_keymap`). The
test is AI generated. As far as I can tell the test makes sense, but I'm
not really familiar with the UI code. If you prefer to have the test
removed/changed, please tell me.

## Self-review

- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.

Release Notes:

- Fixed default Shift-Enter behavior in the JetBrains keymap to select
the previous search match

---------

Co-authored-by: MrSubidubi <finn@zed.dev>
2026-10-05 21:02:44 +00:00
Audi Nugraha e7c8cbeed6 extensions_ui: Add extension_suggestions setting to disable extension suggestions (#65109)
## Summary

Zed shows a notification suggesting extensions for the languages of the
files you open. Right now the only way to silence it is to dismiss each
suggestion one by one (stored per extension), or to add every extension
to `auto_install_extensions`. There is no way to turn the feature off as
a whole.

This adds an `extension_suggestions` setting (default `true`). When set
to `false`, `show_suggestion` returns early and no suggestion
notification is shown.

```json
{
  "extension_suggestions": false
}
```

To make the feature discoverable, this also:

- Adds an **Extension Suggestions** toggle to the General settings page.
- Adds a third **Never Suggest Extensions** action to suggestion
notifications that disables the setting globally.

Changes: `ExtensionSettingsContent` / `ExtensionSettings` get the new
field (non-optional `bool` with `serde(default_true)`),
`assets/settings/default.json` and `docs/src/reference/all-settings.md`
document it, `settings_ui` renders the toggle on the General page,
`MessageNotification` gains support for a tertiary action, and
`extension_suggestions.rs` checks the setting and wires up the new
notification action.

## Testing

- Added `test_no_suggestion_when_extension_suggestions_disabled` (opens
`index.html` with the setting off, expects no notification).
- Added
`test_disabling_extension_suggestions_persists_and_stops_suggestions`
(invokes the new action, asserts the setting is disabled and no further
suggestions appear).
- `cargo test -p extensions_ui extension_suggestions`: 22 pass, 2 fail.
The 2 failures (`test_suggestion_returns_after_uninstall`,
`test_suggestion_returns_after_failed_install`) also fail on `main`
without this change.
- Manually checked on macOS with a local release build: the General →
Extensions toggle works, and the **Never Suggest Extensions** action
disables the setting globally.

To test: toggle it off in Settings → General → Extensions, or click
**Never Suggest Extensions** on a suggestion notification, then open a
file whose language has a suggested extension.

## Self-review

- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.

Release Notes:

- Added an `extension_suggestions` setting to turn off extension
suggestions.

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: MrSubidubi <finn@zed.dev>
Co-authored-by: Finn Evers <finn.evers@outlook.de>
2026-10-05 16:40:35 +00:00
PleahMaCaka cad56bd65a languages: Stop treating .env files as shell scripts (#64242)
# Objective

Closes #58584. `.env` files are classified as Shell Script, so Zed runs
`bash-language-server` on them and `shellcheck` [reports SC2034 on every
line](https://github.com/zed-industries/zed/issues/58584#issuecomment-4625839715).

## Solution

Add an `Env` language that reuses the Bash grammar and registers no LSP
adapters, so highlighting stays and no language server starts. `.envrc`
remains Shell Script, since direnv executes it as shell.

#7124 mapped `.env` to Shell Script for highlighting and
`redactions.scm`, not for linting. `Env` keeps both and only drops the
language server.

## Testing

- By hand on Windows with `shellcheck` on `PATH`: a `.env` reports 18
SC2034 warnings before and none after.
- Unit test covers the `.env` / `.envrc` / `.sh` classification.

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [ ] The content adheres to Zed's UI standards
([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

<details>
  <summary>Click to view showcase</summary>

<img width="811" height="841" alt="Group 1"
src="https://github.com/user-attachments/assets/fe05e884-e915-420d-a0ba-4075fef8a3d3"
/>

</details>

---

Release Notes:

- Fixed `.env` files being treated as shell scripts, which made
`shellcheck` report SC2034 on every line. ".env" files now use a
separate Env language.
2026-10-05 10:24:44 +00:00
Oleksandr Kholiavko 3fec483014 tabular_data_preview: Single-cell focus and arrow navigation with reveal (1/8) (#64916)
## Overview

Part **1 of 8** in a series adding full keyboard/mouse navigation, cell
selection, multi-format clipboard copying, and keyboard-driven
sorting/filtering to `tabular_data_preview`.

Split into small, isolated PRs for review safety. The feature is gated
to debug/test builds (`cfg!(any(test, debug_assertions))`) until PR 6
(copying + context menus) to avoid exposing selection without copy
support.

---

### Full Series Roadmap

**1/8 (This PR):** Single-cell focus & arrow navigation with viewport
reveal
**2/8:** Range selection (`Shift+Arrows`), edge jumps
(`Cmd/Ctrl+Arrows`, `Home/End`), and page jumps (`PageUp/Down`)
**3/8:** Mouse selection, Shift+Click extension, and drag-to-select
**4/8:** Select All (`Cmd/Ctrl+A`) across datasets
**5/8:** Multi-format copy engine (TSV, CSV, Markdown, JSON Lines) &
`CopySelected`
**6/8:** Context menu, copy format settings, toasts, and release
enablement
**7/8:** Row selection via row gutter click/drag
**8/8:** Keyboard sorting (`Alt+S`), filter popover (`Alt+F`), and
filter clear (`Cmd/Ctrl+Alt+Backspace`)


NOTE, that all work is done & running on my machine end to end. The
split is just code review organization buerocracy.

<summary>
👇 Demo of fully ready feature👇 
</summary>
<details>


https://github.com/user-attachments/assets/696554f9-ca3e-4b74-83d1-948292668334



https://github.com/user-attachments/assets/5ef5f1f1-4f15-4b01-b825-de592d8a1972



https://github.com/user-attachments/assets/40c0e57f-da7a-440a-9ee6-48af8abe116e


</details>

---

### Changes in this PR (1/8)

1. **Data-Space Coordinates (`CellSelection`):** Coordinates anchor to
`DataCellId { row: DataRow, col: AnyColumn }` so selection survives
background sorting/filtering without shifting rows.
2. **Single-Cell Navigation (`tabular_data::MoveFocusedCell`):** Arrow
navigation (`Up`/`Down`/`Left`/`Right`), initializing focus at `(0, 0)`
on first movement.
3. **Viewport Auto-Scroll & Peek Cushion:** Auto-scrolls focused cells
with a 20px horizontal peek buffer and 1-row vertical context cushion.
4. **Focus & Outline:** Renders focused cell border
(`theme.colors().border_focused`) and binds `"context": "TableView"`.
5. **Debug Gating:** Hidden in release builds via
`is_selection_enabled()` until copying lands in PR 6.

---

Release Notes:

- N/A

---------

Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com>
2026-10-03 01:03:39 +00:00
Arti 708c7eef55 file_finder: Implement SeedQuerySetting::Selection seed_query (#64946)
## Summary

UX parity with JetBrains IDEs: there, you can
- select a file name/path in the terminal/editor
- press the "open file finder" hotkey
- see search results for that file

On Zed's main branch, you have to:
- select a file name/path in the terminal/editor
- press ctrl+c / ctrl+shift+c (depending on the context)
- press the "open file finder" hotkey
- see the default list of files for an empty search
- press ctrl+v
- see search results for that file

The issue is little one but it is a "death by a thousand cuts" type of
straw for me.


https://github.com/user-attachments/assets/26de5bba-98c2-4a1f-8540-1e0e646301e8

The feature can be disabled in the `settings.json` with the
`file_finder.prefill_query_from_selection` flag set to `false` or in the
settings UI page for file finder.

## Testing

To test this, a reviewer can:
- open any project
- select a file name/path in the terminal/editor
- press the "open file finder" hotkey
- see search results for that file

Then switch the checkbox in the file finder setting page (or set
`file_finder.prefill_query_from_selection` to `false` in settings.json)
and:
- select a file name/path in the terminal/editor
- press the "open file finder" hotkey
- see the default list of files for an empty search

## Self-review

- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.


Zed already has a `seed_query` mechanism for `text_finder`, built on
`SeedQuerySetting::Selection` and
`SearchableItemHandle::query_suggestion`, which I reused as much as
possible.

`FileFinder::seed_query` basically duplicates
`TextFinder::active_item_query` code (except checking if the setting is
disabled).

I wanted to unify the functionality but did not know where the new
unified method would fit better and decided that some code duplication
is not as terrible as bad refactor (if any reviewer can tell me a proper
place to put the method to get selected text for search query I will be
very thankful).

Ran every existing test (- each passed) and asked LLM generate new ones
for this PR (reviewed them and can vouch that they make sense)

Release Notes:

- Improved the file finder to pre-fill the search query with the text
selected in the terminal/editor
- [GPUI] Added a method for retrieving the selected text from any
registered input handler

---------

Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com>
2026-10-03 00:28:21 +00:00
mulham c83abe7d0e git_ui: Allow collapsing the commit editor and commit details (#63236)
## Summary

- The commit message editor in the Git panel is pinned to six lines and
its only two controls both make it *larger* — one fills the panel, the
other opens the modal. Anyone who commits from a terminal pays for an
input they never use, and the Changes list is what gets squeezed.
- In the Git Graph detail panel, the author metadata and the commit
message render at a fixed size above the changed-files list, so
shortening the panel (e.g. dragging the terminal up) hides the file list
entirely.

## Changes

**Git panel — collapsible commit editor**

- New `git::ToggleCommitEditor` action.
- A chevron beside the commit button hides the editor down to a thin
bar; the commit button row stays available.
- State persists per workspace via `SerializedGitPanel`, seeded from a
new `git_panel.commit_editor` setting (`expanded` | `collapsed`, default
`expanded`).
- Collapsing clears the fill state — a hidden editor cannot also fill
the panel.
- `activation_focus_handle` no longer focuses an editor that isn't
rendered.

**Git Graph — collapsible commit details**

- A disclosure folds the author metadata (avatar, refs, email, SHA,
provider link) down to a single author + short-sha line.
- A second disclosure folds the commit message body.
- The changed-files container is already `flex_1().min_h_0()`, so it
reclaims the freed space with no other layout change.

**Settings plumbing**

- `GitPanelCommitEditor` in `settings_content`, wired through
`GitPanelSettings`, `assets/settings/default.json`, the settings UI, and
`docs/src/reference/all-settings.md`.

## Test plan

- [x] `test_toggle_commit_editor_collapsed` added, covering the toggle,
persistence of the flag, and the fill/collapse exclusion.
- [x] Manually verified in a dev build: chevron hides and restores the
editor, Changes list expands into the freed space, action appears in the
command palette, state survives a restart, and the `collapsed` setting
seeds a new workspace.
- [x] Manually verified both disclosures in the Git Graph detail panel
with the panel shortened, including that the collapse state survives
selecting a different commit.

Release Notes:

- Improved the Git panel by allowing the commit message editor to be
collapsed, and the Git Graph commit details by making the metadata and
commit message sections collapsible.

### Evidance Test
| Expand | Collapse | Settings Git Panel |
| ------- | --------- | ------------------ |
| <img width="675" height="965" alt="Screenshot 2026-08-26 at 15 00 46"
src="https://github.com/user-attachments/assets/70c56d02-35fc-45ac-988c-24ccd6d1a19e"
/> | <img width="661" height="962" alt="Screenshot 2026-08-26 at 15 00
57"
src="https://github.com/user-attachments/assets/2c32fa5d-30fc-4f35-8323-afbc2a031210"
/> | <img width="1041" height="956" alt="Screenshot 2026-08-26 at 16 50
40"
src="https://github.com/user-attachments/assets/67f166b6-5cd9-4430-bba3-fa765715c557"
/> |

---------

Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com>
2026-10-02 17:25:11 +00:00
Bennet Bo Fenner 309f91f564 copilot: Move enterprise URI to top-level setting (#65082)
This PR is moving the `enterprise` URI to a top level `copilot` settings
because it is used for both Edit Predictions and Copilot Chat.
Previously it was listed under `languages > copilot > enterprise_uri`

Release Notes:

- N/A
2026-10-02 11:22:04 +00:00
Finn Evers 5c5236ded8 Remove descriptive comments in default settings (#65077)
This PR removes two comments from the default settings, as these merely
describe the sorting of the keys to follow and do not provide much
context/help for users browsing our default settings.

## Self-review

- [X] I've reviewed my diff for quality, security, reliability, and
performance.
- [-] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [-] Tests cover the new or changed behavior.

Release Notes:

- N/A
2026-10-02 09:45:58 +00:00
andrew 28d5832adb markdown_preview: Add heading_font_weight setting (#64421)
Headings in the Markdown preview are hardcoded to semibold (600). Users
who set a lighter UI font, or who simply prefer lighter headings, have
no way to change this.

This adds `markdown_preview.heading_font_weight`, applied to H1 through
H6 in the preview. It defaults to `600`, so existing rendering is
unchanged unless the setting is set.

```jsonc
{
  "markdown_preview": {
    "heading_font_weight": 500
  }
}
```

The value flows through `ThemeSettings` alongside the existing preview
typography settings, so the generic `markdown` crate gains no dependency
on `markdown_preview`. Because notebook Markdown cells share the preview
typography, they follow the setting too. Bold text inside headings and
table header cells keep their own weights. The setting is also exposed
in the settings editor under Markdown Preview Font, and documented in
the visual customization docs.

## Before / after

| Default (`600`) | `"heading_font_weight": 500` |
| --- | --- |
| <img width="2000" height="1299" alt="heading-weight-600-default"
src="https://github.com/user-attachments/assets/403d29bb-34ed-4cb1-b333-920ec5ee65f0"
/> | <img width="2000" height="1299" alt="heading-weight-500"
src="https://github.com/user-attachments/assets/9fbdd7f9-2d56-4815-a39e-fd1325ba7cd2"
/> |


## Testing

- New tests in `crates/markdown` assert every preview heading level
resolves to `600` by default and to the configured weight when set, and
that the weight does not leak into editor or agent Markdown.
- Verified manually in a dev build with `SF Pro` at weights 500 and 600;
the open preview re-renders on settings save.

Release Notes:

- Added `markdown_preview.heading_font_weight` to configure the font
weight of headings in the Markdown preview.
2026-10-02 08:35:39 +00:00
Daniel Strobusch 54edefa083 Sort built-in agent profile tool keys in default profiles (#65022)
## Summary

It allows quick comparison (diff) to custom profiles.

## Testing

Manually test your changes; report results, mention platforms if
relevant.
How can reviewers test this easily? Include setup and steps.

## Self-review

- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [ ] Tests cover the new or changed behavior.

Release Notes:

- N/A

Signed-off-by: Daniel Strobusch <1847260+dastrobu@users.noreply.github.com>
2026-10-02 08:22:43 +00:00
Gautam Manchandani 981b224a46 Fix forward Delete key icon (#65037)
<img width="2940" height="1720" alt="keymap-dark"
src="https://github.com/user-attachments/assets/f4c28b4f-6a33-4479-a24f-c95d64a790c3"
/>
Closes #64964.

Use a dedicated forward Delete icon (⌦) instead of Backspace (⌫). Add a
regression test for distinct icons.

Release Notes:

- Fixed identical Backspace and Delete icons in the keymap editor.
2026-10-02 08:11:03 +00:00
Danilo Leal 749a1df41d Add announcement banner for Delta (#64963)
## Summary

This PR introduces an announcement banner for Delta that will be shown
in the next Zed release.

## Self-review

- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.

Release Notes:

- N/A
2026-09-30 12:03:51 +00:00
Hazi c821538b57 agent: Add configurable idle thread retention (#64547)
## Objective

Add a configurable limit for idle, loadable agent threads retained in
memory.

Previously, a thread that was still running when the user switched away
from it was retained correctly, but was not reconsidered for unloading
after it completed. It could remain loaded until a later cleanup
trigger.

## Solution

- Add the `agent.max_idle_retained_threads` setting, defaulting to `5`.
- Re-run retained-thread cleanup when a retained ACP thread transitions
to `Idle`.
- Remove retained-thread status subscriptions when their thread is
unloaded or reactivated.
- Add regression coverage for unloading a retained thread after it
completes when the limit is `0`.

## Testing

- Added a GPUI regression test covering a running thread that is
retained, completes, and is then unloaded with:

  ```json
  {
    "agent": {
      "max_idle_retained_threads": 0
    }
  }
  ```

## 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
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Added a setting to control how many idle agent threads remain loaded.

---------

Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com>
2026-09-28 16:16:26 +00:00
AdinAck 408c713a35 settings default: Allow rewrap for Typst (#64858)
## Summary

Allows the "editor: rewrap" action for Typst content.

## Testing

Built locally, tested in `.typ` files, works!

## Self-review

This change is trivial, not much to review!

Release Notes:

- Changed settings defaults to allow rewrapping for Typst

---------

Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com>
2026-09-28 16:11:38 +00:00
Smit Barmase 00def035de which_key: Add keyboard shortcut to show pending bindings (#64803)
Follow-up #63343
Depends on #64859

The pending keystrokes indicator lists the bindings that can complete a
chord, but only on hover. This PR adds `which_key::ShowPendingBindings`,
bound to `alt-/`, which opens that list from the keyboard while a chord
is pending.

For example, press `cmd-k` (`ctrl-k` on Linux/Windows), then `alt-/`.
The list opens without moving focus and stays open until the chord
completes or is cleared, even if the pointer moves away. It follows the
chord as you type, and timed chords stay paused while it's open. With no
chord pending, `alt-/` does nothing.

**Why `alt-/`?**

`/` shares a key with `?`, which is a common "help" key, and `alt-/`
isn't bound in any default or base keymap. When no chord is pending,
`alt-/` behaves as before. It only opens this popup while a chord is
pending.

On macOS, `alt-/` normally types `÷`, and it still does when no chord is
pending. The shortcut only kicks in mid-chord. The one thing we lose is
that `cmd-k` then `alt-/` used to cancel the chord and type `÷`, and now
it opens the popover instead. I think that's rare enough to be okay, and
the key can be rebound or unbound.

It can be unbound or rebound to another key. One limitation is that it
must be bound to a single keystroke. A multi-keystroke binding would
need its own pending tracking on top of the chord that's already
pending, and we don't want to add a special pending state just for this.


https://github.com/user-attachments/assets/0a26b0ad-cd7b-49d9-b466-cce54e02bf80

Release Notes:

- Added `alt-/` to show the bindings that can complete a pending
multi-keystroke shortcut.
2026-09-28 11:18:28 +00:00
Paul Di Pietro 8a4fd5704c title_bar: Add an option to open menus on hover (#48496)
Closes #45603 

I wanted to open this and start a conversation/get some feedback after
encouragement from people in the above discussion. Currently, the
enabled `show_menus` setting causes them to open when hovered over,
which generally breaks with a longstanding user expectation for desktop
applications. It could be argued that this behavior shouldn't exist at
all, but it's of course possible that some people prefer it. To that
point, I explored adding an additional option, `show_menus_on_hover`,
which is disabled by default.

This also checks as to whether any menu is in use so that clicking a
menu and then navigating through them opens them accordingly. As
mentioned in the discussion, this doesn't address an existing bug where
some of the pane icons will blink while moving through the menus.

I'm unsure of how this specifically can or should be tested since I'm
learning as I go, so for now there's just screenshots from the
aforementioned discussion. I'm open to suggestions. As I'm sure some
might guess, these changes don't really apply to macOS as the menus are
always visible. I also do not have access to a Windows installation at
this point.

(Tested in Arch Linux / KDE Plasma 6.5.5; ran the release build to take
clips)


![hover-on](https://github.com/user-attachments/assets/6601f927-ef68-4d24-b05b-c442ecc87137)

![hover-off](https://github.com/user-attachments/assets/716e79e2-5a84-41df-a394-acfbac59b2be)
<img width="1380" height="752" alt="setting"
src="https://github.com/user-attachments/assets/7a3614ae-d5fd-4767-9ca4-330c91e40bcc"
/>

Release Notes:

- Changed title-bar menus to require a click before opening. Enable
`title_bar.open_menus_on_hover` to open them on hover instead.

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2026-09-28 09:30:00 +00:00
Aru Sahni 4f70d91bda editor: Add support for customizable soft wrap indentation (#63468)
# Objective

- Soft wrapped lines currently inherit the indentation of their first
line. This can be challenging for those coming from different editors,
or with different expectations.
- Allow users to customize the soft wrap behavior to wrap with extra
indent, or no indent at all.
- Fixes #18687

## Solution

- Introduce 3 soft-wrap indent configuration values (in addition to the
default of `same`): `none`, `extra_one`, and `extra_two` (where they are
multiples of the indent column width).
- Plumb indent configuration through to the various gpui and editor
components that are concerned with wrapping.
- Update code action icon placement to accommodate `none`-level wrap
indentation (preceded by a refactor of the function used to calculate
its display row).
- Fixed an existing bug in `WrapSnapshot::soft_wrap_indent` where
querying a 0-indent wrap returned `None` instead of `Some(0)`

## Testing

- Added tests to `wrap_map.rs` for all indentation levels.
- Updated the random wrap tests to include indent setting combinations. 
- Added tests for code action icon placement. 
- Validated locally by toggling between the various settings and
observing how the wrap behaved.

## 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

Changes are grouped by commit to ease review.

Screenshots below!

<details>
  <summary>Click to view showcase</summary>

**`same` indent** (current Zed behavior)
<img width="764" height="844" alt="Screenshot from 2026-08-02 22-45-54"
src="https://github.com/user-attachments/assets/83e1465c-0e8e-445d-a172-9e1b446406b7"
/>

**`none` indent**
<img width="764" height="844" alt="Screenshot from 2026-08-02 22-45-39"
src="https://github.com/user-attachments/assets/99b282b6-d308-453d-b08b-e10af824f307"
/>

**`extra_one` indent**
<img width="764" height="844" alt="Screenshot from 2026-08-02 22-46-06"
src="https://github.com/user-attachments/assets/c7480c84-f1a2-485d-b831-b97fe55c0b03"
/>

**`extra_two` indent**
<img width="764" height="844" alt="Screenshot from 2026-08-02 22-46-19"
src="https://github.com/user-attachments/assets/badc4996-e1bf-4237-9add-babf08f13897"
/>

**the setting**
<img width="826" height="336" alt="Screenshot from 2026-08-02 22-42-19"
src="https://github.com/user-attachments/assets/906b4e8e-1366-4a4e-a2cf-4f8bd67fd604"
/>


</details>

---

Release Notes:

- Added a `soft_wrap_indent` setting (`"none"`, `"same"`, `"extra_one"`,
`"extra_two"`) to configure indentation for soft-wrapped continuation
lines.
- Fixed soft-wrap continuation line indentation calculation for
unindented lines starting at column 0.
- [GPUI] Added `IndentAdjustment` enum to `LineWrapper` to control
indentation of soft-wrapped continuation lines.

---------

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2026-09-28 07:16:22 +00:00
Ansh Dawda d528c665e1 Add JSONL and NDJSON support to tabular preview (#64471)
## Objective

Extend the existing tabular preview to support `.jsonl` and `.ndjson`
files, making it easier to compare fields across records.

Discussed in https://github.com/zed-industries/zed/discussions/62917.

## Solution

Parse each nonblank line as a JSON object and reuse the existing table
preview. Top-level keys become columns in first-seen order, with new
keys from later records appended to the right.

- Preserve JSON values, including large numbers, without numeric
conversion.
- Display nested objects and arrays as compact JSON.
- Keep missing fields, `null`, `"null"`, and empty strings distinct.
- Show invalid-record errors with source line numbers and recover after
edits.
- Preserve sorting and filters unless column names or order change.
- Add JSONL/NDJSON to the existing preview shortcuts and document the
behavior.

Also fix a crash found during CSV regression testing: deleting rows
could leave the renderer using an old row mapping against shorter data.
Clear the mapping and virtual list together before recomputing them.

The preview remains read-only, accepts object records only, and uses the
existing text-based sorting and full-file parsing behavior.

## Testing

- All 20 tests in `tabular_data_preview` passed.
- The multiline CSV deletion regression passed across 20 scheduler
seeds.
- `cargo fmt -p tabular_data_preview -- --check` passed.
- `./script/clippy -p tabular_data_preview` passed.
- `cargo build -p zed --bin zed` passed.
- `git diff --check` passed.
- Manual QA on macOS, including retesting the reported CSV crash.

Windows and Linux were not tested locally. Large-file performance has
not been benchmarked.

To try it, open a `.jsonl` or `.ndjson` file and run `tabular data: open
preview` or `tabular data: open preview to the side`.

## 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
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

## Showcase

<img width="2358" height="1576" alt="image"
src="https://github.com/user-attachments/assets/8f7e7725-5a5c-465d-aa0a-d61cbb22d04f"
/>

The example shows source-order columns, fields introduced by later
records, nested values, and the distinction between missing values,
nulls, and strings.

Release Notes:

- Added JSONL and NDJSON support to the tabular data preview.

---------

Co-authored-by: Anthony Eid <anthony@zed.dev>
2026-09-24 15:04:16 +00:00
Gautam Manchandani 573b5d66bb Fix Helix buffer picker opening in wrong pane (#64494)
# Objective
Fixes #63845.

## Solution
Open Helix’s `Space b` buffer picker in the active pane.

## Showcase


https://github.com/user-attachments/assets/10c87b04-ce8e-412b-8e81-ffd09a7e68be


Release Notes:

- Fixed Helix buffer picker opening in the wrong pane on `space b`.

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2026-09-23 15:13:09 +00:00
Dom Porada 63b29c2edd Add support for the "..." entry in terminal.path_hyperlink_regexes (#64552)
## Objective

Allow custom terminal path regexes to extend inherited entries without
copying them. This PR also corrects the existing mismatch between the
documented and shipped default regexes.

This is the last submission in the #64399 series, following #62769,
#64222, #64440, #64484, and #64540.

## Solution

The `"..."` entry is intentionally supported at the top level only. A
`"..."` line inside a multiline entry remains regex text. Existing
configurations that use bare `...` as a three-character regex can
preserve that behavior by writing `["..."]` as an entry instead.

The shipped regexes and hyperlink matching behavior are unchanged.

## Testing

All focused tests and all hyperlink tests pass on macOS. The documented
default expressions were checked against the shipped values.

## Self-Review Checklist:

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

---

Release Notes:

- Added support for `"..."` in `terminal.path_hyperlink_regexes` to
extend inherited regexes without repeating them.
2026-09-21 16:10:07 +00:00
Josh Kent 36726df0c3 sidebar: Group threads sidebar settings (#64395)
## Objective

Group the threads sidebar settings together in JSON and the Settings
Editor, using consistent “Threads Sidebar” terminology.

This follows up on #63452 now that #62883 has added configurable default
width, and includes the auto-open setting added since then.

## Solution

- Group `position`, `default_width`, and `auto_open` under
`agent.threads_sidebar`, and display their controls together in
Settings.
- Automatically migrate `agent.sidebar_side`,
`agent.threads_sidebar_default_width`, and
`agent.threads_sidebar_auto_open` across supported settings scopes,
preserving existing nested values.
- Apply changes to the default width immediately, including when the
sidebar was manually resized, and clear the saved width override.
Unrelated settings changes preserve manual sizing.
- Document all three settings, including the previously missing position
entry.

## Testing

The following targeted checks passed on the local changes:

- `cargo test -p migrator nest_agent_threads_sidebar_settings` — 7 tests
passed.
- `cargo test -p sidebar -p workspace -p agent_settings -p gpui_platform
--features gpui_platform/runtime_shaders --lib -- width
threads_sidebar_settings test_open_directory_in_existing_window` — 9
tests passed.
- `cargo fmt --all` completed successfully.
- `git diff --check` passed.
- From `docs`: `npx prettier --check src/reference/all-settings.md
src/ai/parallel-agents.md` passed.

Coverage includes migration precedence and supported scopes, settings
defaults and width limits, manual sizing and resets, persisted widths,
and auto-open behavior.

Full application tests and manual UI testing were not run. Clippy was
not rerun after the final terminology changes.

## Self-Review Checklist:

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

Release Notes:

- Improved threads sidebar settings by grouping position, default width,
and auto-open together, and applying default-width changes even after
manual resizing.
2026-09-21 15:15:54 +00:00
Dom Porada 4c7f3574f2 Add support for "..." in edit_predictions_disabled_in (#64546)
## Objective

Let projects and language-specific settings add scopes where edit
predictions are disabled without repeating inherited scopes.

Part of #64399.

## Solution

Extend the `"..."` convention from #62769, #64222, #64440, #64484, and
#64540 to `edit_predictions_disabled_in`. For example, a global
`["comment"]` and a language override of `["string", "..."]` disable
predictions in both scopes.

Inherited scopes are inserted at `"..."`, and duplicates keep their
first occurrence. Omitting the marker replaces the list, `[]` clears it,
and omitting the setting preserves inheritance. The default remains
`[]`.

## Testing

Tested on macOS through settings loading, covering project and
language-specific overrides, inheritance, replacement, and clearing. The
language settings tests passed. Live editor behavior has not been
checked manually.

To check manually, configure global `["comment"]` and a language
override of `["string", "..."]`. Confirm predictions are disabled in
both scopes, then remove `"..."` and repeat with `[]` to check
replacement and clearing.

## Self-Review Checklist:

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

---

Release Notes:

- Added support for `"..."` in `edit_predictions_disabled_in` so project
and language-specific settings can extend inherited scopes.

---------

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2026-09-21 14:24:18 +00:00
Kirill Bulatov 51c0320392 Fix ctrl/cmd-w closing the project panel instead of the active pane (#64515)
Closes https://github.com/zed-industries/zed/issues/34865
Closes https://github.com/zed-industries/zed/discussions/41122

Follows an Intellij Idea approach, where these bindings are separate.

Release Notes:

- Fixed `ctrl/cmd-w` closing the project panel instead of the active
pane. BREAKING: closing the active dock moved from `cmd/ctrl-w` to
`ctrl-alt-w`
2026-09-21 13:53:43 +00:00
Dom Porada 5a137cbc9b Add support for "..." in edit_predictions.disabled_globs (#64540)
## Objective

Let users and projects add edit prediction exclusion patterns without
repeating defaults or inherited patterns.

Part of #64399.

## Solution

Extend the `"..."` convention from #62769, #64222, #64440, and #64484 to
`edit_predictions.disabled_globs` using `SplicingVec`. Inherited
patterns are inserted at `"..."`, and duplicates retain their first
occurrence. Omitting the marker replaces the list, `[]` clears it, and
omitting the setting preserves inheritance.

Opening an absent setting now initializes it with `["..."]` instead of
clearing inherited patterns, and the selection is located by parsing the
JSON instead of a regex, so a commented-out or nested `"disabled_globs"`
can no longer capture it. Cursor imports append `"..."` like the
`files.exclude` import does, so Zed's sensitive-file defaults survive an
import; empty lists and empty or literal `"..."` entries are dropped,
matching `enabled_patterns`.

## Testing

Tested on macOS with settings merge and loading tests, Cursor import
tests, the UI settings update and selection path (including
commented-out and nested decoy keys), the new `settings_json` key-path
lookup, and Copilot integration coverage.

To check manually, configure custom disabled patterns alongside `"..."`
and confirm that both custom patterns and inherited sensitive-file
patterns remain disabled. Repeat without `"..."` and with `[]` to verify
replacement and clearing. Opening the setting when it is absent should
preserve inherited patterns.

## Self-Review Checklist:

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

---

Release Notes:

- Added support for `"..."` in `edit_predictions.disabled_globs` so
custom patterns can extend inherited exclusions, and fixed "Configure
Excluded Files" selecting the wrong list when a commented-out
`disabled_globs` precedes it.

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2026-09-21 13:08:53 +00:00
Ben Brandt 68ec865bfd agent_ui: Fix keyboard navigation in ACP elicitation forms (#64193)
Closes #61358

Address the keyboard-navigation portions. Image answers are
intentionally not included. ACP form responses support primitive values
rather than image attachments, and Claude Code's adapter treats the
"Other" answer as text. This PR therefore only partially addresses the
issue.

Release Notes:

- acp: Fixed submitting and navigating ACP elicitation forms with the
keyboard.
2026-09-17 14:39:57 +00:00
Smit Barmase 534319bd05 which_key: Improve pending keystrokes indicator to include untimed chords (#64362)
Closes #64338

The pending keystrokes indicator now shows chords without a timeout,
with no countdown circle. For example, pressing `cmd-k` shows that Zed
is waiting for another key.

Few cases which needed special handling for untimed chords case:

- Hovering already pauses a timed chord, and GPUI preserves that pause
when the chord advances. An untimed chord has no paused timeout to carry
forward. We pause its newly created timeout if the pointer is still over
the indicator or popover.
- For timed chords, the timeout already stays paused during the
popover's 300 ms dismissal delay. If an untimed chord gains a timeout
during that delay, it now follows the same rule. The popover still
closes at the original deadline, then the timeout resumes with a full
second remaining.

<img width="308" height="182" alt="CleanShot 2026-09-17 at 11 45 33
AM@2x"
src="https://github.com/user-attachments/assets/9baa5fde-de9b-447d-9b02-b712a3065685"
/>

Release Notes:

- Improved the pending keystrokes indicator to show chords without a
timeout, such as shortcuts starting with `cmd-k`.
2026-09-17 09:17:09 +00:00
Jack Walters 52e0b848da Add a setting for Threads Sidebar auto-open (#64259)
Closes https://github.com/zed-industries/zed/discussions/64266

Opening a folder in an existing window force-opens the Threads Sidebar,
and there is no way to prevent it. `open_paths` called
`MultiWorkspace::open_sidebar` unconditionally on the reused window, so
the sidebar reopened on every such open regardless of whether the user
had closed it.

This adds `agent.threads_sidebar_auto_open`, defaulting to `true` so
current behavior is unchanged. With `false`, the folder still opens in
the existing window, but the sidebar stays closed.

This path is reached when `default_open_behavior` or
`cli_default_open_behavior` is set to `existing_window`.

`open_sidebar` was doing double duty: besides showing the sidebar, it
pinned the workspace being navigated away from so it survives the
switch. When the setting is disabled, `retain_active_workspace` is
called instead, so only sidebar visibility changes.


https://github.com/user-attachments/assets/fc299df0-27e2-4ac6-98cb-d817d5f71d0e

## Tests

Two tests in `multi_workspace_tests.rs` cover both branches: the sidebar
opens by default, and stays closed when the setting is disabled while
the folder still opens in the same window.

Release Notes:

- Added `agent.threads_sidebar_auto_open` to control whether opening a
folder in an existing window also opens the Threads Sidebar
2026-09-16 16:03:50 +00:00
Ashraf Hossain 95c0d74be9 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>
2026-09-16 08:53:40 +00:00