As discussed with @benbrandt and @mikayla-maki:
* We now tell ACP clients we support the nonstandard `terminal-auth`
`_meta` field for terminal-based authentication
* In the future, we anticipate ACP itself supporting *some* form of
terminal-based authentication, but that hasn't been designed yet or gone
through the RFD process
* For now, this unblocks terminal-based auth
Release Notes:
- Added experimental terminal-based authentication to ACP support
This has been possible in the inline assistant for ages now and maybe
you didn't know because we didn't say anything about it! This PR fixes
that by including that you can @-mention context on it the same you can
in the agent panel.
Release Notes:
- N/A
Closes #ISSUE
More accurately map localhost to `127.0.0.1`. Previously we would
lowercase and simply replace all instances of localhost inside of the
URL string, meaning query parameters, username, password etc. could not
contain the string `localhost` or contain uppercase letters without
getting modified. Added a test ensuring the mapping logic works. The
previous implementation would fail this new test.
Release Notes:
- Improved the behavior of mapping `localhost` to `127.0.0.1` when
passing configured proxy urls to `node`
### Summary
This PR changes `gpui/build.rs` to look up the Windows SDK directory in
the registry instead of falling back to a hard-coded path.
---
### Problem
Currently, building `gpui` on Windows requires `fxc.exe` to be in `PATH`
or at a predefined location (unless `GPUI_FXC_PATH` is set). This
requires to maintain a certain build environment with proper paths/vars
or to install the specific SDK version.
It is possible to find the SDK automatically using the registry keys it
creates upon installation. Specifically in
`SOFTWARE\\WOW6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v10.0`
branch there are:
* `InstallationFolder` telling the SDK installation location;
* `ProductVersion` telling the SDK version in use.
These keys provide enough information to locate the SDK binaries, with
added robustness:
* handles non-standard SDK installation path;
* deterministically selects the latest SDK when multiple versions are
present.
---
### Changes Made
* **Updated `crates/gpui/build.rs`**:
* added dependency on `winreg`
* introduced `find_latest_windows_sdk_binary()` helper
* updated fallback logic to use registry lookup
This PR only changes the fallback location, and does not touch the
established environment-based workflow.
Release Notes:
- N/A
---
### Impact
Reduces manual configuration needed to build GPUI on Windows.
---------
Co-authored-by: John Tur <john-tur@outlook.com>
Closes#41457#41806#41801
Copilot started using `node:sqlite` module which is an experimental
feature between node v22-v23 (stable in v24). The fix was passing in the
experimental flag when Zed starts the copilot LSP.
I tested this with v20.19.5 and v24.11.0. The fix got v20.19 working and
didn't affect v24.11 which was already working.
Release Notes:
- AI: Fix Github Copilot edit predictions failing to start
Closes#41774
Release Notes:
- settings_ui: Fixed an integer underflow panic when attempting to hit
the `-` sign on settings item that take delays in milliseconds
`ICustomDestinationList::AppendCategory` rejects an empty `IObjectArray`
and returns an `E_INVALIDARG` error. Error propagated and caused an
early-return from `update_jump_list()`.
<img width="1628" height="540" alt="image"
src="https://github.com/user-attachments/assets/f8143297-c71e-42a1-a505-66cd77dfa599"
/>
Release Notes:
- N/A
- lsp: Fix dynamic registration of diagnostic capabilities not taking
effect when an initial capability is not specified
Gist of the issue lies within use of .get_mut instead of .entry. If we
had not created any dynamic capability beforehand, we'd miss a
registration, essentially
- **Determine whether to update remote caps in a smarter manner**
Release Notes:
- Fixed document diagnostics with Ty language server.
Closes#41533
Both of the issues in the release notes that are fixed in this PR, were
caused by incorrect usage of the `window.use_state` API.
The first issue was caused by calling `window.use_state` in a render
helper, resulting in the element ID used to share state being the same
across different pages, resulting in the state being re-used when it
should have been re-created. The fix for this was to move the
`window.state` (and rendering logic) into a `impl RenderOnce` component,
so that the IDs are resolved during the render, avoiding the state
conflicts.
The second issue is caused by using a `move` closure in the
`window.use_state` call, resulting in stale closure values when the
window state is re-used.
Release Notes:
- settings_ui: Fixed an issue where some dropdown menus would show
options from a different dropdown when clicked
- settings_ui: Fixed an issue where attempting to change a setting in a
dropdown back to it's original value after changing it would do nothing
This PR implements the `zeta-cli eval` command. It will:
- Run the edit prediction model if there are no cached results
- Compute precision/recall/F1 for context retrieval at the line level:
every retrieved line of context is counted as a true positive (correct
retrieval), false positive (retrieved something that was not expected),
or false negative (didn't retrieve an expected line)
- Compute similar metrics for edit predictions
- Pretty-print results, highlighting the difference between actual and
expected when printing to tty
Other changes:
- `zeta-cli predict` accepts a `--format` argument with options `md`,
`json`, `diff`
- Code restructure
Release Notes:
- N/A
---------
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Agus Zubiaga <agus@zed.dev>
- Adds a new action `git::PullRebase` which adds `--rebase` in the final
command invoked by existing Git-Pull implementation.
- Includes the new action in "Fetch/Push" button in the Git Panel
(screenshot below)
- Adds key-binding for `git::PullRebase` in all three platforms,
following the existing key-binding patterns (`ctrl-g shift-down`)
- Update git docs to include the new action.
Sidenote: This is my first ever OSS contribution
Screenshot:
<img width="234" height="215" alt="image"
src="https://github.com/user-attachments/assets/713d068f-5ea5-444f-8d66-444ca65affc8"
/>
---
Release Notes:
- Git: Added `git: pull rebase` for running `git pull --rebase`.
If I understand this correctly: The `active_repo_id` uses
`get_or_insert_with`, which makes it dependent on the `RepositoryAdded`
event sequence. To ensure correct initialization of the `active_repo_id`
on the remote side, the first local `RepositoryAdded` event must
synchronously send an `UpdateRepository` to `updates_tx`.
Closes#30694
Release Notes:
- Fixed incorrect default repository selection when using remote
Update the `editor::Editor.handle_modifiers_changed` method to ensure
that the `editor::Editor.update_edit_prediction_preview` method is
called even if edit prediction preview is disabled, if there's an active
edit prediction preview.
Without this change it was possible for users to get into a state where
holding the modifiers to show the prediction were part of the modifiers
used to disable edit prediction. When that keybinding was used, edit
prediction would be disabled, but the edit prediction preview would
remain as active, so the context menu for the editor would never be
shown again, as the editor would assume it was still showing the edit
prediction preview.
Closes#40056
Release Notes:
- Fixed a bug that could cause the completions menu to stop being show
when edit predictions were disabled
---------
Co-authored-by: dino <dinojoaocosta@gmail.com>
## Add relative line numbers on wrapped lines, take 2
This is a rework of https://github.com/zed-industries/zed/pull/39268
that excludes
e7096d27a6.
This commit introduced some line number rendering issues as described in
https://github.com/zed-industries/zed/issues/41422.
While @ConradIrwin suggested we try to pass in the buffer rows from the
calling method instead of the snapshot, that
appears to have had unintended consequences and I don't think the two
calculations were intended to do the same thing. Hence, this PR has
removed those changes.
This PR also includes the migration fix originally done by @MrSubidubi
in https://github.com/zed-industries/zed/pull/41351.
## Original PR description and release notes.
**Problem:** Current relative line numbering creates a mismatch with
vim-style navigation when soft wrap is enabled. Users must mentally
calculate whether target lines are wrapped segments or logical lines,
making `<n>j/k` navigation unreliable and cognitively demanding.
**How things work today:**
- Real line navigation (`j/k` moves by logical lines): Requires
determining if visible lines are wrapped segments before jumping. Can't
jump to wrapped lines directly.
- Display line navigation (`j/k` moves by display rows): Line numbers
don't correspond to actual row distances for multi-line jumps.
**Proposed solution:** Count and number each display line (including
wrapped segments) for relative numbering. This creates direct
visual-to-navigational correspondence, where the relative number shown
always matches the `<n>j/k` distance needed.
**Benefits:**
- Eliminates mental overhead of distinguishing wrapped vs. logical lines
- Makes relative line numbers consistently actionable regardless of wrap
state
- Preserves intuitive "what you see is what you navigate" principle
- Maintains vim workflow efficiency in narrow window scenarios
Also explained and discussed in
https://github.com/zed-industries/zed/discussions/25733.
Release Notes:
- Added support for counting wrapped lines as relative lines and for
displaying line numbers for wrapped segments. Changes
`relative_line_numbers` from a boolean to an enum: `enabled`,
`disabled`, or `wrapped`.
This PR adds the ability to configure which files are considered
"hidden" in the project panel and toggle their visibility with a
keyboard shortcut. Previously, the editor hardcoded dotfiles as hidden -
now users can customize the pattern and quickly show/hide them.
### Release Notes
- Added `project_panel::ToggleHideHidden` action with keyboard shortcuts
to toggle visibility of hidden files
- Added configurable `hidden_files` setting to customize which files are
marked as hidden (defaults to `**/.*` for dotfiles)
### Motivation
This change allows users to:
1. Quickly toggle hidden file visibility with a keyboard shortcut
2. Customize which files are considered "hidden" beyond just dotfiles
3. Better organize their project panel by hiding build artifacts, logs,
or other generated files
### Usage
**Toggle hidden files:**
- **macOS:** `cmd-alt-.`
- **Linux:** `ctrl-alt-.`
- **Windows:** `ctrl-alt-.`
**Customize patterns in settings:**
```json
{
"hidden_files": ["**/.*", "**/*.tmp", "**/build/**"]
}
```
### Changes
**Core Implementation:**
- Added `hidden_files` setting (defaults to `**/.*` to match current
dotfile behavior)
- Replaced hardcoded `name.starts_with('.')` logic with configurable
pattern matching using `PathMatcher`
- Hidden status propagates through directory hierarchies (if a directory
is hidden, all children inherit that status)
**User-Facing:**
- Added `ToggleHideHidden` action in the project panel
- Added keyboard shortcuts for all platforms
- Added settings UI entry for configuring `hidden_files` patterns
**Testing:**
- Added comprehensive test coverage validating default behavior, custom
patterns, propagation, and settings changes
### Implementation Notes
- Uses `PathMatcher` for efficient glob matching
- Settings changes automatically trigger worktree re-indexing
- No breaking changes - defaults maintain current behavior (hiding
dotfiles)
---
**Disclaimer:** This was implemented with a fair amount of copy/paste
(particularly the gitignore handling), trial and error, and a healthy
dose of Claude.
### Screenshots
**Project Panel with hidden files visible:**
<img width="1368" height="935" alt="Screenshot 2025-10-30 at 3 15 53 AM"
src="https://github.com/user-attachments/assets/1cbe90ce-504c-4f9b-bca8-bef02ab961be"
/>
**Project Panel with hidden files hidden:**
<img width="1363" height="917" alt="Screenshot 2025-10-30 at 3 16 07 AM"
src="https://github.com/user-attachments/assets/9297f43e-98c7-4b19-be8f-3934589d6451"
/>
**Toggle action in command palette:**
<img width="565" height="161" alt="Screenshot 2025-10-30 at 3 17 26 AM"
src="https://github.com/user-attachments/assets/4dc9e7b6-9c29-4972-b886-88d8018905da"
/>
Release Notes:
- Added the ability to configure glob patterns for files treated as
hidden in the project panel using the `hidden_files` setting.
- Added an action `project panel: toggle hidden files` to quickly show
or hide hidden files in the project panel.
---------
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Closes#39037
Previously, the code split the `**/.env` glob in `file_scan_inclusions`
into two sources for the `PathMatcher`: `["**", "**/.env"]`. This
approach works for directories, but including `**` will match all
directories and their files. To address this, I now select the
appropriate `PathMatcher` using only `**/.env` when specifically
targeting a file to determine whether to include it in the file finder.
Release Notes:
- Fixed: respect `.gitignore` and `file_scan_inclusions` settings with
`**` in glob for file finder
---------
Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
Co-authored-by: Julia Ryan <juliaryan3.14@gmail.com>
- Update `vim::object::find_mini_delimiters` in order to filter out the
ranges before calling `vim::object::cover_or_next`, ensuring that the
provided ranges are converted from multibuffer space into buffer
space.
- Remove the `range_filter` from `vim::object::cover_or_next` was the
`find_mini_delimiters` function is the only caller and no longer uses
it
Closes#41346
Release Notes:
- Fixed a crash that could occur when using `vim::MiniQuotes` and
`vim::MiniBrackets` in a multibuffer
Prior to this change we would always resolve envs when spawning a new
terminal window based on the inherited CLI environment. This works fine
as long as we open a new Zed instance in the terminal when using it
locally only. When using Zed connected to a remote server, it would not
be meaningful however. WIth this change, we correctly ping the remote
for the project-local envs and use that instead. This change should also
fix a pesky issue when updating Zed - after Zed restarts, opening a new
terminal window will not run `direnv` for example.
Release Notes:
- N/A
Related discussions #26084
Worktree creations are implemented similar to how branch creations are
handled on the branch picker (the user types a new name that's not on
the list and a new entry option appears to create a new branch with that
name).
https://github.com/user-attachments/assets/39e58983-740c-4a91-be88-57ef95aed85b
With this picker you have a few workflows:
- Open the picker and type the name of a branch that's checked out on an
existing worktree:
- Press enter to open the worktree on a new window
- Press ctrl-enter to open the worktree and replace the current window
- Open the picker and type the name of a new branch or an existing one
that's not checked out in another worktree:
- Press enter to create the worktree and open in a new window. If the
branch doesn't exists, we will create a new one based on the branch you
have currently checked out. If the branch does exists then we create a
worktree with that branch checked out.
- Press ctrl-enter to do everything on the previous point but instead,
replace the current window with the new worktre.
- Open the picker and type the name of a new branch or an existing one
that's not checked out in another worktree:
- If a default branch is detected on the repo, you can create a new
worktree based on that branch by pressing ctrl-enter or
ctrl-shift-enter. The first one will open a new window and the last one
will replace the current one.
Note: If you preffer to not use the system prompt for choosing a
directory, you can set `"use_system_path_prompts": false` in zed
settings.
Release Notes:
- Added git worktree picker to open a git worktree on a new window or
replace the current one
- Added git worktree creation action
---------
Co-authored-by: Cole Miller <cole@zed.dev>
Making the profile management modal accessible through the agent panel
additional options menu as well. And in the process, adjusting the menu
keybinding that was getting conflicted with something else.
Release Notes:
- N/A
This PR makes the agent panel's configuration view use the icon from an
external agent that comes directly from the extension, as well as some
other clean ups.
Release Notes:
- N/A
We see `test_extension_store_with_test_extension` hang in untarring the
WASI SDK some times.
In lieu of trying to debug the problem, let's try shelling out for now
in the hope that the test becomes more reliable.
There's a bit of risk here because we're using async-tar for other
things (but probably not 300Mb tar files...)
Assisted-By: Zed AI
Closes #ISSUE
Release Notes:
- N/A
This PR adds a `zeta zeta2 predict` subcommand that takes an edit
prediction example markdown file as an argument, and performs zeta2's
prediction, showing the retrieved context and the predicted edit.
* [x] Apply uncommitted diff to get repo into the right state.
* [x] Apply edits in edit history
* [x] Display predicted edits as unified diff, regardless of model
output format
Release Notes:
- N/A
---------
Co-authored-by: Agus Zubiaga <agus@zed.dev>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Ben Kunkle <ben.kunkle@gmail.com>
A user on Discord requested this feature:
https://discord.com/channels/869392257814519848/1434188637389717556/1434188637389717556
I added a scrollbar setting called `completion_menu_scrollbar` to the
completion menu and defaulted it to "Never" to match past behavior.
Release Notes:
- editor: Add `editor.completion_menu_scrollbar` setting to show a
scrollbar in the completion menu
Closes #ISSUE: reported on X by user.
Release Notes:
- Made it so that the default value for the "remove trailing whitespace
on save" setting in Markdown is false, to fix cases where the removed
trailing whitespace had syntactic meaning
Noticed this whilst testing the Docker debugger. I randomly scrolled the
console off screen and was confused briefly as to why this was the case.
Release Notes:
- The debugger query console will no longer needlessly overscroll.
One of the reasons we didn't spot that we were missing the telemetry env
vars for the production builds was that nightly (which was working) had
its own set of build steps. This re-uses those and pushes the env vars
down from the workflow to the job.
It also fixes nightly releases to upload all-in-one go so that all
platforms update in sync.
Closes#41655
Release Notes:
- N/A
The button could not be clicked whenever the editor was currently not
focused. This PR fixes this and also registers the action on a more
global level, similar to how this is done for all the other agent
actions.
Release Notes:
- Fixed an issue where the `Expand message editor` button would not work
in agent threads if the message editor was not focused.
The Ruby extension uses the `solargraph`
language server by default for Ruby files.
However, when a user opens any ERB file,
the extension automatically starts the Ruby LSP.
This affects developers because
they do not expect the Ruby LSP to be running.
Closes https://github.com/zed-extensions/ruby/issues/172
Release Notes:
- N/A
Escape special characters (&, <, >, ", ') in the title attribute of
TextThreadContext's XML output to prevent malformed XML when titles
contain these characters.
Resolves TODO at context.rs:629
Release Notes:
- N/A
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Closes https://github.com/zed-extensions/java/issues/108
Previously, when language servers dynamically register completion
capabilities with trigger characters for completions (hello JDTLS), this
would not get updated in buffers for that language server that were
already open. This change is to find open buffers for the language
server and update the trigger characters in each of them when the new
capability is being registered.
Release Notes:
- N/A
Prior we were only updating the diagnostics pane when it is either
unfocued, saved or when a disk based diagnostic run finishes (aka cargo
check). The reason for this is simple, we do not want to take away the
excerpt under the users cursor while they are typing if they manage to
fix the diagnostic. Additionally we need to prevent dropping the changed
buffer before it is saved.
Delaying updates was a simple way to work around these kind of issues,
but comes at a huge annoyance that the diagnostics pane is not actually
reflecting the current state of the world but some snapshot of it
instead making it less than ideal to work within it for languages that
do not leverage disk based diagnostics (that is not rust-analyzer, and
even for rust-analyzer its annoying).
This PR changes this. We now always live update the view but take care
to retain unsaved buffers as well as buffers that contain a cursor in
them (as well as some other "checkpoint" properties).
Release Notes:
- Improved diagnostics pane to live update when editing within its
editor
Closes#41593
From what I understand the order of captures inside tree-sitter query
files matters, and the last capture will win. `?` and `:` are captured
by both `@operator` and `@punctuation.delimiter`.So in order for the
ternary operator to win it should live after `@punctuation.delimiter`.
Before:
<img width="298" height="32" alt="Screenshot 2025-10-31 at 17 41 21"
src="https://github.com/user-attachments/assets/af376e52-88be-4f62-9e2b-a106731f8145"
/>
After:
<img width="303" height="39" alt="Screenshot 2025-10-31 at 17 41 33"
src="https://github.com/user-attachments/assets/9a754ae9-0521-4c70-9adb-90a562404ce8"
/>
Release Notes:
- Fixed an issue where the ternary operator symbols in TypeScript would
not be highlighted as operators.
Sometimes, inside the edit agent, Sonnet thinks that it's doing a tool
call and closes its response with `</parameter></invoke>` instead of
properly closing </new_text>.
A better but more labor-intensive way of fixing this would be switching
to streaming tool calls for LLMs that support it.
Closes#39921
Release Notes:
- Fixed Sonnet's regression with inserting `</parameter></invoke>`
sometimes
This PR makes it clearer that you can click on the file path to open the
corresponding file in the agent panel's "edit bar", which is the element
that shows up in the panel as soon as agent-made edits happen.
Release Notes:
- agent panel: Improved the "go to file" affordance in the edit bar.
When we introduced the ACP-based agent panel, the condition that the
"review" | "reject" | "keep" buttons observed to be displayed got
mismatched between the panel and the pane (when in the single file
review scenario). In the panel, the buttons appear as soon as there are
changed buffers, whereas in the pane, they appear when response
generation is done.
I believe that making them appear at the same time, observing the same
condition, is the desired behavior. Thus, I think the panel behavior is
more correct, because there are loads of times where agent response
generation isn't technically done (e.g., when there's a command waiting
for permission to be run) but the _file edit_ has already been performed
and is in a good state to be already accepted or rejected.
So, this is what this PR is doing; effectively removing the "generating"
state from the agent diff, and switching to `EditorState::Reviewing`
when there are changed buffers.
Release Notes:
- Improved agent edit single file reviews by making the "reject" and
"accept" buttons appear at the same time.
Some housekeeping updates:
- Update hardcoded actions/keybindings so they're pulled from the repo
- Mention settings window when useful
- Add more info about agent panel's font size
- Break sentences in individual lines
Release Notes:
- N/A
These have been migrated to the README.md
[here](https://github.com/zed-industries/release_notes). These don't
need to be public. Putting them in the same repo where we draft
(`release_notes`) means less jumping around and allows us to include
additional information we might not want to make public.
Release Notes:
- N/A
Fixes the Debugpy toolchain detection bug in #40324
When detecting what toolchain (venv) to use in the Debugpy configuration
stage, we used to only base it off of the current working directory
argument passed to the config. This is wrong behavior for cases like
mono repos, where the correct virtual environment to use is nested in
another folder.
This PR fixes this issue by adding the program and module fields as
fallbacks to check for virtual environments. We also added support for
program/module relative paths as well when cwd is not None.
Release Notes:
- debugger: Improve mono repo virtual environment detection with Debugpy
---------
Co-authored-by: Remco Smits <djsmits12@gmail.com>
Adds a `convert-example` subcommand to the zeta cli that converts eval
examples from/to `json`, `toml`, and `md` formats.
Release Notes:
- N/A
---------
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Release Notes:
- N/A
---
Previously, agent markdown rendering used hardcoded font sizes
(TextSize::Default and TextSize::Small) which ignored the
agent_ui_font_size and agent_buffer_font_size settings. This updates the
markdown style to respect these settings.
This pull request adds support for customizing the font size of code
blocks in agent responses, making it possible to set a distinct font
size for code within the agent panel. The changes ensure that if the new
setting is not specified, the font size will fall back to the agent UI
font size, maintaining consistent appearance.
(I am a frontend developer without any Rust knowledge so this is
co-authored with Claude Code)
**Theme settings extension:**
* Added a new `agent_buffer_code_font_size` setting to
`ThemeSettingsContent`, `ThemeSettings`, and the default settings JSON,
allowing users to specify the font size for code blocks in agent
responses.
[[1]](diffhunk://#diff-a3bba02a485aba48e8e9a9d85485332378aa4fe29a0c50d11ae801ecfa0a56a4R69-R72)
[[2]](diffhunk://#diff-aed3a9217587d27844c57ac8aff4a749f1fb1fc5d54926ef5065bf85f8fd633aR118-R119)
[[3]](diffhunk://#diff-42e01d7aacb60673842554e30970b4ddbbaee7a2ec2c6f2be1c0b08b0dd89631R82-R83)
* Updated the VSCode import logic to recognize and import the new
`agent_buffer_code_font_size` setting.
**Font size application in agent UI:**
* Modified the agent UI rendering logic in `thread_view.rs` to use the
new `agent_buffer_code_font_size` for code blocks, and to fall back to
the agent UI font size if unset.
[[1]](diffhunk://#diff-f73942e8d4f8c4d4d173d57d7c58bb653c4bb6ae7079533ee501750cdca27d98L5584-R5584)
[[2]](diffhunk://#diff-f73942e8d4f8c4d4d173d57d7c58bb653c4bb6ae7079533ee501750cdca27d98L5596-R5598)
* Implemented a helper method in `ThemeSettings` to retrieve the code
block font size, with fallback logic to ensure a value is always used.
* Updated the settings application logic to propagate the new code block
font size setting throughout the theme system.
### Example Screenshots


---------
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Currently Zed only displays agent notifications (e.g. when the agent
completes a task) if the user has switched apps and Zed is not in the
foreground. This adds PR supports the scenario where the agent finishes
a long-running task and the user is busy coding within Zed on something
else.
Releases Note:
- If agent notifications are turned on, they will now also be displayed
when the agent panel is hidden, in complement to them showing when the
Zed window is in the background.
---------
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Closes#41458
Dynamically position mode selector tooltip to prevent clipping.
Position tooltip on the right when panel is docked left, otherwise on
the left. This ensures the tooltip remains visible regardless of panel
position.
**Note:** The tooltip currently vertically aligns with the bottom of the
menu rather than individual items. Would be great if it can be aligned
with the option it explains. But this doesn't seem trivial to me to
implement and not sure if it's important enough atm?
Before:
<img width="431" height="248" alt="Screenshot 2025-10-30 at 22 21 09"
src="https://github.com/user-attachments/assets/073f5440-b1bf-420b-b12f-558928b627f1"
/>
After:
<img width="632" height="158" alt="Screenshot 2025-10-30 at 17 26 52"
src="https://github.com/user-attachments/assets/e999e390-bf23-435e-9df0-3126dbc14ecb"
/>
<img width="685" height="175" alt="Screenshot 2025-10-30 at 17 27 15"
src="https://github.com/user-attachments/assets/84efca94-7920-474b-bcf8-062c7b59a812"
/>
Release Notes:
- Improved the agent panel's mode selector by preventing it to go
off-screen in case the panel is docked to the left.
Currently, if a commit operation takes some time, there's no visual
feedback in the UI that anything's happening.
This PR changes the colour of the text on the button to the
`Color::Disabled` colour when a commit operation is pending.
Release Notes:
- Improved UI feedback when a commit is in progress
---------
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Closes#38345, #34882, #33280
Debugpy has four distinct configuration scenarios, which are:
1. launch
2. attach with process id
3. attach with listen
4. attach with connect
Spawning Debugpy directly works with the first three scenarios but not
with "attach with connect". Which requires host/port arguments being
passed in both with an attach request and when starting up Debugpy. This
PR passes in the right arguments when spawning Debugpy in an attach with
connect scenario, thus fixing the bug.
The VsCode extension comment that explains this:
98f5b93ee4/src/extension/debugger/adapter/factory.ts (L43-L51)
Release Notes:
- debugger: Fix Python attach-based sessions not working with `connect`
or `port` arguments
Currently, this only applies to long-running individually selected
unstaged files in the git panel. Next up I would like to make this work
for `Stage All`/`Unstage All` however this will most likely require
pushing `PendingOperation` into `GitStore` (from the `GitPanel`).
Release Notes:
- N/A
We missed making extensions that provide agent servers fill the
`provides` field with `agent-servers`, and thus, filtering for this type
of extension in both the app and site wouldn't return anything.
Release Notes:
- N/A
Just tidying it up by removing the unnecessary eye icon buttons in all
list items and adding that action in the form of a button in the footer,
closer to all other actions. Also reordering the footer buttons so that
the likely most common action is in the far right.
Release Notes:
- N/A
Given agent servers will soon be a thing, I'm adding Claude Code, Gemini
CLI, and Codex CLI as included agents in case anyone comes first to
search them as extensions before looking up on the agent panel.
Release Notes:
- N/A
Closes#17524
This PR adds a button to the bottom right corner of the ollama settings
ui. It resets the available ollama models, also resets the "Connected"
state in the process. This means it can be used to check if the
connection is still valid as well. It's a question whether we should
clear the available models on ALL `fetch_models` calls, since these only
happen during auth anyway.
Ollama is a local model provider which means clicking the refresh button
often only flashes the "not connected" state because the latency of the
request is so low. This accentuates changes in the UI, however I don't
think there's a way around this without adding some rather cumbersome
deferred ui updates.
I've attached the refresh button to the "Connected" `ButtonLike`, since
I don't think automatic UI spacing should separate these elements. I
think this is okay because the "Connected" isn't actually something that
the user can interact with.
Before:
<img width="211" height="245" alt="image"
src="https://github.com/user-attachments/assets/ea90e24a-b603-4ee2-9212-2917e1695774"
/>
After:
<img width="211" height="250" alt="image"
src="https://github.com/user-attachments/assets/be9af950-86a2-4067-87a0-52034a80a823"
/>
Alternative approach: There was also a suggestion to simply add a entry
to the command palette, however none of the other providers have this
ability currently either so I went with this approach. The current
approach also makes it more discoverable to the user.
Release Notes:
- Added a button for refreshing available ollama models
---------
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Closes#41478
Release Notes:
- Fixed#41478
<img width="459" height="916" alt="Screenshot 2025-10-29 at 1 31 26 PM"
src="https://github.com/user-attachments/assets/1d5b9fdf-9800-44e4-bdd5-f0964f93625f"
/>
> caused by using haiku 4.5 from the anthropic provider and then
swapping to sonnet 3.7 through zed, doing this does mess with prompt
caching but a model swap already invalidates that so it shouldn't have
any cost impact on end users
Update the behavior of the `zed_actions::agent::AddSelectionToThread`
action so that, after the selecitons are added to the current thread,
the editor automatically scrolls to the cursor's position, fixing an
issue where the inserted selection's UI component could wrap the cursor
to the next line below, leaving it outside the viewable area.
Closes#39694
Release Notes:
- Improved the `agent: add selection to thread` action so as to
automatically scroll to the cursor's position after selections are
inserted
Update `Vim::activate` to ensure that the `Vim.focused` method is only
called if the associated editor is also focused.
This ensures that the `VimEvent::Focused` event is only emitted when the
editor is actually focused, preventing a bug where, after starting Zed,
Vim's mode indicator would show that the mode was `Insert` even though
it was in `Normal` mode in the main editor.
Closes#41353
Release Notes:
- Fixed vim's mode being shown as `Inserted` right after opening Zed
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
When rerunning a task, our process id fetching seems to sometimes return
the previous terminal's process id when respawning the task, causing us
to kill the new terminal once the previous one drops as we spawn a new
one, then drop the old one. This results in rerun sometimes spawning a
blank task as the terminal immediately exits. The fix here is simple, we
actually want to kill the process running inside the terminal process,
not the terminal process itself when we exit in the terminal.
No relnotes as this was introduced yesterday in
https://github.com/zed-industries/zed/pull/41562
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Closes#41125
Release Notes:
- Fixed `SwitchToHelixNormalMode` to keep selection
- Added default keybinds for `SwitchToHelixNormalMode` when in Helix
mode
- Update `vim::normal::Vim.normal_replace` to work with more than one
character
- Add `vim::replace::Vim.paste_replace` to handle pasting the
clipboard's contents while in replace mode
- Update vim's handling of the `editor::actions::Paste` action so that
the `paste_replace` method is called when vim is in replace mode,
otherwise it'll just call the regular `editor::Editor.paste` method
Closes#41378
Release Notes:
- Improved pasting while in Vim's Replace mode, ensuring that the Zed
replaces the same number of characters as the length of the contents
being pasted
This PR fixes breakpoint icon alignment to also be at the end of a
rendered entry and enables editing breakpoint qualities when there's no
active session.
The alignment issue was caused by some icons being invisible, so the
layout phase always accounted for the space they would take up. Only
laying out the icons when they are visible fixed the issue.
#### Before
<img width="1014" height="316" alt="image"
src="https://github.com/user-attachments/assets/9a9ced06-e219-4d9d-8793-6bdfdaca48e8"
/>
#### After
[
<img width="502" height="167" alt="Screenshot 2025-10-30 at 3 21 17 PM"
src="https://github.com/user-attachments/assets/23744868-e354-461c-a940-9b6812e1bcf4"
/>
](url)
Release Notes:
- Breakpoint list: Allow adding conditions, logs, and hit conditions to
breakpoints when there's no active session
Closes#40360
This PR added heuristics to determine what variable/breakpoint list
entry has the longest width when rendered. I added this in so the
uniform list would correctly determine which item has the longest width
and use that to calculate the scrollbar size.
The heuristic can be off if a non-mono space font is used in the UI; in
most cases, it's more than accurate enough though.
Release Notes:
- debugger: Add horizontal scroll bars to variable list, memory view,
and breakpoint list
---------
Co-authored-by: MrSubidubi <dev@bahn.sh>
When doing a project wide search in zed on windows for `hang`, zed
starts to freeze for a couple seconds ultimately starting to error with
`Not enough quota is available to process this command.` when
dispatching windows messages. The cause for this is that we simply
overload the windows message pump due to the sheer amount of foreground
tasks we spawn when we populate the project search.
This PR is an attempt at reducing this.
Release Notes:
- Reduced hangs and stutters in large project file searches
This ensures the thread summary is treated as a tracked mention with
accessible context.
Changes:
- Fixed `MessageEditor::insert_thread_summary()` to use proper mention
URI format
- Added test coverage to verify the fix
Release Notes:
- Fixed an issue where "New From Summary" was not properly inserting
thread summaries as contextual mentions when creating new threads.
Thread summaries are now inserted as proper mention URIs.
Attempt 2 for https://github.com/zed-industries/zed/pull/40774
We were spawning the process on the foreground thread before which can
block an arbitrary amount of time. Likewise we no longer block
deserialization on the terminal loading.
Release Notes:
- Improved startup time on systems with slow process spawning
capabilities
Adds an action to open the notes for the currently selected channel in
the collab panel, which is mapped to `alt-enter` in all platforms.
Release Notes:
- collab: Add `collab_panel::OpenSelectedChannelNotes` action
(`alt-enter` by default)
Add default keybinding for `pane::SplitRight` in the `Terminal` context
for all platforms.
Closes #ISSUE
Release Notes:
- Added VS Code's terminal split keybindings (`cmd` on MacOS,
`ctrl-shift-5` on Windows and Linux)
---------
Co-authored-by: dino <dinojoaocosta@gmail.com>
I just pulled and ran a local build via `script/bundle-mac -l -i` but
found that the resulting bundle wasn't installed as expected. (me:
"ToggleAllDocks!! Wait! Where is it?!") Looking into, it looks like the
`-l` flag was removed in #41392, leaving the `$local_only` var orphaned,
which then left the `-i/$local_install` flag unreachable. I suspect that
this was unintentional, so this PR re-adds the `-l/$local_only` flag to
`script/bundle-mac`.
I ran the build again and confirmed that local install seemed to work as
expected. (ie "ToggleAllDocks!! 🎉")
While here, I also removed the last reference to `$local_arch`, because
all other references to that were removed in #41392.
/cc @osiewicz
Release Notes:
- N/A
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
We'll now perform all searches from the context model concurrently, and
combine queries for the same glob into one reducing the total number of
project searches.
For better readability, the debug context view now displays each
top-level regex alternation individually, grouped by its corresponding
glob:
<img width="1592" height="672" alt="CleanShot 2025-10-29 at 19 56 03@2x"
src="https://github.com/user-attachments/assets/f6e8408e-09d6-4e27-ba11-a739a772aa12"
/>
Release Notes:
- N/A
Closes https://github.com/zed-industries/zed/issues/39104
This fixes an issue where the preview would not work for remote buffers
in the process.
Release Notes:
- Fixed an issue where the SVG preview would not work in remote
scenarios.
- The SVG preview will now rerender on every keypress instead of only on
saves.
Closes#41180
When using the fallback prompt renderer (default on Wayland), clicks
would bleed through into underlying windows. When the click happens to
hit a button that creates a prompt, it drops the
`RenderablePromptHandle` which is contained within `Window`, causing the
`Receiver` which returns the index of the clicked `PromptButton` to
return `Err(Canceled)` even though a button was pressed.
This bug appears in the GPUI `window.rs` example, which can be ran using
`cargo run -p gpui --example window`. MacOS has a native
`PromptRenderer` and thus needs additional code to be adjusted to be
able to reproduce the issue.
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Release Notes:
- settings_ui: Added the ability to copy a link to a given setting,
allowing users to quickly open the settings window at the correct
location in a faster way.
---------
Co-authored-by: cameron <cameron.studdstreet@gmail.com>
Co-authored-by: Ben Kunkle <ben@zed.dev>
Added a "Clear Messages" button to the ACP logs toolbar that removes all
messages.
## Motivation
When debugging ACP protocol implementations, the message list can become
cluttered with old messages. This feature allows clearing all messages
with a single click to start fresh, making it easier to focus on new
interactions without closing and reopening the ACP logs view.
Release Notes:
- N/A
This reintroduces `layer_shell` support after #32651 was reverted. On
top of that, it allows setting options for the created surface,
restricts the enum variant to the `wayland` feature, and adds an example
that renders a clock widget using the protocol.
I've renamed the `WindowKind` variant to `LayerShell` from `Overlay`,
since the protocol can also be used to render wallpapers and such, which
doesn't really fit with the word.
Things I'm still unsure of:
- We need to get the layer options types to the user somehow, but
nothing from the `platform::linux` crate was exported, I'm assuming
intentionally. I've kept the types inside the module (instead of doing
`pub use layer_shell::*` to not pollute the global namespace with
generic words like `Anchor` or `Layer` Let me know if you want to do
this differently.
- I've added the options to the `WindowKind` variant. That's the only
clean way I see to supply them when the window is created. This makes
the kind no longer implement `Copy`.
- The options don't have setter methods yet and can only be defined on
window creation. We'd have to make fallible functions for setting them,
which only work if the underlying surface is a `layer_shell` surface.
That feels un-rust-y.
CC @zeroeightysix
Thanks to @wuliuqii, whose layer-shell implementation I've also looked
at while putting this together.
Release Notes:
- Add support for the `layer_shell` protocol on wayland
---------
Co-authored-by: Ridan Vandenbergh <ridanvandenbergh@gmail.com>
Closes#41407
This solves a problem where users couldn't navigate between snippet
tabstops while the completion menu was open.
I named the action {Next, Previous}SnippetTabstop instead of Placeholder
to be more inline with the LSP spec naming convention and our codebase
names.
Release Notes:
- Editor: Add actions to move between snippet tabstop positions
Closes https://github.com/zed-industries/zed/issues/38558
The bug occurred because TabStopCursor chunk_position.1 is bounded
between 0 and 128. The fix for this was changing the bound to 0 and 127.
This also allowed me to simplify some of the tab stop cursor code to be
a bit faster (less branches and unbounded shifts).
Release Notes:
- N/A
This happens quite often with cargo based diagnostics which may spawn
several lines (sometimes the entire screen), forcing the user to scroll
up to the start of the diagnostic just to see the hover message is not
great.
Release Notes:
- Fixed diagnostics hovers not working if the diagnostic spans out of
view
Just for parity with vim. Also prevents these toggles from having both
enabled at the same time as that is a buggy state.
Release Notes:
- Added command to toggle helix mode
Closes#41422
This completely broke line numbering as described in the linked issue
and scrolling up does not have the correct numbers any more.
Release Notes:
- NOTE: The `relative_line_numbers` change
(https://github.com/zed-industries/zed/pull/39268) was reverted and did
not make the release cut!
Closes#41219
Release Notes:
- Updated docs to use `==` instead of `=` in keymap context.
Hopefully I'm not mistaken here, but I think the docs have a bug in them
Reverts zed-industries/zed#41384
The branch-protection rules work much better when there is a Job that
runs every time and can be depended on to pass, we no longer have this.
Release Notes:
- N/A
- Declare UAC support. This will prevent Windows from flagging
`auto_update_helper.exe` as a legacy setup program that needs to run as
administrator.
- Declare support for Windows 10. This will stop Windows from applying
various application compatibility profiles.
The UAC policy is not really appropriate to apply to all GPUI
applications (e.g. an installer written in GPUI may want to declare
itself as `requireAdministrator` instead of `asInvoker`). I tried
splitting this into a Zed.exe-only manifest and enabling manifest file
merging, but I ran out of my time-box. We can fix this later if this is
flagged by GPUI users.
Release Notes:
- N/A
Follow up for: #41304
Splits CI tests (cherry-picks and PRs only for now) into separate
workflows using `gh-workflow`. Includes a couple restructures to
- run more things in parallel
- remove our previous shell script based checking to filter tests based
on files changed, instead using the builtin `paths:` workflow filters
Splitting the docs/style/rust tests & checks into separate workflows
means we lose the complete summary showing all the tests in one view,
but it's possible to re-add in the future if we go back to checking what
files changed ourselves or always run everything.
Release Notes:
- N/A *or* Added/Fixed/Improved ...
---------
Co-authored-by: Conrad <conrad@zed.dev>
Release Notes:
- Remove Windows/Linux from Getting Started
- Consolidate download & system into new Installation page
- Move Remote Dev out of Windows and into Remote Development
- Add Uninstall page
- Add updates page
- Remove addl learning materials from intro
Thread stacks in rust by default have 2 megabytes of stack which for
sumtrees (or ropes in this case) can easily be exceeded depending on the
workload.
Release Notes:
- Fixed stack overflows when constructing large ropes
This PR hides the worktree root name from the path prefix displayed when
you @-mention a file or directory in the agent panel. Given the tight UI
real state we have, I believe that having the project name in there is
redundant—the project you're in is already displayed in the title bar.
Not only it was the very first word you'd see after the file's name, but
it also made the path longer than it needs to. A bit of a design clean
up here :)
(PS: We still show the project name if there are more than one in the
same workspace.)
Release Notes:
- N/A
This PR adds a setting to prevent projects from being shared in public
channels.
This can be enabled by adding the following to the project settings
(`.zed/settings.json`):
```json
{
"prevent_sharing_in_public_channels": true
}
```
This will then disable the "Share" button when not in a private channel:
<img width="380" height="115" alt="Screenshot 2025-10-28 at 2 28 10 PM"
src="https://github.com/user-attachments/assets/6761ac34-c0d5-4451-a443-adf7a1c42bcd"
/>
Release Notes:
- collaboration: Added a `prevent_sharing_in_public_channels` project
setting for preventing projects from being shared in public channels.
Was previously sending all of the tools to the LLM on the first message
of a conversation regardless of the selected agent profile. This added
extra context, and tended to create scenarios where the LLM would
attempt to use the tool and it would fail since it was not available.
To reproduce, create a new conversation where you ask the Minimal mode
which tools it has access to, or try to write to a file.
Release Notes:
- Fixed an issue in the agent where all tools would be presented as
available even when using the `Minimal` profile
---------
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Symbol completions in the context picker now show "SymbolName
filename.txt L123" instead of just "SymbolName". This helps distinguish
between symbols with the same name in different files.
## Motivation
I noticed that the message prompt editor only showed symbol names
without any context, making it hard to use in large projects with many
symbols sharing the same name. The inline prompt editor already includes
file context for symbol completions, so I brought that same UX
improvement to the message prompt editor. I've decided to match the
highlighting style with directory completion entries from the message
editor.
## Changes
- Extract file name from both InProject and OutsideProject symbol
locations
- Add `build_symbol_label` helper to format labels with file context
- Update test expectation for new label format
## Screenshots
Inline Prompt Editor
<img width="843" height="334" alt="Screenshot 2025-10-17 at 17 47 52"
src="https://github.com/user-attachments/assets/16752e1a-0b8c-4f58-a0b2-25ae5130f18c"
/>
Old Message Editor:
<img width="466" height="363" alt="Screenshot 2025-10-17 at 17 31 44"
src="https://github.com/user-attachments/assets/900659f3-0632-4dff-bc9a-ab2dad351964"
/>
New Message Editor:
<img width="482" height="359" alt="Screenshot 2025-10-17 at 17 31 23"
src="https://github.com/user-attachments/assets/bf382167-f88b-4f3d-ba3e-1e251a8df962"
/>
Release Notes:
- Added file names and line numbers to symbol completions in the agent
panel
To help make our GitHub Actions easier to understand, we're planning to
split the existing `ci.yml` into three separate workflows:
* run_bundling.yml (this PR)
* run_tests.yml
* make_release.yml
To avoid the duplication that this might otherwise cause, we're planning
to write the workflows with gh-workflow, and use rust instead of
encoding logic in YAML conditions.
Release Notes:
- N/A
---------
Co-authored-by: Ben Kunkle <ben@zed.dev>
Closes#40884
- Make IOPub task return a `Result`
- Create a monitoring task that watches over IOPub, Control, Routing and
Shell tasks.
- If any of these tasks fail, report the error with `kernel_errored()`
(which is already used to report process crashes)
https://github.com/user-attachments/assets/3125f6c7-099a-41ca-b668-fe694ecc68b9
This is not perfect. I did not have time to look into this but:
- When such errors happen, the kernel should be shut down.
- The kernel should no longer appear as online in the UI
But at least the user is getting feedback on what went wrong.
Release Notes:
- Jupyter client errors are now surfaced in the UI (#40884)
After #38882 we were always including file/directory mentions as
`zed:///agent/file?path=a/b/c.rs`.
However, for most resource links (files/directories/symbols/selections)
we want to use a common format, so that ACP servers don't have to
implement custom handling for parsing `ResourceLink`s coming from Zed.
This is what it looks like now:
```
[@index.js](file:///Users/.../projects/reqwest/examples/wasm_github_fetch/index.js)
[@wasm](file:///Users/.../projects/reqwest/src/wasm)
[@Error](file:///Users/.../projects/reqwest/src/async_impl/client.rs?symbol=Error#L2661:2661)
[@error.rs (23:27)](file:///Users/.../projects/reqwest/src/error.rs#L23:27)
```
Release Notes:
- N/A
---------
Co-authored-by: Cole Miller <cole@zed.dev>
Closes https://github.com/zed-industries/zed/issues/41334
This comes down to a caching issue..
Release Notes:
- Fixed an issue where the scrollbar track color would not update in
case the theme was changed.
The current Jetbrains keymap has `ctrl-shift-f12` set to
`CloseAllDocks`. On Jetbrains IDEs this hotkey actually toggles the
docks, which is very convenient: You press it once to hide all docks and
just focus on the code, and then you can press it again to toggle your
docks right back to how they were. Unlike `CloseAllDocks`, a toggle
means the editor needs to remember the previous docks state so this
necessitated some code changes.
Release Notes:
- Added a `Toggle All Docks` editor action and updated the keymaps to
use it
By default, the uninstaller will only delete files that were written by
the original installer. When users upgrade Zed, these new
OpenConsole.exe files will have been written by auto_upgrade_helper, not
the installer. Force them to be deleted on uninstall, so they do not
hang around.
Release Notes:
- N/A
The tab switcher render matches calls each workspace item's
`Item::tab_content` function that can return an element of variable
size. Because the tab switcher was using a uniform list under the hood,
this would cause spacing issues when tab_contents elements had different
sizes.
The fix is by changing the picker to use a material list under the hood.
Release Notes:
- N/A
## Description
Fixes the copy button functionality in REPL interactive mode error
output sections.
When executing Python code that produces errors in the REPL (e.g.,
`NameError`), the copy button in the error output section was
unresponsive. The stdout/stderr copy button worked correctly, but the
error traceback section copy button had no effect when clicked.
Fixes#40207
## Changes
Modified the following:
src/outputs.rs: Fixed context issues in render_output_controls by
replacing cx.listener() with simple closures, and added custom button
implementation for ErrorOutput that copies/opens the complete error
(name + message + traceback)
src/outputs/plain.rs: Made full_text() method public to allow access
from button handlers
src/outputs/user_error.rs: Added Clone derive to ErrorView struct and
removed a couple pieces of commented code
## Why This Matters
The copy button was clearly broken and it is useful to have for REPL
workflows. Users could potentially need to copy error messages for a
variety of reasons.
## Testing
See attached demo for proof that the fix is working as intended. (this
is my first ever commit, if there are additional test cases I need to
write or run, please let me know!)
https://github.com/user-attachments/assets/da158205-4119-47eb-a271-196ef8d196e4
Release Notes:
- Fixed copy button not working for REPL error output
Replace the binary search approach with a more efficient partition_point
method for checking selection overlaps. This eliminates the need to
collect and sort selection ranges separately, reducing memory allocation
and improving performance when handling multiple selections.
Release Notes:
- N/A
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
This change adds two things to our remote server build
process:
1. It now checks if all required tooling is installed before using it or installing it on demand. This includes checks for `rustup` and `cargo-zigbuild` in your `PATH`.
2. Next, if `ZED_BUILD_REMOTE_SERVER` contains `musl` and `ZED_ZSTD_MUSL_LIB`
is set, we will pass its value (the path) to `cargo-zigbuild` as `-C
link-arg=-L{path}`.
Release Notes:
- N/A
The `wrap selections in tag` action currently did not take line_mode
into account, which means when selecting lines with `shift-v`, the
start/end tags would be inserted into the middle of the selection (where
the cursor sits)
https://github.com/user-attachments/assets/a1cbf3da-d52a-42e2-aecf-1a7b6d1dbb32
This PR fixes this behaviour by checking if the selection uses line_mode
and then adjusting start and end points accordingly.
NOTE: I looked into amending the test cases for this, but I am unsure
how to express line mode with range markers. I would appreciate some
guidance on this and then I am happy to add test cases.
After:
https://github.com/user-attachments/assets/a212c41f-b0db-4f50-866f-fced7bc677ca
Release Notes:
- Fixed `Editor: wrap selection in tags` when in vim visual line mode
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Release Notes:
- Pane key context now includes 'buffer_search_deployed' identifier
The goal of this PR is to add a new identifier in the key context that
will let the user target when the BufferSearchBar is deployed even if
they are not focused on it.
requested in #36930
Same rational as #40454 this will allow users to make more flexible
keybindings, by including some additional information higher up the key
context tree.
i thought adding this context to `Pane` seemed more appropriate than
`Editor` since `Terminal` also has a `BufferSearchBar`; however, I ran
into some import issues between BufferSearchBar, Search, Pane, and
Workspace which made it difficult to implement adding this context
directly inside `Pane`'s render function.
instead i added a new method called `contributes_context` to
`ToolbarItem` which will allow any toolbar item to add additional
context to the `Pane` level, which feels like it might come in handy.
here are some screen shots of the context being displayed in the Editor
and the Terminal
<img width="1653" height="1051" alt="Screenshot 2025-10-25 at 14 34 03"
src="https://github.com/user-attachments/assets/21c5b07a-8d36-4e0b-ad09-378b12d2ea38"
/>
<img width="1444" height="1167" alt="Screenshot 2025-10-25 at 12 32 21"
src="https://github.com/user-attachments/assets/86afe72f-b238-43cd-8230-9cb59fb93b2c"
/>
**Problem:** Current relative line numbering creates a mismatch with
vim-style navigation when soft wrap is enabled. Users must mentally
calculate whether target lines are wrapped segments or logical lines,
making `<n>j/k` navigation unreliable and cognitively demanding.
**How things work today:**
- Real line navigation (`j/k` moves by logical lines): Requires
determining if visible lines are wrapped segments before jumping. Can't
jump to wrapped lines directly.
- Display line navigation (`j/k` moves by display rows): Line numbers
don't correspond to actual row distances for multi-line jumps.
**Proposed solution:** Count and number each display line (including
wrapped segments) for relative numbering. This creates direct
visual-to-navigational correspondence where the relative number shown
always matches the `<n>j/k` distance needed.
**Benefits:**
- Eliminates mental overhead of distinguishing wrapped vs. logical lines
- Makes relative line numbers consistently actionable regardless of wrap
state
- Preserves intuitive "what you see is what you navigate" principle
- Maintains vim workflow efficiency in narrow window scenarios
Also explained an discussed in
https://github.com/zed-industries/zed/discussions/25733.
Release Notes:
Release Notes:
- Added support for counting wrapped lines as relative lines and for
displaying line numbers for wrapped segments. Changes
`relative_line_numbers` from a boolean to an enum: `enabled`,
`disabled`, or `wrapped`.
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
If you set `{"basedpyright": {"analysis": {"typeCheckingMode":
"off"}}}`, you will notice that it doesn't actually work, but
`{"basedpyright.analysis": {"typeCheckingMode": "off"}}` does.
Made the change on how the default is being set.
Release Notes:
- N/A
The bug occurred because `smol::process::Command::from(_)` doesn't set
the correct fields for stdio markers. So moving the stdio configuration
after converting to a `smol` command fixed the issue.
I added the `std::process::Command::{stdout, stderr, stdin}` functions
to our disallowed list in clippy to prevent any bugs like this appearing
in the future.
Release Notes:
- N/A
This isn't quite right yet, as a proper solution would remember the
input modality at the moment of focus change, rather than at painting
time. But this gets us close enough for now.
Release Notes:
- N/A
## Summary
- Document the `stable`/`preview`/`nightly` top-level keys that let
users scope settings overrides per release channel.
- Provide an example `settings.json` snippet and call out that overrides
replace array values rather than merging them.
- Mention that UI-driven changes edit the root config so per-channel
blocks might need manual updates.
## Testing
- Not run (docs only).
Fixes#40458.
Release Notes:
- N/A
---------
Co-authored-by: MrSubidubi <finn@zed.dev>
```json
"edit_predictions": {
"codestral": {
"api_url": "https://codestral.mistral.ai",
"model": "codestral-latest",
"max_tokens": 150
}
},
```
Release Notes:
- Added support for changing the Codestral endpoint. This was discussed
at #34371.
---------
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Introduce a new `prefer_focused_window` field to the
`workspace::OpenOptions` struct that, when provided, will make it so
that Zed opens the provided path in the currently focused window.
This will now automatically be set to true when the `--wait` flag is
used with the CLI.
Closes#40551
Release Notes:
- Improved the `--wait` flag in Zed's CLI so as to always open the
provided file in the currently focused window
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Closes https://github.com/zed-industries/zed/issues/41168
This PR adds both Tailwind CSS and Ruff (linter for Python) as built-in
features; a banner mentioning this should show up now for these two when
searching for them in the extensions UI.
There will also be a corresponding zed.dev site PR adding a "Ruff is
built-in" card to the zed.dev/extensions page.
Release Notes:
- N/A
We were not actually using `paths::agent_servers` and were manually
constructing the path to the `external_agents` folder in a few places.
Release Notes:
- N/A
Using compiler explorer I saw that the compiler wasn't clever enough to
optimise away the branches in the masking code. I thought the compiler
would have a better chance if we always branched, which [turned out to
be the case](https://godbolt.org/z/PM594Pz18).
Running the benchmarks the biggest benefit I saw was:
```
push/65536 time: [2.9067 ms 2.9243 ms 2.9417 ms]
thrpt: [21.246 MiB/s 21.373 MiB/s 21.502 MiB/s]
change:
time: [-8.3452% -7.2617% -6.2009%] (p = 0.00 < 0.05)
thrpt: [+6.6108% +7.8303% +9.1050%]
Performance has improved.
```
But I did also see some regressions:
```
slice/4096 time: [66.195 µs 66.815 µs 67.448 µs]
thrpt: [57.915 MiB/s 58.464 MiB/s 59.012 MiB/s]
change:
time: [+3.7131% +5.1698% +6.6971%] (p = 0.00 < 0.05)
thrpt: [-6.2768% -4.9157% -3.5802%]
Performance has regressed.
```
Release Notes:
- N/A
Fixes https://github.com/zed-industries/zed/issues/41260
After experimenting and reading through the implementation of OpenSSH
stack on Windows, it looks like batch mode precludes use of passwords.
In the listing
b8c08ef9da/sshconnect2.c (L417),
the last field of each `Authmode` struct is a pointer to the config
value that *disables* that particular mode. In this case, `keyboard`
(interactive) and `password` modes are both disabled if batch mode is
used. We should therefore fall back to `scp` if `sftp` fails rather than
to fail outright.
Release Notes:
- N/A
Closes#40898
Release Notes:
- Fixed an issue where attempting to add or update a key binding in the
keymap editor with an empty `keymap.json` file would fail
Closes https://github.com/zed-industries/zed/issues/41267
The only downside would be the fact that a Zed window will appear behing
the version modal, but this is a limitation for all "window-less"
actions currently.
Release Notes:
- Made "About Zed" menu entry to work when all Zed windows are closed
Updates to acp crate 0.7, which allows us to send information about the
client to the Agent.
In the future, we can also use the AgentInfo on the response for
internal metrics.
Release Notes:
- N/A
Fixes a regression introduced in
https://github.com/zed-industries/zed/pull/39857. As for the exact
reason this causes this issue I am not yet sure will investigate (as per
the todos in code)
Fixes ZED-23R
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Previously, the hover popover delay was implemented using two
overlapping timers, which caused the minimum delay to always be at least
HOVER_REQUEST_DELAY_MILLIS, regardless of the hover_popover_delay
setting.
This change updates the logic to wait for hover_popover_delay only,
ensuring the total delay is always equals to hover_popover_delay . As a
result, the hover popover now appears after the intended delay, matching
the user's configuration more accurately.
Release Notes:
- Improved hover popover respecting settings delay correctly
This PR fixes some instances where we were displaying action names in
quotes instead of in backticks.
Also fixed some mentions of using an action to open the settings file,
as this has changed after the release of the settings UI.
Release Notes:
- N/A
When trying to split and clone a non clone-able workspace item we now
attempt split and move instead of doing nothing. Additionally we disable
the split menu buttons if we can't split the active item at all.
Release Notes:
- Improved handling of unsplittable panes
We only use it a handful of times and the default amount of threads
(logical cpu core number) its spawns is overkill for this. This also
gives the threads names oppose to being labeled `<unknown>`
Release Notes:
- N/A *or* Added/Fixed/Improved ...
The issues is that the closure supplied to `request_measured_layout`
could be run multiple times with differing `known_dimensions`. This in
turn will mean we truncate the font runs once, inserting a multibyte
char at the end but then in the next iteration use those truncated runs
for possible the original untruncated string which has multibyte
characters overlapping the now truncated run end resulting in a faulty
utf8 boundary index.
Solution to this is simple, truncate a clone of the runs when needed
instead of modifying the original.
Fixes https://github.com/zed-industries/zed/issues/36925
Fixed ZED-2FF
Fixes ZED-2KM
Fixes ZED-2KK
Fixes ZED-1FF
Fixes ZED-255
Fixes ZED-2JD
Fixes ZED-2FX
Fixes ZED-2K2
Fixes ZED-2JX
Fixes ZED-2GE
Fixes ZED-2FC
Fixes ZED-2GD
Fixes ZED-2HY
Fixes ZED-2HR
Fixes ZED-2FN
Fixes ZED-2GT
Fixes ZED-2FK
Fixes ZED-2EY
Fixes ZED-27E
Fixes ZED-272
Fixes ZED-2EM
Fixes ZED-2CC
Fixes ZED-29V
Fixes ZED-25B
Fixes ZED-257
Fixes ZED-24R
Fixes ZED-24Q
Fixes ZED-23Z
Fixes ZED-227
Release Notes:
- Fixed a crash in text shaping when truncating rendered text
We've been seeing a lot of weird constant rebuilds recently with
rust-anaylzer's check, either with cargo thinking build scripts are too
new timestamp wise or all fingerprints having gone missing somehow
(???). Reading through some related bug reports hints at disabling
incremental potentially working around this for now so let's test that
out
cc https://github.com/rust-lang/cargo/issues/16104
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Split out from https://github.com/zed-industries/zed/pull/40774 to
reduce the size of the reland of that PR (once I figure out the cause of
the issue)
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Adds debugger inline values support for JavaScript, TypeScript, and TSX languages.
Release Notes:
- debugger: Add inline value support for Javascript, TypeScript, and TSX
---------
Co-authored-by: Anthony <anthony@zed.dev>
1. Settings Viewed: Whenever someone opens or refocus the settings ui
via an action
2. Settings Closed: When the settings ui window is closed
3. Settings Navigation Clicked: The category and subcategory that a user
clicked on
4. Settings Error Shown: Whenever an error banner shows up
5. Settings Changed: The setting a user changed through the UI
cc: @katie-z-geer
Release Notes:
- N/A
This PR allows you to define `align="right"` for example to change the
default alignment on **HTML** table columns. This PR also refactors
where we store the alignments in order to make it so you can define it
column based instead of only row based.
See that the `Revenue` column is left aligned instead of the default
`centered`.
**Result**
<img width="1161" height="177" alt="Screenshot 2025-10-25 at 11 01 38"
src="https://github.com/user-attachments/assets/94bda4f0-00c1-4726-a3bd-99b3f2573ef5"
/>
**Code example**
```HTML
<table>
<tr>
<th rowspan="2">Region</th>
<th colspan="2" align="left">Revenue</th>
<th rowspan="2">Growth</th>
</tr>
<tr>
<th>Q2 2024</th>
<th>Q3 2024</th>
</tr>
<tr>
<td>North America</td>
<td>$2.8M</td>
<td>$2.4B</td>
<td>+85,614%</td>
</tr>
<tr>
<td>Europe</td>
<td>$1.2M</td>
<td>$1.9B</td>
<td>+158,233%</td>
</tr>
<tr>
<td>Asia-Pacific</td>
<td>$0.5M</td>
<td>$1.4B</td>
<td>+279,900%</td>
</tr>
</table>
```
Release Notes:
- markdown preview: Add support for `HTML` table column `align`
attribute
Follow-up: https://github.com/zed-industries/zed/pull/39898
Right now, we don't fill the empty column when the current row count is
less than the max row count. This PR fixes that by filling it with an
empty cell. So the table columns don't flow in the wrong direction, as
you can see inside the first screenshot.
**Before**
<img width="1095" height="182" alt="Screenshot 2025-10-24 at 16 09 02"
src="https://github.com/user-attachments/assets/e3abf24e-c190-4bd7-b43a-39f2f01ecd1c"
/>
**After**
<img width="1165" height="178" alt="Screenshot 2025-10-24 at 16 19 17"
src="https://github.com/user-attachments/assets/427c25f9-82a7-498b-a1a2-d71e4c288fe5"
/>
**Code example**
```html
<table>
<tr>
<th rowspan="2">Region</th>
<th colspan="2">Revenue</th>
<th rowspan="2">Growth</th>
</tr>
<tr>
<th>Q2 2024</th>
<th>Q3 2024</th>
</tr>
<tr>
<td>North America</td>
<td>$2.8M</td>
<td>$2.4B</td>
<td>+85,614%</td>
<td>+99%</td> // extra column here
</tr>
<tr>
<td>Europe</td>
<td>$1.2M</td>
<td>$1.9B</td>
<td>+158,233%</td>
</tr>
<tr>
<td>Asia-Pacific</td>
<td>$0.5M</td>
<td>$1.4B</td>
<td>+279,900%</td>
</tr>
</table>
```
**Note** there are no release notes, as the previous PR didn't get
released yet.
Release Notes:
- N/A
Some information in the GDScript documentation page was outdated (like
it still treats Zed if it was a macOS exclusive app) or some details
were missing.
- The `zed-gdscript` URL has been updated with the new owner.
- Pre-requisites added (with netcat included).
- Godot installation steps removed, it's now listed in the
pre-requisites.
- Setup steps simplified and reworded.
The note at the bottom was removed as I didn't see the issue in my end.
Release Notes:
- N/A
## Overview
- document how to keep a per-user debug.json so global launch tasks show
up everywhere (Fixes#39849)
- sanitize REPL terminal text before copying so error blocks can be
copied and opened in buffers (Fixes#40207)
## Design Decisions
- reused the existing user debug file (paths::debug_scenarios_file) and
pointed docs at the zed::OpenDebugTasks command to stay aligned with the
settings UX
- extract a sanitize helper inside TerminalOutput::full_text to strip
\r/null padding while keeping indentation intact, then join the cleaned
lines so clipboard and buffers get readable text
## Testing
- Not run (cargo is unavailable in this environment)
Fixes#39849.
Fixes#40207.
Add support for GithubCopilot /responses endpoint. This gives the
copilot chat provider the ability to use the new GPT-5 codex model and
any other model that lacks support for /chat/copmletions endpoint.
Closes#38858
Release Notes:
- Add support for GithubCopilot /responses endpoint.
# Added
1. copilot_response.rs that has the /response endpoint types
2. uses response endpoint if model does not support /chat/completions.
3. new into_copilot_response() to map LanguageCompletionEvents to
Request.
4. new map_stream() to map response stream event to
LanguageCompletionEvents and tests.
5. Fixed a bug where trying to parse response for non streaming for
/chat/completion was failing
# Notes
There is a pr open - https://github.com/zed-industries/zed/pull/39989
for adding /response support for OpenAi and OpenAi compatible API.
Altough they share some similarities (copilot api seems to mirror openAi
directly) ive simplified some stuff and tried to keep it the same with
the vscode-chat implementation where possible. There might be a case for
code reuse but i think keeping them separate for now should be ok.
# Tool Calls
<img width="716" height="670" alt="Screenshot from 2025-10-15 17-12-30"
src="https://github.com/user-attachments/assets/14e88a52-ba8b-4209-8f78-73d15034b1e0"
/>
# Image
<img width="923" height="494" alt="Screenshot from 2025-10-21 02-02-26"
src="https://github.com/user-attachments/assets/b96ce97c-331e-45cb-b5b1-7aa10ed387b4"
/>
Very often, when I'm testing or playing around with the zoom feature,
including the agent panel, I find myself missing one quick action that
would bring everything back to normal. That's what `ResetAllZoom` does.
If you have customized your zoom level in all areas of Zed, that action
returns everything to its default state. Similarly, if you're playing
around with zoom just in the agent panel, `ResetAgentZoom` does the same
in that context.
Release Notes:
- Added the `ResetAllZoom` and `ResetAgentZoom ` actions, allowing to
return the zoom level across the whole app and/or just in the agent
panel to its default/original value.
Closes https://github.com/zed-industries/zed/issues/41094
This PR adds the `agent_buffer_font_size` settings to be scaled in the
same proportion as the agent panel's UI font size, which was the only
setting that was being accounted for. This is something that I forgot to
do when we broke down the agent panel's font size controls into these
two values.
Release Notes:
- agent: Fixed an issue where the agent panel's buffer and UI font size
wouldn't scale proportionally.
Closes#40589
Replaced `System::new_all()` with `System::new_with_specifics` to fetch
only essential process information and exclude non-main threads from the
process list
after fix:
<img width="641" height="474" alt="image"
src="https://github.com/user-attachments/assets/32335552-2f7a-4317-8c01-f37b2eadfdc1"
/>
Release Notes:
- Fix duplicate process entries in WSL debug attach list
Update `project::buffer_store::BufferStore.save_buffer_as` in order to
correctly update the `path_to_buffer_id` hash map, ensuring that the
currently open file's path is dissociated from the buffer's id, to
prevent the new buffer from being open when trying to open the original
file.
Closes#29783
Release Notes:
- Fixed issue where using `workspace: save as` would prevent users from
opening the original file from which the new file was created
---------
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
This PR removes the behavior that the number_field changes focus to the
previous element when using the decrement button.
I mainly noticed this while decreasing the tab-size of a language, since
it there closes the page...
Please note that I am unsure what if any purpose this code has.
I was unable to find a use case and since it is not present in the
`increment_handler` I guess it should never have been here
---
Release Notes:
* Fixed wrongly focus previous element on number_field decrement
Using the cool, [recently
added](https://github.com/zed-industries/zed/pull/40940) `focus-visible`
support in some components. This will be particularly nice in the
settings UI, as it will not display the focus styles if you're
navigating it with a pointer device as opposed to the keyboard.
Release Notes:
- N/A
Just got a new Windows machine and realized that the rules library empty
state was completly busted. Ended up also adding some little UI tweaks
to make it better for both Windows and Linux.
Release Notes:
- N/A
Closes#40351
The leak mainly showed up in the appearance page because it had a lot of
dropdown menus. The problem occurred because the drop-down menus were
creating a new entity on each frame instead of using the
`window.use_state...` API.
Release Notes:
- settings ui: Fixed memory leak in UI
---------
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Set a TLS bit to skip invoking the crash handler when a detached thread
panics.
cc @P1n3appl3 - is this at odds with what we need the crash handler to
do?
May close#39289, cannot repro without a nightly build
Release Notes:
- Fixed extension panics crashing Zed on Linux
Co-authored-by: dino <dinojoaocosta@gmail.com>
Closes#40581
Release Notes:
- git: No longer save clean files when staging (to avoid triggering
unnecessary rebuilds in external file watchers like vite)
Closes https://github.com/zed-industries/zed/issues/38453
Current `Buffer` API only allows getting buffer text with `\n` line
breaks — even if the `\r\n` was used in the original file's text.
This it not correct in certain cases like LSP formatting, where language
servers need to have original document context for e.g. formatting
purposes.
Added new `Buffer` API, replaced all buffer LSP registration places with
the new one and added more tests.
Release Notes:
- Fixed ESLint linebreak-style errors by preserving line endings in LSP
communication
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Previously we had `Context` and `ContextStore` in both `agent_ui` (used
to store context for the inline assistant) and `assistant_context` (used
for text threads) which is confusing.
This PR makes it so that the `assistant_context` concepts are now called
`TextThread*`, the crate was renamed to `assistant_text_thread`
Release Notes:
- N/A
This PR does two related things:
- First, it gets rid of the undifferentiated `RepositoryEvent::Updated`
in favor of three new events that have clearer definitions:
`BranchChanged`, `StashEntriesChanged`, and `StatusesChanged`. An
implication of this is that we no longer emit a `RepositoryEvent` unless
some git state changed; previously we would emit `RepositoryUpdated`
after doing a git status scan even if no statuses changed.
- Second, it changes the subscription strategy of the project diff to
make it update more robustly. Previously, the project diff only
subscribed to the `GitStore`, so it relied on getting a `GitStoreEvent`
when some buffer's diff hunks changed, even if the git status of the
buffer's file didn't change (e.g. a second hunk in a file that was
already modified). After this PR, it also subscribes to the individual
`BufferDiff` entities for buffers that have a git status, so the
`GitStore` is freed from that responsibility. This also fixes some real
cases where the previous strategy was not effective in keeping the
project diff up to date (captured in a test).
Release Notes:
- Fixed some cases where the project diff would fail to update in
response to git events.
We still see a bunch of panics here but the default slicing panic
doesn't tell which side of the range is bad
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Before, inlay chunks were retrieved from the cache based on actualized
anchor ranges, but using an old buffer snapshot. Now, update all chunks
and snapshot to the actual before returning the applicable ones.
Follow-up of https://github.com/zed-industries/zed/pull/40183
Release Notes:
- N/A
- Added "ctrl-p" for selecting the previous menu item
- Added "ctrl-n" for selecting the next menu item
Closes#40619
Release Notes:
- Ctrl+P now moves to the previous result; Ctrl+N moves to the next.
This shrinks it from roughly a ~kilobyte to 8 byte, removing a bunch of
memmoves emitted by the compiler. Also `Arc`'s it instead of boxing as
we do clone it a couple times here and there, making that also a fair
bit cheaper
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Fixes ZED-12D
`wasmtime_wasi` might call into tokio futures (to sleep for example)
which requires access to the tokio runtime. So we are required to run
these extensions in the tokio thread pool
Release Notes:
- Fixed extensions causing zed to occasionally panic
I made three significant changes in this PR.
1. `SettingsWindow::fetch_files` now creates
`SettingsUiFile::Project(..)` for any worktree that contains no project
settings.
2. `update_settings_file` now creates an empty settings file if a
worktree doesn't contain one.
3. `open_current_settings_file` also creates a settings file if the
current one doesn't exist.
Release Notes:
- settings ui: Enable editing project settings for worktrees that don't
have a project setting file.
This PR gets the `SettingsWindow` struct to subscribe to all
`Entity<Project>` events and any future project entities that are
created. When a project emits an event that signals a worktree has been
added or removed, the settings window refetches all settings files it
can find.
This fixes a bug where the settings ui would notice some project
settings that were created or opened after the `SettingsWindow` has been
initialized.
I also renamed `LOCAL` file mask to `PROJECT` to be inline with the
`SettingsFile` naming convention.
Release Notes:
- settings ui: Fix bug where project setting files wouldn't be detected
if they were created or opened after while an active settings window is
open
Using `shlex` unconditionally is dangerous as it assumes the underlying
shell is POSIX which is not the case for PowerShell, CMD, or Nushell.
Therefore, whenever we want to quote the args we should utilise our
helper `util::shell::ShellKind::try_quote` which takes into account
which shell is being used to actually exec/spawn the invocation.
Release Notes:
- N/A
---------
Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
This is a refactoring PR to simplify our environment loading code by:
- Getting rid of `EnvironmentErrorMessage` in favor of using
`anyhow::Result` everywhere, with a separate `mpsc` channel to
communicate statuses that will be shown in the activity indicator
- Inlining some functions that were only called once to reduce
indirection
- Removing the separate `direnv` module
Release Notes:
- N/A
Don't prepend the worktree root when using an absolute path from
`Worktree::which`, since that does the wrong thing when running in
wasmtime given two Windows absolute paths. Also don't pass this path to
`node`, since when npm installed it's a sh/cmd wrapper not a JS file.
Part of #39153, also needs a fix on the vscode-langservers-extracted
side (missing shebang for the vscode-html-language-server script).
Release Notes:
- Fixed Zed failing to run the HTML language server in some cases.
Just tidying this up a bit. Really have to fix this Banner component at
some point 😅 Having to add some spacing hacks to make it perfect here
that are not ideal and should be baked into the component.
Release Notes:
- N/A
Now that we have two surface areas that open as separate windows, it's
important they're consistent with one another. This PR make the settings
UI and rules library windows more similar by having them use the same
minimum window size and similar styles for their navbar given they have
fundamentally the same design (nav on the left and content on the
right).
Release Notes:
- N/A
<img width="335" height="236" alt="image"
src="https://github.com/user-attachments/assets/5e09e9ed-f0f3-48df-ac22-032edfc6c114"
/>
Release Notes:
This PR fixes inconsistent use of trailing ellipsis (…) in the MCP
Server menu.
Previously, some menu items (like Add Custom Server…) used hardcoded
ellipses even though they didn’t trigger additional dialogs or steps.
This change removes unnecessary ellipses to align with standard UI/UX
conventions used across Zed’s menus.
---------
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Follow-up: https://github.com/zed-industries/zed/pull/34655
We should use an opaque fallback color for `panel.overlay_hover`. This
helps when a custom theme doesn’t provide it, nor `element.hover`. For
example, VSCode’s default modern dark theme doesn’t include an
`element.hover` color after import.
Release Notes:
- Fixed an issue where the project panel’s sticky entry could appear
transparent on hover with certain themes.
After clicking on the file drop-down and selecting a file, both the
selected file and the first drop-down entry would be the same file name
instead of overwriting a file name.
Release Notes:
- settings ui: Fix bug where duplicate file names showed in the header
files
Release Notes:
- agent: Improved the editing previous messages UX by focusing in the
agent panel's message editor after regenerating a prompt, instead of
moving focus to the nearest regular buffer.
Closes#39172
This refactors when we resolve UI keybindings in an effort to reduce
flickering whilst painting these: Previously, we would always resolve
these upon creating the binding. This could lead to cases where the
corresponding context was not yet available and no binding could be
resolved, even if the binding was then available on the next presented
frame. Following that, on the next rerender of whatever requested this
keybinding, the keybind for that context would then be found, we would
render that and then also win a layout shift in that process, as we went
from nothing rendered to something rendered between these frames.
With these changes, this now happens less often, because we only look
for the keybinding once the context can actually be resolved in the
window.
| Before | After |
| --- | --- |
|
https://github.com/user-attachments/assets/adebf8ac-217d-4c7f-ae5a-bab3aa0b0ee8
|
https://github.com/user-attachments/assets/70a82b4b-488f-4a9f-94d7-b6d0a49aada9
|
Also reduced cloning in the keymap editor in this process, since that
requiered changing due to this anyway.
Release Notes:
- Fixed some cases where keybinds would appear with a slight delay,
causing a flicker in the process
Closes https://github.com/zed-industries/zed/issues/40047
Closes https://github.com/zed-industries/zed/issues/24798
Closes https://github.com/zed-industries/zed/issues/24788
Before, each editor, even if it's the same buffer split in 2, was
querying for inlay hints separately, and storing the whole inlay hint
twice, in `Editor`'s `display_map` and its `inlay_hint_cache` fields.
Now, instead of `inlay_hint_cache`, each editor maintains a minimal set
of metadata (which area was queried by what task) instead, and all LSP
inlay hint data had been moved into `LspStore`, both local and remote
flavors store the data.
This allows Zed, as long as a buffer is open, to reuse the inlay hint
data similar to how document colors and code lens are now stored and
reused.
Unlike other reused LSP data, inlay hints data is the first one that's
possible to query by document ranges and previous version had issue with
caching and invalidating such ranges already queried for.
The new version re-approaches this by chunking the file into row ranges,
which are queried based on the editors' visible area.
Among the corresponding refactoring, one notable difference in inlays
display are multi buffers: buffers in them are not
[registered](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_didOpen)
in the language server until a caret/selection is placed inside their
excerpts inside the multi buffer.
New inlays code does not query language servers for unregistered
buffers, as servers usually respond with empty responses or errors in
such cases.
Release Notes:
- Reworked inlay hints to be less error-prone
---------
Co-authored-by: Lukas Wirth <lukas@zed.dev>
Co-authored-by: dino <dinojoaocosta@gmail.com>
Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
In practice this just hides the web search tool when not using the Zed
provider
Release Notes:
- Fixed an issue where the web search tool would show up in the profile
selector even when not using a model via Zed Pro
Closes#40874
Release Notes:
- Fixed an issue where migrating settings after v0.208.5+ would
spuriously enable prettier. This fix only affects those who have not
updated or migrated yet. For those who have already updated to version
v0.208.5 or later, placing `"formatter": []` in your settings in the
affected languages will fix the issue.
---------
Co-authored-by: Mikayla <mikayla@zed.dev>
This PR switches us back to the upstream version of `async-tar` and
upgrades to v0.5.1.
This version has the patch we need:
0c18195639.
Release Notes:
- N/A
Closes https://github.com/zed-industries/zed/issues/39837
This PR adds support for `colspan` feature that is only supported for
HTML tables. I also fixed an edge case where the right side border was
not applied because it didn't match the total column count.
**Before**
<img width="725" height="179"
alt="499166907-385cc787-fc89-4e6d-bf06-c72c3c0bd775"
src="https://github.com/user-attachments/assets/69586053-9893-4c92-aa89-7830d2bc7a6d"
/>
**After**
<img width="1165" height="180" alt="Screenshot 2025-10-21 at 22 51 55"
src="https://github.com/user-attachments/assets/f40686e7-d95b-45a6-be42-e226e2f77483"
/>
```html
<table>
<tr>
<th rowspan="2">Region</th>
<th colspan="2">Revenue</th>
<th rowspan="2">Growth</th>
</tr>
<tr>
<th>Q2 2024</th>
<th>Q3 2024</th>
</tr>
<tr>
<td>North America</td>
<td>$2.8M</td>
<td>$2.4B</td>
<td>+85,614%</td>
</tr>
<tr>
<td>Europe</td>
<td>$1.2M</td>
<td>$1.9B</td>
<td>+158,233%</td>
</tr>
<tr>
<td>Asia-Pacific</td>
<td>$0.5M</td>
<td>$1.4B</td>
<td>+279,900%</td>
</tr>
</table>
```
**TODO**:
- [x] Add tests for rending logic
- [x] Test all the tables again
cc @bennetbo
Release Notes:
- Markdown: Added support for `colspan` and `rowspan` for HTML tables
---------
Co-authored-by: Zed AI <ai@zed.nl>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Hello,
I am having a great time setting up the editor, but with a few problems
related to the Emacs keymap.
In this PR I have compiled changes in the default `emacs.json` that I
believe make the onboarding smoother for incoming emacs users.
This includes points that may need further discussion and some breaking
changes, although nothing that cannot be reverted with a quick
`keymap.json` overwrite.
(Please let me know if it is better to split up the PR)
### 1. Avoid fallbacks to the default keymap
all platforms:
- `ctrl-g` activating `go_to_line::Toggle` when there is nothing to
cancel
linux / windows:
- `ctrl-x` activating `editor::Cut` on the 1 second timeout
- `ctrl-p` activating `file_finder::Toggle` when the cursor is on the
first character of the buffer
- `ctrl-n` activating `workspace::NewFile` when the cursor is on the
last character of the buffer
### 2. Make all move commands operate on full words
In the current Zed implementation some commands run on full words and
others on subwords.
Although ultimately a matter of user preference, I think it is sensible
to use full words as the default, since that is what is shipped with
emacs.
### ~~3. Cancel selections after copy/cut commands~~ Moved to #40904
Canceling the selection is the default emacs behavior, but the way to
achieve it might need some brushing.
Currently I am using `workspace::SendKeystrokes` to copy ->
cancel(`ctrl-g`), but this has the following problems:
- can only be used in the main buffer (since `editor::Cancel` would
typically close secondary buffers)
- may cause problems downstream if the user overwrites the `ctrl-g`
binding
### ~~4. Replace killring with normal cut/paste commands~~ Moved to
#40905
Ideally Zed would support emacs-like killrings (#25270 and #22490).
However, I understand that making an emacs emulator is not a project
goal, and the Zed team should have a bunch of tasks with higher
priority.
By using a unified clipboard and standard cut/paste commands, we can
provide an experience that is closer to the out-of-the-box emacs
behavior (#33351) while also avoiding some pitfalls of the current
killring implementation (#28715).
### 5. Promote some bindings to workspace commands
- `alt-x` as `command_palette::Toggle`
- `ctrl-x b` and `ctrl-x ctrl-b` as `tab_switcher::Toggle`
---
Release Notes:
- emacs: Fixed a problem where keys would fallback to their default
keymap binding on certain conditions
- emacs: Changed `alt-f` and `alt-b` to operate on full words, as in the
emacs default
- emacs: `alt-x`, `ctrl-x b`, and `ctrl-x ctrl-b` are now Workspace
bindings
Re-lands https://github.com/zed-industries/zed/pull/40719, fixes the
bugs that were discovered with it and improves some more stuff in that
area
Release Notes:
- Fixed a rare issue where the extension page would stutter while
scrolling.
---------
Co-authored-by: Agus Zubiaga <agus@zed.dev>
This PR renames the `agent::QuoteSelection` to
`agent::AddSelectionToThread` _and_ adds it as a menu item in both the
right-click context menu within regular buffers as well as the
"Selection" app menu.
We've received feedback in the past about how hard to discover this
feature is, and after watching [the Syntax podcast
crew](https://www.youtube.com/watch?v=bRK3PeVFfVE) recently struggle
with doing so—and then naturally looking for it in the context menu and
not finding it—it felt like time to push a change. I think the rename +
the availability in these places could help bringing it to surface more.
The same action can be done in Cursor through the `cmd-l` keybinding,
but in Zed, that triggers `editor::SelectLine`, which I don't want to
override by default. However, if you're using Cursor's keymap, then
`cmd-l` does trigger this action, as expected.
<img width="500" height="1812" alt="Screenshot 2025-10-22 at 12 01@2x"
src="https://github.com/user-attachments/assets/dfc2c41c-8d0a-4a1a-8ea1-1bd5d1aa1171"
/>
Release Notes:
- agent: Improves discoverability of the previously called "quote
selection" action—which allows to add a text selection in a buffer as
context within the agent panel—by renaming it to "add selection to
thread" and making it available from the right-click editor context menu
as well as the "Selection" app menu.
The suggested `→` appears tiny, and almost looks like just a dot on my
monitor, and I got quite confused for a while thinking the
`whitespace_map.tab` setting wasn't working properly.
<img width="630" height="105" alt="Image"
src="https://github.com/user-attachments/assets/98feced2-39b3-4734-83e4-b4573b4e52c2"
/>
I think it would be really helpful if `⟶` was suggested instead since
that displays properly.
<img width="625" height="104" alt="Image"
src="https://github.com/user-attachments/assets/176886ab-cf88-4079-90a8-91a8e8182092"
/>
---
I am using `Fira Code` as my font on windows, however when I remove that
config to get the default font, it also still appears the same size. So
I don't believe this is just a font issue on my machine.
Thought I am using Windows, so I would be willing to believe this a
render issue specific to windows
Release Notes:
- N/A
Reverts zed-industries/zed#40719
This unveiled some bigger issues with the UniformList size computations,
which are more crucial than what was fixed here.
Release Notes:
- NOTE: BUGFIX "Fixed a rare issue where the extension page would
stutter while scrolling." was reverted due to some other issues
This simplifies some code and is also more correct in some others (I
believe some of these might've overflowed causing panics in sentry)
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Closes#37726
Release Notes:
- Fixed an issue where the buffer would not regain focus when clicked
while a filename edit was in progress in the project panel.
---------
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Should be merged with
https://github.com/zed-industries/extensions/pull/3584, which adds
`slang-server` as a new language server, but should be disabled by
default due to an issue with it not initializing on Windows and being a
relatively new language server in general.
Release Notes:
- N/A
Currently running `cargo update` on Zed will break the collab crate
because the versions of sea-orm and sea-orm-macros will not match. This
results in a bunch of noisy warnings from rust-analyzer.
Release Notes:
- N/A
Fixes a bug in https://github.com/zed-industries/zed/pull/39928
The bug caused all completions to appear in bold-face
Release Notes:
- Fixed a bug where bold-face font was applied to the wrong characters
in items in the autocomplete menu
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
In remote connections, we don't detect whether trashing is possible and
generally shouldn't assume it is. This also fixes up some incomplete
logic that was attempting to do that.
Closes#39212
Release Notes:
- No longer show trash option in remote projects
In the process of adding pickers for the theme and icon themes fields in
the settings UI, I felt like there was an improvement opportunity in
regards to where some of these components are stored. The `ui_input`
crate originally was meant only for the text field-like component, which
couldn't be in the regular `ui` crate due to the dependency with
`editor`. Given we had also added the number field there—which is
similar in also having the same dependency—it made sense to think of
this crate more like a home for form-like components rather than for
only one component.
However, we were also storing some settings UI-specific stuff in that
crate, which didn't feel right. So I ended up creating a new directory
within the `settings_ui` for components and moved all the pickers and
the custom input field there. I think this makes it for a cleaner
structure.
Release Notes:
- settings_ui: Added the ability to search for theme and icon themes in
their respective fields.
Follows on from https://github.com/zed-industries/zed/pull/39949.
Again I'm not 100% sure of the intent but I think this is a fix:
`generate_random_string(rng, 4096)` would previously give you a string
of 4096 *chars* which could be anywhere between 4kB and 16kB in bytes.
This seems probably not what was intended, because Ropes generally work
in bytes not chars, including for the offsets used to index into them.
This seems to possibly cause a _regression_ in benchmark performance,
which is surprising because it should generally cause smaller test data.
But, possibly it's doing better at exercising different paths?
cc @mrnugget
Release Notes:
- N/A
This means that existence of activation scripts for venv/virtualenv will
be checked locally either on the host if editing locally, or the remote
by the remote proxy if editing a remote project.
Closes https://github.com/zed-industries/zed/issues/40263
Release Notes:
- N/A
Closes#40748
This PR improves the Centered Layout Padding in settings ui by limiting the numeric stepper to be within valid values and adding a custom schema generated to improve the JSON LSP completions and warnings when editing the setting field manually.
Release Notes:
- settings ui: limit stepper increment for centered padding between 0 and 0.4 and increment by 0.05 now
---------
Co-authored by: Anthony Eid <anthony@zed.dev>
We document the location of the log file in many places, we should just
make it easy to open directly within your file browser. The one thing
here is naming. We use dynamic naming for "reveal" actions in the
project panel, to reflect the right file manager name per OS, but for a
command palette action, I dont think we want to have dynamic code for
the action name, just going with finder at the moment.
Release Notes:
- Added a `zed: reveal log in file manager` action to the command
palette.
- Improves the UI for subfields of dynamic items
- Makes description writing more consistent (add period at the end of
every sentence, fix capitalization of proper names, ensure description
is always in sentence case)
- Other small details, mostly around spacing/padding
Release Notes:
- N/A
Hopefully, this will make the install/configure/uninstall buttons in the
right stand out a bit more and make their presence a bit more obvious
for newcomers.
| Before | After |
|--------|--------|
| <img width="1938" height="1276" alt="Screenshot 2025-10-21 at 10
58@2x"
src="https://github.com/user-attachments/assets/b76115e1-0be2-4d5b-a677-525663d86c7c"
/> | <img width="1938" height="1276" alt="Screenshot 2025-10-21 at 10
53@2x"
src="https://github.com/user-attachments/assets/9e563b71-b11a-4b69-b687-c0b469ca4eec"
/> |
Release Notes:
- Increased affordance of the download button in each extension card in
the extensions page.
Just wanted a single location to point people to for telling them where
to find their log file. I left duplicate text in GitHub Issue templates,
as it seems annoying to have to follow a link when making an issue.
Release Notes:
- N/A
Closes#40608
Release Notes:
- settings_ui: Fixed an issue where tabbing to the nav bar from the
search bar while the nav bar was scrolled would result in the first
_visible_ nav entry being selected, instead of the literal first nav
entry
- settings_ui: Fixed an issue where scrolling the selected nav entry off
screen would cause the keyboard shortcut hint for the focus nav / focus
content binding to dissapear
- settings_ui: Fixed an issue where text input controls could not be
focused via the keyboard
Release Notes:
- Improved text color in LSP document color highlight.
----
Because highlight ranges are implemented using a paint background,
there's no way to control the text color.
I've been thinking about this problem for a long time, want to solve it.
~~Today, I come up with a new idea. Re-rendering the document color text
at the top should solve this problem.~~
#### Update 10/6:
> The previous version is not good, when we have soft wrap text, that
version will not work correct.
Now use exists `bg_segments_per_row` feature to fix text color.
## Before
<img width="563" height="540" alt="image"
src="https://github.com/user-attachments/assets/99722253-0cab-4d2a-a5d1-7f28393bcaed"
/>
## After
<img width="544" height="527" alt="image"
src="https://github.com/user-attachments/assets/a1bf6cdb-0e9c-435d-b14a-6ee9159a63d9"
/>
It keeps popping up in my project searches ... This prevents that. Not
like we are planning on editing that file again.
Release Notes:
- N/A *or* Added/Fixed/Improved ...
In an attempt to figure out what's wrong with `point_to_buffer_offset`
for crash https://github.com/zed-industries/zed/issues/40453. We want to
know which branch among these two is the bad one.
Release Notes:
- N/A
Co-authored-by: Lukas Wirth <lukas@zed.dev>
We were spawning the process on the foreground thread before which can
block an arbitrary amount of time. Likewise we no longer block
deserialization on the terminal loading.
Release Notes:
- Improved startup time on systems with slow process spawning
capabilities
The `vim::visual::Vim.visual_block_motion` method was recently updated
(https://github.com/zed-industries/zed/pull/39355) in order to jump
between buffer rows instead of display rows. However, with this now
being the case, the `break` condition was never met when the motion was
horizontal rather than vertical and soft wrapped lines were used. As
such, this commit udpates the condition to ensure it's always reached,
preventing the hanging from happening.
Release Notes:
- Fixed hang in Vim's visual block motions when updating selections
---------
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
I noticed we had some typos that were getting through CI, but it looks
like the new version of `typos` catches them. So I updated it and fixed
them.
Release Notes:
- N/A
Adds a way to submit feedback about a zeta2 prediction from the
inspector. The telemetry event includes:
- project snapshot (git + unsaved buffer state)
- the full request and response
- user feedback kind and text
Release Notes:
- N/A
I did not bump it for Linux as some machines have smaller disks (~300GB
or so); with Mac, we have at least 1TB on all of our boxes
Release Notes:
- N/A
Following a conversation with the maintainer/owner of
kotlin-language-server, he recommended switching to the official
language server, which is better in many aspects and also more actively
maintained.
Release Notes:
- Made the official Kotlin Language Server the default language server
for Kotlin.
This fixes an issue where we would search for the hovered diff hunk
based on the mouse hit test computed during (or prior) editor paint
instead of the mouse hit test computed prior to the mouse event
invocation.
That in turn could lead to cases where moving the mouse from the editor
to the project panel and then clicking a file shortly after would expand
a diff hunk when actually nothing should happen in that case.
Release Notes:
- Fixed an issue where diff hunks would sometimes erroneously toggle
upon mouse clicks.
I maintain this repository that contains several developer tools like
- ghostty
- zig
- yazi
all of them are updated usually the same day as upstream.
Release Notes:
- N/A
Closes #ISSUE
it is was still in
[discussion](https://github.com/zed-industries/zed/discussions/37983)
Release Notes:
- Added: `--reuse` (`-r`) CLI flag to replace the workspace in an
existing window instead of opening a new one
This PR adds a new `--reuse` (`-r`) CLI flag that allows users to
replace the workspace in an existing Zed window instead of opening a new
one or adding files to the current workspace.
### What it does
The `--reuse` flag finds an available local workspace window and
replaces its workspace with the newly specified paths. This provides a
third workspace opening mode alongside the existing `--add` and `--new`
flags.
### Implementation Details
- **CLI Flag**: Added `--reuse` (`-r`) flag with proper mutual exclusion
with `--add` and `--new`
- **Window Replacement**: Uses the existing `replace_window` option in
`workspace::OpenOptions`
- **Window Selection**: Reuses the first available local workspace
window
- **Fallback Behavior**: When no existing windows are found, creates a
new window
- **Test Coverage**: Added comprehensive test for the reuse
functionality
### Behavior
- `zed -r file.txt` - Replaces the workspace in an available window with
`file.txt`
- If no windows are open, creates a new window (same as default
behavior)
- Mutually exclusive with `-a/--add` and `-n/--new` flags
- Works with multiple files and directories
### Files Changed
- `crates/cli/src/cli.rs` - Added `reuse` field to `CliRequest::Open`
- `crates/cli/src/main.rs` - Added CLI argument definition and parsing
- `crates/zed/src/zed/open_listener.rs` - Implemented reuse logic and
added tests
- `crates/zed/src/zed/windows_only_instance.rs` - Updated for Windows
compatibility
### Testing
- ✅ Unit tests pass
- ✅ Manual testing confirms expected behavior:
- Works when no windows are open
- Replaces workspace in existing window
- Maintains compatibility with existing `-a` and `-n` flags
- Proper help text display
## Manual testing
#### In this first video we do a couple of tests:
* **1**: What happens if we use the -r flag when there are no windows
open?
- works as expected. It opens the files in a new window.
* **2**: Does it work as expected if there is already a window open.
Does it overrides the workspace?
- yes it does. When opening a different file it overrides the current
window instead of creating a new one.
* **3**: Does the -n flag still works as expected?
- yes, it creates the project in a new window
* **4**: What about the -a flag?
- yes, on the last accessed page
* **5**: we do the replace command. It overrides the first opened
window, do we want this behavior?
- It is good enough that it overrides one of the opened windows with the
new project. It still makes the user automatically go to the window with
the specified files
* **6**: we use the -r command again replacing the workspace with a new
one.
- this indeed worked as expected
https://github.com/user-attachments/assets/f1cd7f4b-f4af-4da2-a755-c0be7ce96c0d
#### In here the we check how the --help flag now displays the new
command. (Description was later updated)
https://github.com/user-attachments/assets/a8a7a288-d926-431b-a9f9-a8c3d909a2ec
Closes#39901
I'm unsure as to which direction the team wants to go with this, but
this is the behavior of VSCode which is what this feature is based off
so i'm going with this.
Changes:
1. Introduced a new argument to the `new` method on the Pane called
`ignore_max_tabs` that forces the `max_tabs` to None if it's true.
2. Added a new test `test_bypass_max_tabs_limit`.
Release Notes:
- Fixed: `max_tabs` Setting affecting the terminal pane.
---------
Co-authored-by: Joseph T. Lyons <JosephTLyons@gmail.com>
This is needed for #38914 and seems generally useful to have for
contextual keybindings.
Release Notes:
- N/A
---------
Co-authored-by: David Kleingeld <davidsk@zed.dev>
Changes that I made:
- add "scrollbar.thumb.active_background" to all themes
- for dark themes: scrollbar.thumb.background is darker than hover (fg4
from palette for background and fg0 for hover)
- for light themes: scrollbar.thumb.background is lighter than hover
(fg4 for background and fg0 for hover like in dark theme case)
Those changes is consistent with VSCode gruvbox theme and other
applications.
For active_background I chose orange color, but we can use cyan color to
match vscode theme.
UPDATE: decided to use blue for active scrollbar as this color is used
as accent in other parts of gruvbox themes
Release Notes:
- Improved scrollbar colors for Gruvbox theme
---------
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
## 🎯 Description
Adds configurable window control buttons (minimize, maximize, close)
positioning for Linux, allowing users to choose between macOS-style
(left side) or Windows-style (right side) placement.
## ✨ Features
- New `title_bar.window_controls_position` setting with `"left"` and
`"right"` options
- Left positioning: macOS style (Close → Minimize → Maximize)
- Right positioning: Windows style (Minimize → Maximize → Close)
- Fixed transparent background issues for window controls
- Maintains consistent styling with Zed's theme
## 🔧 Technical Changes
### Settings System
- Added `WindowControlsPosition` enum in `settings_content.rs`
- Extended `TitleBarSettingsContent` with `window_controls_position`
field
- Updated `TitleBarSettings` to include the new configuration
### Title Bar Layout
- Modified `platform_title_bar.rs` to use setting for layout positioning
- Added conditional logic for `justify_start()` vs `justify_between()`
based on position
- Fixed transparent container background by adding `bg(titlebar_color)`
### Window Controls
- Updated `platform_linux.rs` to reorder buttons based on position
setting
- Changed button background from `ghost_element_background` to
`title_bar_background`
- Implemented proper button sequencing for both positions
## 🧪 How to Test
1. Add to your Zed settings:
```json
{
"title_bar": {
"window_controls_position": "left"
}
}
```
or
```json
{
"title_bar": {
"window_controls_position": "right"
}
}
```
2. Restart Zed
3. Verify buttons are positioned correctly
4. Check that background is not transparent
5. Test button functionality (minimize, maximize, close)
## �� Expected Behavior
- **Left position**: Buttons appear on the left side of the title bar in
Close → Minimize → Maximize order
- **Right position**: Buttons appear on the right side of the title bar
in Minimize → Maximize → Close order
- **Background**: Solid background matching Zed's theme (no
transparency)
## 🔍 Files Changed
- `crates/settings/src/settings_content.rs` - Added enum and setting
- `crates/title_bar/src/title_bar_settings.rs` - Updated settings struct
- `crates/title_bar/src/platform_title_bar.rs` - Modified layout logic
- `crates/title_bar/src/platforms/platform_linux.rs` - Updated button
ordering and styling
## 🎨 Design Rationale
This feature provides Linux users with the flexibility to choose their
preferred window control button layout, improving the user experience by
allowing them to match their desktop environment's conventions or
personal preferences.
## ✅ Checklist
- [x] Code compiles without errors
- [x] Settings are properly serialized/deserialized
- [x] Background transparency issues resolved
- [x] Button ordering works correctly for both positions
- [x] Layout adapts properly based on configuration
- [x] No breaking changes to existing functionality
## 🔗 Related
This addresses the need for customizable window control positioning on
Linux, providing consistency with user expectations from different
desktop environments.

Closes#40608
This fixes tabbing in both the settings ui nav bar and page content
going off screen instead of scrolling the focused element into a visible
view.
The bug occurred because `gpui::list` and `gpui::uniform_list` only
render visible elements, preventing non visible elements in a view from
having their focus handle added to the element tree. Thus making the tab
stop map skip over those elements because they weren't present.
The fix for this is scrolling to reveal non visible elements and then
focus the selected element on the next frame.
Release Notes:
- settings ui: Auto scroll to reveal items in navigation bar and window
when tabbing
---------
Co-authored-by: Ben Kunkle <ben@zed.dev>
A cherry-pick of
f5188d55fb
This fixes a hard-to-reproduce crash caused excerpts removal not
updating previous snapshot data after corresponding inlay data was
removed.
Same branch has a test:
8783a9eb4f
that does not fail on `main` due to different way inlays are queried, it
will be merged later.
Release Notes:
- N/A
Closes#5294
This PR adds a line ending indicator to the status bar, hidden by
default as discussed in
https://github.com/zed-industries/zed/issues/5294.
### Changes
- 8b063a22d8700bed9c93989b9e0f6a064b2e86cf add the indicator and
`status_bar.line_endings_button` setting.
- ~~9926237b709dd4e25ce58d558fd385d63b405f3b changes
`status_bar.line_endings_button` from a boolean to an enum:~~
<details> <summary> show details </summary>
- `always` Always show line endings indicator.
- `non_native` Indicate when line endings do not match the current
platform.
- `lf_only` Indicate when using unix-style (LF) line endings only.
- `crlf_only` Indicate when using windows-style (CRLF) line endings
only.
- `never` Do not show line endings indicator.
I know this many options might be overdoing it, but I was torn between
the pleasant default of `non_native` and the simplicity of `lf_only` /
`crlf_only`.
My thinking was if one is developing on a project which exclusively uses
one line-ending style or the other, it would be nice to be able to
configure no-indicator-in-the-happy-case behavior regardless of the
platform zed is running on. But I'm not really familiar with any
projects that use exclusively CRLF line endings in practice. Is this a
scenario worth supporting or just something I dreamed up?
</details>
- 01174191e4cf337069e7a31b0f0432ae94c52515 rename the action context for
`line ending: Toggle` -> `line ending selector: Toggle`.
When running the action in the command palette with the old name I felt
surprised to be greeted with an additional menu, with the new name it
feels more predictable (plus now it matches
`language_selector::Toggle`!)
### Future work
Hidden status bar items still get padding, creating inconsistent spacing
(and it kind of stands out where I placed the line-endings button):
<img alt="the gap after the indicator is larger than for other buttons"
src="https://github.com/user-attachments/assets/24a346d4-3ff6-4f7f-bd87-64d453c2441a"
/>
I started a new follow-up PR to address that:
https://github.com/zed-industries/zed/pull/39992
Release Notes:
- Added line ending indicator to the status bar (disabled by default;
enabled by setting `status_bar.line_endings_button` to `true`)
We very frequently move this in and out of the windows slot map on
`update_window_id` calls (and we call this a lot!). This alone showed up
as `memmove`s at roughly 1% perf in Instruments when scrolling a buffer
which makes sense, `Window` itself is 4kb in size. The fix is simple,
just box the `Window` instances, moving a pointer is cheap in
comparison.
Release Notes:
- N/A *or* Added/Fixed/Improved ...
I noticed that branch picker doesn't close until the checkout operation
is completed.
While normally it's not an issue, it becomes obvious if there are longer
running post checkout hooks. In that case selecting a branch makes it
feel like nothing has happened (there's a small indicator in the footer)
so it's possible to click it multiple times. Closing the modal before
the operation completes leads to the error modal saying `Failed to
change branch. entity released. Please try again.` even though the
checkout was successful.
The new behavior is to close the branch picker as soon as the branch is
selected. This also aligns with the existing behavior in `create_branch`
where `cx.emit(DismissEvent);` is called without waiting for
`repo.update`.
And as I mentioned before there an indicator in the footer saying `git
switch <branch_name>` with a spinner thingy.
I also added a check in the picker's `open` function where it first
checks if there's currently an active job and does not show the picker
in that case.
If this generally makes sense I can add the tests as well if needed.
P.S I checked how it works in VSCode and yes it also closes the branch
picker as soon as the branch is selected. The only difference is that
they show the loading indicator right next to the branch name (with a
new branch) but in our case the current branch and activity indicator
are located in different places.
<details><summary>Before</summary>
https://github.com/user-attachments/assets/adf08967-d908-45fa-b3f6-96f73d321262
</details>
<details><summary>After</summary>
https://github.com/user-attachments/assets/88c7ca41-7b39-42d6-a98b-3ad19da9317c
</details>
Release Notes:
- The branch picker now closes immediately after a branch is selected,
instead of waiting for the branch switch to complete.
Closes#39865
Release Notes:
- Fixed file finder display when searching for files in history if you
had several worktrees opened in a workspace. It now displays the
worktree root name to avoid confusion if you have several files with
same name in different worktrees.
---------
Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
Closes #ISSUE
Adds a `Maybe<T>` type to `settings_content`, that makes the distinction
between `null` and omitted settings values explicit. This unlocks a few
more settings in the settings UI
Release Notes:
- N/A *or* Added/Fixed/Improved ...
We were dropping the entities once we created the buffers, so the weak
entities could never be upgraded. This treats new locations we see the
same as we would for a read/write call and stores the entity so that we
can follow like we normally would.
Release Notes:
- acp: Fix following not working with certain tool calls.
I love keybindings.
I spend way to much time thinking about them.
I also REALLY like working in Zed.
so far, however, I have found the key context system in Zed to be less
flexible than in VSCode.
the HUGE context that is available in VSCode helps you create
keybindings for very specific targeted scenarios.
the tree like structure of the Zed key context means you loose some
information as focus moves throughout the application.
For example, it is not currently possible to create a keybinding in the
editor that will only work when one of the Docks is open, or if a
specific dock is open.
this would be useful in implementing solutions to ideas like #24222
we already have an action for moving focus to the dock, and we have an
action for opening/closing the dock, but to my knowledge (very limited
lol) we cannot determine if that dock *is open* unless we are focused on
it.
I think it is possible to create a more flexible key binding system by
adding more context information to the higher up context ancestors.
while:
```
Workspace right_dock=GitPanel
Dock
GitPanel
Editor
```
may seem redundant, it actually communicates fundamentally different
information than:
```
Workspace right_dock=GitPanel
Pane
Editor
```
the first says "the GitPanel is in the right hand dock AND IT IS
FOCUSED",
while the second means "Focus is on the Editor, and the GitPanel just
happens to be open in the right hand dock"
This change adds a new set of identifiers to the `Workspace` key_context
that will indicate which docks are open and what is the specific panel
that is currently visible in that dock.
examples:
- `left_dock=ProjectPanel`
- `bottom_dock=TerminalPanel`
- `right_dock=GitPanel`
in my testing the following types of keybindings seem to be supported
with this change:
```jsonc
// match for any value of the identifier
"context": "Workspace && bottom_dock"
"context": "Workspace && !bottom_dock"
// match only a specific value to an identifier
"context": "Workspace && bottom_dock=TerminalPanel"
// match only in a child context if the ancestor workspace has the correct identifier
"context": "Workspace && !bottom_dock=DebugPanel > Editor"
```
some screen shots of the context matching in different circumstances:
<img width="2032" height="1167" alt="Screenshot 2025-10-16 at 23 20 34"
src="https://github.com/user-attachments/assets/116d0575-a1ae-4577-95b9-8415cda57e52"
/>
<img width="2032" height="1167" alt="Screenshot 2025-10-16 at 23 20 57"
src="https://github.com/user-attachments/assets/000fdbb6-80bd-46e9-b668-f4b54ab708d2"
/>
<img width="2032" height="1167" alt="Screenshot 2025-10-16 at 23 21 37"
src="https://github.com/user-attachments/assets/7b1c82da-b82f-4e14-a97c-3cd0e71bbca0"
/>
<img width="2032" height="1167" alt="Screenshot 2025-10-16 at 23 21 52"
src="https://github.com/user-attachments/assets/1fd4b65a-09f7-47a9-a9b7-fdce4252aec3"
/>
<img width="2032" height="1167" alt="Screenshot 2025-10-16 at 23 22 38"
src="https://github.com/user-attachments/assets/f4c2ac5c-e6f9-4e0e-b683-522b237e3328"
/>
the persistent_name values for `ProjectPanel` and `OutlinePanel` needed
to be updated to not have a space in them in order to pass the
`Identifier` check. all the other Panels already had names that did not
include spaces, so it just makes these conform with the other ones.
I think this is a great place to start with adding more context
identifiers and i think this type of additional information will make it
possible to create really dynamic keybindings!
Release Notes:
- Workspace key context now includes the state of the 3 docks
Reduces peak stack usage in these functions and should generally be a
bit performant.
Display map benchmark results
```
To tab point/to_tab_point/1024
time: [531.40 ns 532.10 ns 532.97 ns]
change: [-2.1824% -2.0054% -1.8125%] (p = 0.00 < 0.05)
Performance has improved.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high severe
To fold point/to_fold_point/1024
time: [530.81 ns 531.30 ns 531.80 ns]
change: [-2.0295% -1.9054% -1.7716%] (p = 0.00 < 0.05)
Performance has improved.
Found 3 outliers among 100 measurements (3.00%)
2 (2.00%) high mild
1 (1.00%) high severe
```
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Continues the work from #35927 to add a git diff view for stash entries.
[Screencast From 2025-09-17
19-46-01.webm](https://github.com/user-attachments/assets/ded33782-adef-4696-8e34-3665911c09c7)
Stash entries are [represented as
commits](https://git-scm.com/docs/git-stash#_discussion) except they
have up to 3 parents:
```
.----W (this is the stash entry)
/ /|
-----H----I |
\|
U
```
Where `H` is the `HEAD` commit, `I` is a commit that records the state
of the index, and `U` is another commit that records untracked files
(when using `git stash -u`).
Given this, I modified the existing commit view struct to allow loading
stash and commits entries with git sha identifier so that we can get a
similar git diff view for both of them.
The stash diff is generated by comparing the stash commit with its
parent (`<commit>^` or `H` in the diagram) which generates the same diff
as doing `git stash show -p <stash entry>`. This *can* be
counter-intuitive since a user may expect the comparison to be made
between the stash commit and the current commit (`HEAD`), but given that
the default behavior in git cli is to compare with the stash parent, I
went for that approach.
Hoping to get some feedback from a Zed team member to see if they agree
with this approach.
Release Notes:
- Add git diff view for stash entries
- Add toolbar on git diff view for stash entries
- Prompt before executing a destructive stash action on diff view
- Fix commit view for merge commits (see #38289)
Add new `workspace::NewFileSplit` action which expects a
`SplitDirection` argument, allowing users to programmatically control
the direction of the split in keymaps, for example:
```json
{
"context": "Editor",
"bindings": {
"ctrl-s ctrl-h": ["workspace::NewFileSplit", "left"],
"ctrl-s ctrl-j": ["workspace::NewFileSplit", "down"],
"ctrl-s ctrl-k": ["workspace::NewFileSplit", "up"],
"ctrl-s ctrl-l": ["workspace::NewFileSplit", "right"]
}
}
```
Release Notes:
- Added `workspace::NewFileSplit` action, which can be used to
programmatically split the editor in the provided direction.
Co-authored-by: Rian Drake <rian.drake@rocketwerkz.com>
Co-authored-by: dino <dinojoaocosta@gmail.com>
This is an in-progress work on changing how task scheduler affects
performance of project search. Instead of relying on tasks being
executed at a discretion of the task scheduler, we want to experiment
with having a set of "agents" that prioritize driving in-progress
project search matches to completion over pushing the whole thing to
completion. This should hopefully significantly improve throughput &
latency of project search.
Release Notes:
- Improved project search performance
---------
Co-authored-by: Smit Barmase <smit@zed.dev>
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Release Notes:
- Added comment language injections for builtin languages. This enables
highlighting of `TODO`s and similar notes with the comment extension
installed.
Signed-off-by: Donnie Adams <donnie@thedadams.com>
Related to #9461, inspired by #39683
`await` and `yield` both seem somewhat debatable on whether they should
be considered the be control flow keywords.
For now I went with:
- `await`: no – The control flow effect of `await` is at a level does
not seem relevant for syntax highlighting.
- `yield`: yes – `yield` directly affects the output of a generator, and
is also included for consistency with Rust (#39683).
Happy to change these either direction.
<img width="1151" height="730" alt="SCR-20251008-izus"
src="https://github.com/user-attachments/assets/533ea670-863a-4c5c-aaa5-4a9bfa0bf0dd"
/>
---
Release Notes:
- Improved granularity of keyword highlighting for JS/TS/TSX: Themes can
now specify `keyword.control` for control flow keywords like `if`,
`else`, `return`, etc.
Adding this content after seeing people ask about how to make MCP
servers installed from Zed be picked up by external agents. At the
moment, this varies depending on the agent, and felt relevant to be
documented.
Release Notes:
- N/A
- Notable change is the use of a newtype for `ReplicaId`
- Fixes `WorktreeStore::create_remote_worktree` creating a remote
worktree with the local replica id, though this is not currently used
- Fixes observing the `Agent` (that is following the agent) causing
global clocks to allocate 65535 elements
- Shrinks the size of `Global` a bit. In a local or non-collab remote
session it won't ever allocate still.
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Let's say you run this:
```
cd ~/proj-a
zed ~/proj-b
```
The `zed` process will execute with `current_dir() = ~/proj-a`, but a
`worktree_root_path() = ~/proj-b`. The old detection was then checking
if the Yarn SDK was installed in `proj-a` to decide whether to set the
tsdk value or not. This was incorrect, as we should instead check for
the SDK presence inside `proj-b`.
Release Notes:
- Fixed the Yarn SDK detection when the Zed pwd is different from the
opened folder.
The page about PHP in the docs doesn’t explain how to use Xdebug. I had
a lof of trouble setting it up the first time, then recently had another
headache trying to get it to work again, because the value for `adapter`
had changed from `PHP` to `Xdebug`.
It’s likely that my example config isn’t perfect or has redundant stuff
or whatever, feel free to amend it.
I also took the liberty to set the Phpactor and Intelephense headings to
level 3 because I felt like they were part of "Choosing a language
server."
Release Notes:
- N/A
# Why
While working on recent PR I have spotted that "Stage" and "Unstage"
buttons in "Uncommited Changes" toolbar are always active, even when
there is no changes made locally.
<img width="1628" height="656" alt="Screenshot 2025-10-10 at 00 49 06"
src="https://github.com/user-attachments/assets/6bdb9ded-17c8-4f84-8649-b297162c1992"
/>
# How
Re-use already existing button states for managing the disabled state of
"Uncommited Changes" toolbar buttons when changeset is empty.
Release Notes:
- Added disabled state for "Uncommited Changes" toolbar buttons when
there are no changes present
# Preview
<img width="1728" height="772" alt="Screenshot 2025-10-10 at 08 40 14"
src="https://github.com/user-attachments/assets/ff41d852-974e-4ce1-9163-ecd30e17d5d8"
/>
Closes#37322
Uses SFTP if available, otherwise falls back to SCP for uploading files
and directories to remote. This fixes an issue on older macOS versions
where outdated SCP can throw an ambiguous target error.
Release Notes:
- Fixed an issue where extensions wouldn’t work when SSHing into a
remote from older macOS versions.
Though we ship with `basedpyright`, `ruff` and a few other laps for
python, we run them all at once.
Release Notes:
- Only enable `basedpyright` and `ruff` by default when opening Python
files. If you prefer one of the other.
Refactor the find_tab_group method to use the question mark operator for
cleaner error handling, replacing the explicit if-else pattern with a
more concise chained approach.
Release Notes:
- N/A
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
### Problem
On Windows, the right Alt key was not working in keybindings (e.g.,
`Ctrl+Right Alt+B`), while the left Alt key worked correctly. This was
due to overly aggressive AltGr detection that treated any `right Alt +
left Ctrl` combination as AltGr, even on US keyboards where AltGr
doesn't exist.
### Root Cause
Windows internally represents AltGr (Alt Graph) as `right Alt + left
Ctrl` pressed simultaneously. The previous implementation always
excluded this combination from being treated as regular modifier keys to
support international keyboards. However, this broke keybindings using
right Alt on US/UK keyboards where users expect right Alt to behave
identically to left Alt.
### Solution
Implemented keyboard layout-aware AltGr detection:
1. Added `uses_altgr()` method to `WindowsKeyboardLayout` that checks if
the current keyboard layout is known to use AltGr (German, French,
Spanish, Polish, etc.)
2. Modified `current_modifiers()` to only apply AltGr special handling
when the keyboard layout actually uses it
3. Added explicit checking for both `VK_LMENU` and `VK_RMENU` instead of
relying solely on the generic `VK_MENU`
### Behavior
- **US/UK keyboards**: Right Alt now works identically to left Alt in
keybindings. `Ctrl+Right Alt+B` triggers the same action as `Ctrl+Left
Alt+B`
- **International keyboards** (German, French, Spanish, etc.): AltGr
continues to work correctly for typing special characters and doesn't
trigger keybindings
- **All keyboards**: Both Alt keys are detected symmetrically, matching
the behavior of left/right Windows keys
### Testing
Manually tested on Windows with US keyboard layout:
- `Ctrl+Left Alt+B` triggers keybinding
- `Ctrl+Right Alt+B` triggers keybinding
- Both Alt keys work independently in keybindings
Release Notes:
- Fixed Right Alt key not working in keybindings on Windows
Release Notes:
- Fixed misplaced comma in the autoclose description from:
"when you type (, Zed will ...)"
to
"when you type, (Zed will ...)"
---------
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
`env_logger` defaults to only showing error-level logs, but we show
info-level logs and above for the main Zed process, so I think it makes
sense for the remote server to behave the same way.
Release Notes:
- N/A
Re-applies https://github.com/zed-industries/zed/pull/30840
This PR re-applies the initial
[PR](https://github.com/zed-industries/zed/pull/30840). As it was closed
because it was hard to land, because of the many conflicts. This PR
re-applies the changes for it.
In several cases we were creating multiple display_map
snapshots within the same root-level function call.
Creating a display_map snapshot is quite slow, and in some
cases we were creating the snapshot multiple times.
Release Notes:
- N/A
We've been considering removing workspace-hack for a couple reasons:
- Lukas ran into a situation where its build script seemed to be causing
spurious rebuilds. This seems more likely to be a cargo bug than an
issue with workspace-hack itself (given that it has an empty build
script), but we don't necessarily want to take the time to hunt that
down right now.
- Marshall mentioned hakari interacts poorly with automated crate
updates (in our case provided by rennovate) because you'd need to have
`cargo hakari generate && cargo hakari manage-deps` after their changes
and we prefer to not have actions that make commits.
Currently removing workspace-hack causes our workspace to grow from
~1700 to ~2000 crates being built (depending on platform), which is
mainly a problem when you're building the whole workspace or running
tests across the the normal and remote binaries (which is where
feature-unification nets us the most sharing). It doesn't impact
incremental times noticeably when you're just iterating on `-p zed`, and
we'll hopefully get these savings back in the future when
rust-lang/cargo#14774 (which re-implements the functionality of hakari)
is finished.
Release Notes:
- N/A
A small follow-up to the settings refactor of a few weeks ago to move
all the VSCode settings imports
to one place.
This should make it easier to spot missing imports, and easier to test
the importer.
Release Notes:
- N/A
It is now possible to configure logging level of CodeLLDB adapter via
envs specified in project settings like so:
```
{
"dap": {
"CodeLLDB": {
"envs": {
"RUST_LOG": "debug"
}
}
}
}
```
Release Notes:
- N/A
`MultiBuffer::anchor_in_excerpt` currently just wraps the given text
anchor in a multibuffer anchor. This allows one to get a multibuffer
anchor that points outside its excerpt which is basically never what one
wants. This PR now does a bounds check and returns `None` if the given
text anchor is not within the bounds of the excerpt.
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Closes #ISSUE
Includes the start of how we can get rid of most of the `.unimplemented`
"Edit in JSON" buttons in the settings UI. For now only Theme selection
is implemented, follow ups will add more settings
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Fixes#40034
Release Notes:
- `ctrl-c` (when you have a selection) and `ctrl-v` are now bound to
copy and paste by default in the windows terminal.
Co-authored-by: John Tur <john-tur@outlook.com>
Close#35715
Release Notes:
- Fixed to wrap long URLs in editor.
<img width="836" height="740" alt="image"
src="https://github.com/user-attachments/assets/635ce792-5f19-4c76-b131-0d270d09b103"
/>
I remember when I was working on CJK line wrapping support in the early
days, I considered making `\` a line wrapping character, but for some
reason it was on the list of characters that were not allowed to wrap.
In reference to VS Code, it looks like `&`, `/`, `?` should wrap, so I
removed all of them.
---------
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
This is a follow-up PR to
https://github.com/zed-industries/zed/pull/39609, and attempts to
address hidden status bar items still contributing to the layout and
creating extra spacing.

- 203cbd634bfb1489b8afa4952d9594615a956b77 Adds a `.none()` method to
the `gpui::Styled` helper trait, so that status items can set their
display type to none inside their `render` method.
- 249f06e3de63b0ab32814f20e7105d8e2b642f02 Applies `.none()` to all the
status items.
- ~~499f564906c88336608c81615b11ebc9ab43d832~~ At first I was adding an
`is_visible` method to the `StatusBarView` trait, which would be used to
skip status bar items which would just render an empty div anyway, but I
felt duplicating the conditions for hiding the buttons between the
status items `is_visible` and `render` methods could be an attraction
for bugs, so I tried to find another approach. This commit contains
those changes, reverted immediately (if the `is_visible` approach is
preferred I can bring it back!)
- f37cb75f0519ceea1f3e1cc4f97087a5cb34b0fd (bonus!) Adds a condition to
the vim mode indicator to avoid a leading space when there are no
pending keys.
Release Notes:
- N/A
Hello,
Thanks for the great work.
I am adding some more bindings for the emacs keymap:
- `command_palette::Toggle` as replacement for the emacs command
dispatcher
- other default aliases for existing move / delete commands
- e.g. `alt-left` to move to previous word and `alt-del` to delete it
- some missing `SelectTo` equivalents for move commands on selection
mode
Release Notes:
- Added bindings for the Emacs keymap
The built-in Tailwind language already maps `HTML+ERB` to `erb`, and it
seems that `Ruby` files work as well just from enabling the language
server, so we can remove the unnecessary mapping.
Release Notes:
- N/A
Follow-up after #40417, which should've fixed hangs.
smol::fs uses a separate threadpool, which is a bit yuck.
This PR also added a benchmark you can use to run a full worktree scan
(initial one, that is) for arbitrary worktree.. and refactored worktree
scanner to use async locks, as otherwise tests were deadlocking. :)
I've benchmarked it against Zed, Linux and Chromium and saw a ~60% drop
in initial worktree scan times across the board.
Release Notes:
- Significantly (3.3x speedup over the old implementation) improved
speed of Zed's worktree scanner, that's responsible for synchronizing
the state of your project with the state of files on hard drive.
---------
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Using a seeded PRNG to produce consistent test data and reduce
variability makes sense.
However, the way it was used previously, by always cloning the RNG,
means that every generated string is the same, and every offset is the
same. After this change, the tested value stream should still be the same on
each run of the benchmark, but the values within each run will vary.
The `generate_random_text` measured in chars also seems possibly
inconsistent with later comments about it being a number of bytes.
Release Notes:
- N/A
This caused issues with #40172, as it made Zed execute and block on tad
few more background tasks. Parker is ~cheap to create, hence we should
be ok to just create it at the time it is needed.
Release Notes:
- N/A
---------
Co-authored-by: Cole Miller <cole@zed.dev>
Closes#40359
We were segfaulting when opening a UTF-8 file starting with a byte order
mark due to a mismatch in our UTF-16 indexing calculations caused by
Core Foundations `replace_str` stripping the BOM internally. This PR
fixes the crash by replacing one of our manual calculations by calling
the Core Foundations API to get the length of a string.
Release Notes:
- Fixed a crash on macOS when opening a file that starts with a UTF-8
byte order mark (BOM).
Co-authored-by: HactarCE <6060305+HactarCE@users.noreply.github.com>
# Why
While playing with new Settings UI I have spotted that changing font
weight requires a lot of clicks. This is also a bit more annoying due to
lack of ability to enter the desired value by hand.
# How
Adjust step values for Font Weight stepper, the default increment has
been changed from 10 to 50, to cover (defined in spec `950` weight)
which some fonts might use, small step has been changed from 5 to 10,
and large step from 50 to 100.
Release Notes:
- Adjusted default step values for number input UI element used for
changing Font Weight in Settings UI.
Closes#40334
This reverts the change made in #39983, and includes a replacement
migration that will transform formatter settings values consisting of
only `code_action` format steps into the previously deprecated
`code_actions_on_format` in an attempt to restore the behavior to what
it was before the migration that deprecated `code_actions_on_format`.
This PR will result in a modified order in the `code_actions_on_format`
setting if it existed, however the decision was made to explicitly
ignore this for now, as this PR is primarily targeting users who have
already had the deprecation migration run, and no longer have the
`code_actions_on_format` key
Release Notes:
- Fixed an issue with a settings migration that deprecated the
`code_actions_on_format` setting. The `code_actions_on_format` setting
has been un-deprecated, and affected users will have the bad migration
rolled back with an updated migration
---------
Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Co-authored-by: HactarCE <6060305+HactarCE@users.noreply.github.com>
`vim::Substitute` is a little different from the helix behavior, so this
PR adds helix versions. The most important difference (for my usage, at
least) is that if you're selecting whole lines then helix drops the `\n`
from the selection (much like vim's lines mode, except that helix bases
this behavior on the selection instead of having a different mode).
Release Notes:
- N/A
Closes#33637Closes#37332
and solves part of
https://github.com/zed-industries/zed/discussions/33580#discussioncomment-14195506
This improves the "C" and "alt-C" actions to work like helix.
It also adds "," which removes all but the newest cursors. In helix the
one that's left would be the primary selection, but I don't think that
has an equivalent yet, so this simulates what would be the primary
selection if it was never cycled with "(" ")".
Release Notes:
- Improved multicursor creation and deletion in helix mode
---------
Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
Instead of producing multiple code blocks for each edit history event,
we now produce a continuous unified diff.
Release Notes:
- N/A
---------
Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
Update the keybindings used in the default keymaps to better align with
VSCode's defaults, with the following changes:
* Windows & Linux
* `ctrl-enter` has been replaced by `ctrl-i` for
`assistant::InlineAssist`
* `ctrl-shift-space` maps to `editor::ShowSignatureHelp` instead of
`editor::ShowWordCompletions`
* MacOS
* `ctrl-enter` has been replaced by `cmd-i` for
`assistant::InlineAssist`
* `cmd-i` has been replaced by `cmd-shift-space` for
`editor::ShowSignatureHelp`
Closes#39278
Release Notes:
- Changed the keybinding for `assistant: inline assist` from
`ctrl-enter` to `ctrl-i` for both Linux and Windows, and `cmd-i` for
MacOS. If you'd like to restore the old behavior, update your keymap
file with:
```
{
"context": "!ContextEditor > Editor && mode == full",
"bindings": {
"ctrl-enter": "assistant::InlineAssist"
}
}
```
- Changed the action dispatched by `ctrl-shift-space` from
`editor::ShowWordCompletions` to `editor::ShowSignatureHelp` on both
Linux and Windows. If you'd like to restore the old behavior, update
your keymap file with:
``` {
"context": "Editor",
"bindings": {
"ctrl-shift-space": "editor::ShowWordCompletions"
}
}
```
- Changed the keybinding for `editor: show signature help` on MacOS from
`cmd-i` to `cmd-shift-space`. If you'd like to restore the old behavior,
update your keymap file with:
``` {
"context": "Editor",
"bindings": {
"cmd-i": "editor::ShowSignatureHelp"
}
}
```
---------
Co-authored-by: Agus Zubiaga <agus@zed.dev>
Closes#39786
Release Notes:
- Fixed: Settings popup no longer keeps the process alive when closing
Zed on Windows
---------
Co-authored-by: Anthony <anthony@zed.dev>
Co-authored-by: Joseph T. Lyons <JosephTLyons@gmail.com>
Closes#40270
Release Notes:
- Fixed an issue with the settings migration to flatten `code_actions`
format steps where comments would cause enabled code actions to be
omitted from the migrated settings. If you were effected, restoring the
settings file backup and allowing the migration to re-run will result in
a valid settings file
- Fixed an issue where automated settings and keymap file updates would
occasionally assume 4-space indentation
smol::fs uses a separate threadpool, which is a bit yuck.
This PR also added a benchmark you can use to run a full worktree scan
(initial one, that is) for arbitrary worktree.. and refactored worktree
scanner to use async locks, as otherwise tests were deadlocking. :)
I've benchmarked it against Zed, Linux and Chromium and saw a ~60% drop
in initial worktree scan times across the board.
Release Notes:
- Significantly (3.3x speedup over the old implementation) improved
speed of Zed's worktree scanner, that's responsible for synchronizing
the state of your project with the state of files on hard drive.
---------
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
- Add `skip_soft_wrap` field to both `AddSelectionAbove` and
`AddSelectionBelow` actions. When set to `true`, which is now
the default this will skip soft wrapped lines when extending the
selections.
- Move the `start_of_relative_buffer_row` function from the
`vim::motion` module to the `editor::display_map::DisplaySnapshot`
implementation as a method.
- Update the default behavior for both `editor: add selection above` and
`editor: add selection below` commands in order to skip over soft
wrapped lines by default, mirroring VS Code's default behavior.
- Update existing keymaps to specify this `skip_soft_wrap` value for
both `AddSelectionAbove` and `AddSelectionBelow` actions.
Closes#16979
Release Notes:
- Updated both the `editor: add selection above` and `editor: add
selection below` commands to ignore soft wrapped lines. If you wish to
restore the old behavior, add the following to your keymap file:
```
{
"context": "Editor",
"bindings": {
"cmd-alt-up": ["editor::AddSelectionAbove", { "skip_soft_wrap": false
}],
"cmd-alt-down": ["editor::AddSelectionBelow", { "skip_soft_wrap": false
}]
}
}
```
---------
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Moves the Codex warning into the thread so that we can render it nicer,
as well as provide an option to open the folder in WSL.
Release Notes:
- N/A
---------
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
`TaskDialogIndirect` may return `IDCANCEL` when the user quits the
dialog via escape or alt+f4, so we need to account for that.
Fixes ZED-25H
Release Notes:
- Fixed panic when hitting escape in dialogs on windows
Closes#40234
Release Notes:
- Added `open_file_on_paste` setting to configure auto opening of file
on paste in the project panel.
---------
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
### What does this PR do?
- Adds default keybindings `gt` for navigating to the next tab and `gT`
for navigating to the previous tab in markdown viewer mode
### Why do we need this change?
- While previewing markdown files, the default vim bindings (`gt` and
`gT`) do not work for navigating between tabs. These bindings work
everywhere else, which provides a non-consistent experience for the
user.
### How do we do this change?
- Update the vim mode bindings to explicitly add handling for this mode
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Release Notes:
- N/A
---
- Set `.SystemUIFont` as the GPUI default font.
- Add `Arial` to font fallback list.
- Add `Adwaita Sans` to default fallback list for Gnome.
- Move `Ubuntu` font to front of Gnome to make sure Ubuntu System takes
priority over `Ubuntu` font.
Our application get some crash report:
```
panicked at /Users/admin/.cargo/git/checkouts/zed-a70e2ad075855582/f1db3b4/crates/gpui/src/text_system.rs:150:9:
failed to resolve font 'Helvetica' or any of the fallbacks: Zed Plex Mono, Helvetica, Segoe UI, Cantarell, Ubuntu, Noto Sans, DejaVu Sans
```
This change to add `Arial` to fallback list, this font was included in
macOS and Windows.
Ref link (search "Arial"):
> Mac OS X (now known as [macOS](https://en.wikipedia.org/wiki/MacOS))
was the first Mac OS version to include Arial;
> https://en.wikipedia.org/wiki/Arial
- macOS Sequoia: https://support.apple.com/en-us/120414
- Windows 10:
https://learn.microsoft.com/en-us/typography/fonts/windows_10_font_list
- Gnome: https://developer.gnome.org/hig/guidelines/typography.html
Having the chevron to the side of the avatar is arguably unnecessary at
this point; most apps out there (Reddit, YouTube, etc.), including here
on GitHub, have the avatar without any icon, pointing to how there
doesn't seem to be a problem with knowing that there's a menu behind it.
Therefore, figured we could simplify the UI a bit more here.
This also looks better on platforms where the window controls are on the
right (Linux/Windows).
Release Notes:
- N/A
Making all triggers have the same style when the picker is open
(including changing the icon when the picker opens on top of the
trigger). Also removed the footer from the ACP model selector given
there's nothing to consider when that's the case; users can only
configure LLM providers when using Zed's built-in agent.
Release Notes:
- N/A
Updates #40212
v0.9.0 is now stable and contains the fix for the line endings bug, so
we can return to installing from the stable channel as usual. This also
bumps the minimum version on Windows to v0.9.0 so that anyone on v0.8.x
or v0.9.0-preview.4 will be upgraded automatically.
Release Notes:
- N/A
This PR improves the rendering performance of the Settings UI window by
using `gpui::list` to render only the visible contents of a settings
page, instead of rendering the full content of a page. This fixes a lag
that the editor page has in debug builds.
I also added a new field `measuring_behavior` to `ListState` that has
`Visible` and `Measured` variances. `Visible` only measures and caches
the bounds of visible items plus the overdraw pixel offset. `Measure`
will cache all items’ bounds on the first layout phase, which fixes
problems with the scrollbar size/position being miscalculated.
Release Notes:
- N/A
---------
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
Co-authored-by: Ben Kunkle <ben@zed.dev>
This is the first towards better logs for adapter binaries. Next up I
intend to somehow allow `codelldb` adapter in Zed to permit simple log
level so that we can pass `RUST_LOG=level` when spawning the child
process.
Release Notes:
- N/A
Makes the dropdown trigger button styling consistent with the other
buttons and allows to add a tooltip in the trigger through the popover's
`trigger_with_tooltip` method.
Release Notes:
- N/A
Currently, using cmd-f or cmd-shift-f to search while a modal is active
(e.g. after cmd-t or cmd-p) doesn't do anything — you need to first
close the modal manually before initiating a search. This PR allows
these actions to run regardless of whether a modal is active.
Some context: VSCode lets you do this too, and for me it's quite common
to do a symbol search with cmd-t immediately followed by a regular
search with cmd-shift-f if I don't find what I'm looking for, so having
to close the modal first is slightly disruptive. cmd-t followed by cmd-p
does dismiss the project symbols modal in order to display the file
search modal, so it makes sense to me to also allow search actions to
dismiss an active modal.
Maybe this blunt fix has unintended consequences? If some types of
modals shouldn't be dismissed when running cmd-f, or some actions
shouldn't dismiss a currently active modal, then we'll have to go about
it differently.
Release Notes:
- Added the ability to run search actions when a modal is currently
active
We've been seeing the occasional `cannot seek backwards` panic within
`SelectionsCollection` without means to reproduce.
I believe the cause is one of the callers of
`MutableSelectionsCollection::select` not passing a well formed
`Selection` where `start > end`, so this PR enforces the invariant in
`select` by swapping the fields and setting `reversed` as required as
the other mutator functions already do that as well.
We could also just assert this instead, but it callers usually won't
care about this so its the less user facing annoyance to just fix this
invariant up internally.
Fixes ZED-253
Fixes ZED-ZJ
Fixes ZED-23S
Fixes ZED-222
Fixes ZED-1ZV
Fixes ZED-1SN
Fixes ZED-1Z0
Fixes ZED-10E
Fixes ZED-1X0
Fixes ZED-12M
Fixes ZED-1GR
Fixes ZED-1VE
Fixes ZED-13X
Fixes ZED-1G4
Release Notes:
- Fixed occasional panics when querying selections
Adds a new `NumberedLines` format which is similar to `MarkedExcerpt`
but each line is prefixed with its line number.
Also fixes a bug where contagious snippets wouldn't get merged.
Release Notes:
- N/A
---------
Co-authored-by: Michael Sloan <mgsloan@gmail.com>
Co-authored-by: Michael <michael@zed.dev>
We were clearing the message editor too early. We only want to clear the
message editor if we are going to short circuit and return early before
submitting.
Otherwise, the agents that can handle this themselves won't have the
ability to do so.
Release Notes:
- acp: Fix /logout not working for some agents
Windows not having a default shell does not matter here, we might still
have an environment from other means (by being spawned from the cli for
example).
Release Notes:
- N/A *or* Added/Fixed/Improved ...
No need to clutter the `--help` docs with default directories for
platforms other than the current one.
Release Notes:
- N/A
Co-authored-by: David Kleingeld <davidsk@zed.dev>
Follow-up to #39248
- Correctly forward ports over SSH, including the port from the debug
scenario's `url`
- Give the companion time to start up, instead of bailing if the first
connection attempt fails
Release Notes:
- Fixed not being able to launch a browser debugging session in an SSH
project.
We automatically delete a local workspace if the folders comprising it
no longer exist.
If a local workspace points to folders in the WSL filesystem, checking
whether those folders exist will make us wait for the WSL VM and file
server to boot up. This can block Zed startup for many seconds.
Supported scenarios use remote workspaces, so delete these local
workspaces to ensure that we don't try to access their folders on the
startup path.
Release Notes:
- N/A
Retrieval stats will now use polars to build a big data frame for
references with the cartesian product of LSP declarations and retrieved
declaration candidates (with all their score components) and rebuilds
the stats summary on top of it.
This data frame is written to a `.parquet` file, which we can load into
advanced analytics tools (such as Metabase), so we can explore our
scoring distributions and find ways to improve retrieval, and then train
the decision tree.
Release Notes:
- N/A
Fix issue where Zed would unconditionally override user's custom shell
with system default from passwd entry.
Closes https://github.com/zed-industries/zed/issues/40171
Release Notes:
- Fix issue where Zed would unconditionally override user's custom shell
with system default from passwd entry.
---------
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Added a "Copy All Messages" button to the ACP logs toolbar that copies
all messages in the watched stream to the clipboard as structured JSON.
## Motivation
When troubleshooting ACP protocol implementations, it's helpful to
provide the entire message thread to an LLM for analysis. Previously, I
had to copy individual messages one at a time, which was tedious and
time-consuming. This feature allows copying the entire conversation
history in a single click.
Release Notes:
- Added: Copy All Messages button to ACP logs view
---------
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Co-authored-by: Agus Zubiaga <agus@zed.dev>
This reverts commit f1db1f3a3c.
This seems to have affected the vertical positioning of text that
doesn't contain emojis in a way that was unintended.
Release Notes:
- N/A
Previously, if a tool call's output was just text, it would be collapsed
with no way to open it.
Now we track the collapsed cards instead of the expanded ones to allow
all tool calls to be expanded by default, and only collapse the ones
required by settings changes
Release Notes:
- acp: Fix tool call markdown output unintentionally being collapsed by
default
This moves some of the changes made in
https://github.com/zed-industries/zed/pull/39543 to the `publish_gpui`
script.
This PR also updates that script to use `gpui_` instead of `zed-` (where
possible)
Release Notes:
- N/A
This applies the same change as #39466 to the terminal codepath for
external agents.
Release Notes:
- N/A
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Fixes a bug mentioned in
https://github.com/zed-industries/zed/issues/38891
Release Notes:
- Fixed a bug where environment variables like `NODE_EXTRA_CA_CERTS`
were not loaded from the user's shell initialization scripts in WSL or
SSH remote projects.
Co-authored-by: Cole Miller <cole@zed.dev>
This PR fixes a bug where the review icon button wouldn't properly open
the review tab if you weren't focused in the agent panel's message
editor. The solution was to register the action also at the workspace
level.
Release Notes:
- agent: Fixed a bug where the review icon button wouldn't work to open
the review tab if focus weren't in the panel's message editor.
Fixes#39998
Debugpy and pylsp are installed in a Zed-global venv with pip. We need a
Python interpreter to create this venv when it doesn't exist and one of
these tools needs to be installed, and sometimes we attempt to use
`python3` from `$PATH`. This can cause issues on Windows, where out of
the box `python3` is a sort of shim that opens the Microsoft Store app.
This PR changes the debugpy installation path to create the Zed-global
venv using the Python interpreter from a venv in the project, and only
use python3 from `$PATH` if that fails. That matches how pylsp
installation already works. It also tightens up how we search for a
global Python installation by doing a basic sanity check (`python3 -c
'print(1 + 2)`) before accepting it, which should catch the Windows
shim.
Release Notes:
- windows: improved the behavior of Zed in situations where no global
Python installation exists.
Follow up for: #39983 and
https://github.com/zed-industries/zed/pull/40040#issuecomment-3393902691
Previously it was possible to have formatting done using prettier or
language server using `"formatter": "auto"` and specify code actions to
apply on format using the `"code_actions_on_format"` setting. However,
post #39983 this is no longer possible due to the removal of the
`"code_actions_on_format"` setting. To rectify this regression, this PR
makes it so that the `"auto"` and `"language_server"` strings that were
previously only allowed as top level values on the `"formatter"` key,
are now allowed as format steps like so:
```json
{
"formatter": ["auto", "language_server"]
}
```
Therefore to replicate the previous behavior using `"auto"` and
`"code_actions_on_format"` you can use the following configuration:
```json
{
"formatter": [{"code_action": ...}, "auto"]
}
```
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Closes#36934
I'm still experiencing bugs with the
`DCompositionWaitForCompositorClock` API. Let's back out the support for
now until the fixes are identified and widely available.
`DwmFlush` does various things that aren't just waiting for VSync, so
it's not ideal, but it's not bad enough that it's worth a bigger
refactor right now.
Release Notes:
- N/A
There's a lot of AI settings that will require custom UI for them to be
part of the settings window, but many don't (simple booleans and
dropdown) and can be moved right away. In consequence, the whole
"General Settings" section in the agent panel's settings view can be
removed given all of those items are now part of the settings window.
Release Notes:
- N/A
Release Notes:
- settings ui: Navigating the settings navbar with arrow keys up and
down now also activates the page, allowing users to more quickly see the
content for a given page before moving focus to the page itself.
This applies the same fix as #39886 for Windows.
Previously we were using `GetLineMetrics` to determine the ascent and
descent values for each line. It seems like this has the same behavior
as `GetTypographicBounds` on macOS, which is to return the minimum
ascent and descent for the current state of the `TextLayout` object.
This causes the ascent/descent to be unstable when adding or removing an
emoji because a font fallback is triggered when an emoji is present on
the line.
The issue is fixed by switching to `font.GetMetrics` to get the ascent
and descent, which should always return stable values for the main font,
instead of changing when there's a fallback. This also should support
situations where we have multiple explicit fonts on the same line,
although that probably can't be triggered in Zed right now.
Release Notes:
- windows: Fixed a vertical shift in text layout when inserting or
removing an emoji.
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Closes#39614
The `ShellKind` struct is built on Windows' side, meaning that when
connecting to remotes, we fall back to PowerShell construction, even if
the shell program we are spawning is a unix program.
This broke tasks creation since we are using the shell kind to construct
args:
d04ac864b8/crates/project/src/terminals.rs (L149)
In normal terminals this only affected activation scripts (only place
where shell kind is used)
I don't have a Windows machine to test it, so I would appreciate any
help with testing!
Release Notes:
- Fixed an issue where tasks could not be executed in Windows WSL
---------
Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>
This relands https://github.com/zed-industries/zed/pull/37175 as
https://github.com/zed-industries/zed/pull/39886 fixed the jiggling
issue.
Currently when we render text with differing styles adjacently we might
form a ligature between the text, causing the ligature forming
characters to take on one of the two styles. This can especially become
confusing when a ligature is formed between actual text and inlay hints.
Annoyingly, the only ways to prevent this with core text is to either
render each run separately, or to insert a zero-width non-joiner to
force core text to break the ligatures apart, as it otherwise will merge
subsequent font runs of the same fonts.
We currently do layouting on a per line basis and it is unlikely we want
to change that as it would incur a lot of complexity and annoyances to
merge things back into a line, so this goes with the other approach of
inserting ZWNJ characters instead.
Note that neither linux nor windows seem to currently render ligatures,
so this only concerns macOS rendering at the moment.
Closes https://github.com/zed-industries/zed/issues/23194
Release Notes:
- Fixed ligatures forming between real text and inlay hints on macOS
Workspace diagnostics in Zed have a dedicated background task that
handles querying the language server based on workspace diagnostics
refresh requests issued by both Zed and language server itself.
We only spawned that task when language server declared support for
workspace diagnostics on boot-up. This made workspace diagnostics
unavailable
when a language server (say, Ty) declared support via a capability
registration.
Originally reported in
https://github.com/zed-industries/zed/issues/39144#issuecomment-3370320004
Release Notes:
- python: Fixed workspace diagnostics not working with Ty.
Closes https://github.com/zed-industries/zed/issues/40080
Follow-up to https://github.com/zed-industries/zed/pull/39720
We were already doing this for icon themes, but not for normal themes.
Issue here is that we would only update the `cx.theme()` on the next
frame. On mouse confirmation, we would override the theme and confirm it
on the same frame, yet the global would only be peropely updated on the
next frame and then instantly reset to the new settings file, which
would again be the old theme. This caused a flicker and the selection to
not persist.. Keyboard interactions worked still, because there would be
a rendered frame inbetween selection and confirmation.
Release Notes:
- N/A
The recent introduction of PathList removed some of the ordering logic
resulting in paths always being alphabetised.
This change restores the previous logic for sorting worktrees in a
project using the newer PathList type.
Closes#39934
Release Notes:
- Fixed manual worktree reordering
<details>
<summary>Screen recording of it retaining the order</summary>
https://github.com/user-attachments/assets/0197d118-6ea7-4d2d-8fec-c917fcb9d277
</details>
---------
Co-authored-by: MrSubidubi <finn@zed.dev>
Related #35948
Should document it.. re:
- Added documentation for Mesa GPU device selection using environment
variables
- Added instructions for XWayland fallback when using Wayland
Release Notes:
- N/A
---------
Co-authored-by: Finn Evers <finn.evers@outlook.de>
This PR primarily does two things:
- replace `serde_json::from_reader` with `serde_json::from_slice`, as
the latter is much much faster, even with loading the file into memory
first.
- runs the initial loading of themes and icon themes coming from
extensions in parallel instead of sequential.
Measuring the `eager_load_active_theme_and_icon_theme` method, this
drastically improves the speed at which this happens (tested this method
primarily with debug builds on my MacBook Pro, but the `Before`
measurement was also confirmed against a `release-fast` build):
- Before: ~260ms on average (in one run, it even took 600ms)
- After: ~20ms on average
Which reduces the time this method takes to load these by around ~92%.
Given that we block on this during the initial app startup, this should
drastically improve Zeds initial startup loading time. Yet, it also
improves responsiveness when installing theme extensions and trying
these.
I also replaced all other `serde_json::from_reader` implementations with
`serde_json::from_slice` and added the former to `disallowed_methods`,
given
https://github.com/serde-rs/json/issues/160#issuecomment-253446892.
Release Notes:
- Improved Zed startup speed when using themes provided by extensions
Replace O(n²) linear search with O(log n) binary search for checking
selection overlaps when finding next selection range. Pre-sort selection
ranges and use binary search to significantly improve performance when
working with many selections.
Release Notes:
- N/A
---------
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Due to using anyhow here, we otherwise lose the relevant error and just
surface a fairly useless error message.
Intentionally not doing this for `extension.json` parsing since that is
deprecated.
Release Notes:
- N/A
This makes it easier to see the image bounds for images with transparent
backgrounds.
<img width="2560" height="1377" alt="png"
src="https://github.com/user-attachments/assets/e1555576-39a2-4240-b9d3-67574df76f0d"
/>
Release Notes:
- Updated image preview background checkboxes to match the actual image
size, making it easier to see the bounds of images with transparent
backgrounds.
Currently when extending a selection using shift-click, the selection
granularity (or `SelectMode`) is based on the click count when extending
the selection, not on the click count of the initial selection. For
example, selecting a word with double-click followed by shift-click uses
a character granularity:
https://github.com/user-attachments/assets/13c78bb9-9c31-45d4-97de-99c30c7425a7
This PR changes this behavior to be more in line with other editors that
I'm familiar with by preserving the granularity of the initial selection
(unless the extension has a higher click count, i.e. the behavior of a
single click selection by a shift-double-click extension is unchanged):
https://github.com/user-attachments/assets/92e69e95-7ea2-4f76-b0a4-e4b9efa1947b
Release Notes:
- Extending a selection using shift-click now preserves the
character/word/line granularity of the initial selection
---------
Co-authored-by: Lukas Wirth <lukas@zed.dev>
Closes#39216
Note that this affects all platforms, I'm just using the prefix to make
auto-cherry-picking easier.
Release Notes:
- Fixed shell commands run by agents failing to find installed programs
in some cases.
It looks like a `.is_local()` check got left in from the original
debugger implementation. I was able to view remote logs just fine after
removing it.
Release Notes:
- Fixed DAP logs being unviewable on remote projects.
Repro:
- Open a multibuffer
- Click on a line number to jump to the corresponding file
- Click the back button
- Click the forward button, nothing happens
- Click the forward button again, now it works
Double clicking the code to jump to the file (with
`"double_click_in_multibuffer": "open"`) doesn't exhibit this bug, so I
just changed the logic when clicking on a line number in a multibuffer
to match that behavior.
https://github.com/user-attachments/assets/31c0d64d-fdb8-44d6-b0f3-a337ca53de30
Release Notes:
- Fixed bug that could cause navigation to break when clicking on a line
number in a multibuffer
Closes#5185
Release Notes:
- Added an option to hide hidden files in the project panel by setting
`hide_hidden` in the project panel settings.
---------
Co-authored-by: Gaauwe Rombouts <gromdroid@gmail.com>
Co-authored-by: Gaauwe Rombouts <mail@grombouts.nl>
Includes improvements in button padding, ways we space elements out,
more consistent use of some components, and cleaning up redundant
buttons styles. Pretty much nothing changes in the design, though.
Release Notes:
- N/A
Closes#39974
Since the thumb hitboxes themselves do not propagate events, we need to
paint the normal parent hitbox on top of the other ones. This also
caused hover detection to fail, which caused the issue linked.
Release Notes:
- Fixed an issue where hovering scrollbars in hovers would dismiss
these.
Hi! In https://github.com/zed-extensions/ruby/issues/162 we renamed
embedded template languages:
- `HTML/ERB` to `HTML+ERB`
- `YAML/ERB` to `YAML+ERB`
- `JS/ERB` to `JS+ERB`
This pull request updates the Ruby extension documentation to reflect
that change. Thanks!
Release Notes:
- N/A
The previous code clones all the rope chunks, but the rope is passed by
value so the chunks are about to be dropped anyhow.
I thought this may slightly help performance but it has no very
noticeable effect, with a mix of small changes up and down probably
attributable to noise on my machine?
I wonder if the benchmarks might just not hit this path well? I'm
looking into that separately (see #39949, #39951), but this seemed clear
enough to be worth proposing by itself.
Incidentally it surprised me this did not generate a warning already,
but I think it's because we're taking only one field from the struct
that's about to be dropped:
https://github.com/rust-lang/rust-clippy/issues/7429.
<details>
```
Running benches/rope_benchmark.rs (target/release/deps/rope_benchmark-4c5c71666e7c1729)
push/4096 time: [362.58 µs 366.40 µs 370.69 µs]
thrpt: [10.538 MiB/s 10.661 MiB/s 10.773 MiB/s]
change:
time: [+0.0646% +1.2362% +2.4681%] (p = 0.04 < 0.05)
thrpt: [-2.4086% -1.2211% -0.0646%]
Change within noise threshold.
Found 10 outliers among 100 measurements (10.00%)
7 (7.00%) high mild
3 (3.00%) high severe
Benchmarking push/65536: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 8.4s, enable flat sampling, or reduce sample count to 50.
push/65536 time: [1.6185 ms 1.6353 ms 1.6557 ms]
thrpt: [37.747 MiB/s 38.219 MiB/s 38.616 MiB/s]
change:
time: [+1.9135% +2.9548% +3.9838%] (p = 0.00 < 0.05)
thrpt: [-3.8312% -2.8700% -1.8776%]
Performance has regressed.
Found 6 outliers among 100 measurements (6.00%)
5 (5.00%) high mild
1 (1.00%) high severe
append/4096 time: [1.1052 µs 1.1104 µs 1.1162 µs]
thrpt: [3.4177 GiB/s 3.4354 GiB/s 3.4516 GiB/s]
change:
time: [-2.5075% -0.3430% +1.5095%] (p = 0.76 > 0.05)
thrpt: [-1.4871% +0.3441% +2.5720%]
No change in performance detected.
Found 8 outliers among 100 measurements (8.00%)
7 (7.00%) high mild
1 (1.00%) high severe
append/65536 time: [12.404 µs 12.444 µs 12.487 µs]
thrpt: [4.8881 GiB/s 4.9049 GiB/s 4.9204 GiB/s]
change:
time: [-0.1408% +0.5573% +1.2016%] (p = 0.10 > 0.05)
thrpt: [-1.1874% -0.5542% +0.1410%]
No change in performance detected.
Found 5 outliers among 100 measurements (5.00%)
2 (2.00%) high mild
3 (3.00%) high severe
slice/4096 time: [32.963 µs 33.185 µs 33.466 µs]
thrpt: [116.72 MiB/s 117.71 MiB/s 118.51 MiB/s]
change:
time: [-6.4303% -5.1234% -3.6394%] (p = 0.00 < 0.05)
thrpt: [+3.7769% +5.4000% +6.8722%]
Performance has improved.
Found 2 outliers among 100 measurements (2.00%)
1 (1.00%) high mild
1 (1.00%) high severe
slice/65536 time: [668.67 µs 670.49 µs 672.65 µs]
thrpt: [92.916 MiB/s 93.215 MiB/s 93.469 MiB/s]
change:
time: [+0.0846% +0.5573% +1.0199%] (p = 0.02 < 0.05)
thrpt: [-1.0096% -0.5542% -0.0845%]
Change within noise threshold.
Found 10 outliers among 100 measurements (10.00%)
6 (6.00%) high mild
4 (4.00%) high severe
bytes_in_range/4096 time: [5.1513 µs 5.1594 µs 5.1674 µs]
thrpt: [755.95 MiB/s 757.12 MiB/s 758.31 MiB/s]
change:
time: [-4.9410% -4.2051% -3.3835%] (p = 0.00 < 0.05)
thrpt: [+3.5020% +4.3897% +5.1978%]
Performance has improved.
Found 4 outliers among 100 measurements (4.00%)
1 (1.00%) low mild
3 (3.00%) high severe
bytes_in_range/65536 time: [139.87 µs 140.17 µs 140.55 µs]
thrpt: [444.67 MiB/s 445.89 MiB/s 446.85 MiB/s]
change:
time: [-0.6267% -0.0474% +0.4635%] (p = 0.87 > 0.05)
thrpt: [-0.4614% +0.0475% +0.6306%]
No change in performance detected.
Found 9 outliers among 100 measurements (9.00%)
7 (7.00%) high mild
2 (2.00%) high severe
chars/4096 time: [1.0243 µs 1.0250 µs 1.0257 µs]
thrpt: [3.7190 GiB/s 3.7217 GiB/s 3.7243 GiB/s]
change:
time: [+4.0106% +4.5396% +5.3062%] (p = 0.00 < 0.05)
thrpt: [-5.0388% -4.3425% -3.8559%]
Performance has regressed.
Found 10 outliers among 100 measurements (10.00%)
2 (2.00%) high mild
8 (8.00%) high severe
chars/65536 time: [17.540 µs 17.576 µs 17.614 µs]
thrpt: [3.4652 GiB/s 3.4727 GiB/s 3.4797 GiB/s]
change:
time: [+2.5201% +3.3922% +4.1639%] (p = 0.00 < 0.05)
thrpt: [-3.9974% -3.2809% -2.4581%]
Performance has regressed.
Found 7 outliers among 100 measurements (7.00%)
4 (4.00%) high mild
3 (3.00%) high severe
clip_point/4096 time: [58.857 µs 59.162 µs 59.490 µs]
thrpt: [65.662 MiB/s 66.026 MiB/s 66.368 MiB/s]
change:
time: [+1.6900% +2.8088% +3.8521%] (p = 0.00 < 0.05)
thrpt: [-3.7092% -2.7321% -1.6619%]
Performance has regressed.
Found 3 outliers among 100 measurements (3.00%)
3 (3.00%) high mild
clip_point/65536 time: [1.8609 ms 1.8633 ms 1.8660 ms]
thrpt: [33.494 MiB/s 33.543 MiB/s 33.585 MiB/s]
change:
time: [+0.0577% +0.2579% +0.4495%] (p = 0.01 < 0.05)
thrpt: [-0.4474% -0.2572% -0.0577%]
Change within noise threshold.
Found 5 outliers among 100 measurements (5.00%)
3 (3.00%) high mild
2 (2.00%) high severe
point_to_offset/4096 time: [19.246 µs 19.287 µs 19.331 µs]
thrpt: [202.07 MiB/s 202.54 MiB/s 202.97 MiB/s]
change:
time: [+1.1073% +2.9754% +5.3818%] (p = 0.00 < 0.05)
thrpt: [-5.1069% -2.8894% -1.0951%]
Performance has regressed.
Found 13 outliers among 100 measurements (13.00%)
5 (5.00%) high mild
8 (8.00%) high severe
Benchmarking point_to_offset/65536: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 6.6s, enable flat sampling, or reduce sample count to 60.
point_to_offset/65536 time: [741.87 µs 743.28 µs 744.74 µs]
thrpt: [83.922 MiB/s 84.086 MiB/s 84.247 MiB/s]
change:
time: [+5.0577% +5.6751% +6.3133%] (p = 0.00 < 0.05)
thrpt: [-5.9384% -5.3703% -4.8142%]
Performance has regressed.
Found 7 outliers among 100 measurements (7.00%)
4 (4.00%) high mild
3 (3.00%) high severe
cursor/4096 time: [27.407 µs 27.483 µs 27.600 µs]
thrpt: [141.53 MiB/s 142.13 MiB/s 142.53 MiB/s]
change:
time: [-7.1479% -6.2928% -5.6378%] (p = 0.00 < 0.05)
thrpt: [+5.9747% +6.7154% +7.6981%]
Performance has improved.
Found 9 outliers among 100 measurements (9.00%)
1 (1.00%) high mild
8 (8.00%) high severe
cursor/65536 time: [848.91 µs 849.70 µs 850.59 µs]
thrpt: [73.478 MiB/s 73.555 MiB/s 73.624 MiB/s]
change:
time: [+0.0281% +0.3487% +0.6686%] (p = 0.04 < 0.05)
thrpt: [-0.6642% -0.3475% -0.0281%]
Change within noise threshold.
Found 9 outliers among 100 measurements (9.00%)
5 (5.00%) high mild
4 (4.00%) high severe
```
</details>
Release Notes:
- N/A
Follow up to https://github.com/zed-industries/zed/pull/39979. The
previous PR made it the title would change even if you were on a
non-root tree view item. This PR fixes that by fixating the title to
show only the root tree view item.
Release Notes:
- N/A
Closes #ISSUE
Annotated our `default.json` with `$schema` to get diagnostics, then
fixed the non-language not installed warnings.
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Closes #ISSUE
Release Notes:
- settings: Deprecated `code_actions_on_format` in favor of specifying
code actions to run on format inline in the `formatter` array.
Previously, you would configure code actions to run on format like this:
```json
{
"code_actions_on_format": {
"source.organizeImports": true,
"source.fixAll.eslint": true
}
}
```
This has been migrated to the new format:
```json
{
"formatter": [
{
"code_action": "source.organizeImports"
},
{
"code_action": "source.fixAll.eslint"
}
]
}
```
This change will be automatically migrated for you. If you had an
existing `formatter` setting, the code actions are prepended to your
formatter array (matching the existing behavior). This migration applies
to both global settings and language-specific settings
Rendering breaks when both an element and its parent have opacity set.
The following code reproduces the issue:
```rust
struct Repro;
impl Render for Repro {
fn render(&mut self, _window: &mut Window, _cx: &mut Context<Self>) -> impl IntoElement {
fn make_box(bg: impl Into<Fill>) -> impl IntoElement {
div().size_8().bg(bg).hover(|style| style.opacity(0.5))
}
div()
.flex()
.items_center()
.justify_center()
.size(px(500.0))
.hover(|style| style.opacity(0.5))
.child(make_box(gpui::red()))
.child(make_box(gpui::green()))
.child(make_box(gpui::blue()))
}
}
```
Before (broken behavior):
https://github.com/user-attachments/assets/2c5c1e31-88b2-4f39-81f8-40060e3fe958
The child element resets its parent and siblings' opacity, which is an
unexpected behavior.
After (fixed behavior):
https://github.com/user-attachments/assets/48527033-b06f-4737-b6c3-0ee3d133f138
Release Notes:
- Fixed an issue where nested opacity is rendered incorrectly.
This PR renames the following actions to make it easier and prioritize
the UI version of interacting with them:
| Before | After |
|--------|--------|
| `OpenSettingsEditor` | `OpenSettings` |
| `OpenSettings` | `OpenSettingsFile` |
| `OpenKeymapEditor` | `OpenKeymap` |
| `OpenKeymap` | `OpenKeymapFile` |
Release Notes:
- Rename actions to open settings (UI/window and JSON file) as well as
to open the keymap (editor tab and JSON file).
Previously we were always adding a `Navigable` entry for the "new WSL
connection" option in this modal, even though we don't have the
corresponding button on non-Windows. This was causing `menu::SelectNext`
to behave incorrectly (focusing the center pane instead) when `Connect
New Server` was selected on macOS and Linux.
Release Notes:
- Fixed a bug with keyboard navigation in the remote project modal.
Closes#39263
Release Notes:
- N/A
from
https://github.com/zed-industries/zed/issues/39263#issuecomment-3358220988
>
> > If you replace that code with
> >
> > let adapter: IDXGIAdapter1 = unsafe {
> > dxgi_factory.EnumAdapters(adapter_index)
> > }?.cast()?;
> >
> > does it not select the right GPU?
>
> @reflectronic That does seem to select the active gpu for me, meaning
whichever GPU is currently connected. This is a much simpler solution
than the one I have here
(https://github.com/zed-industries/zed/pull/39264 - updated) and while
I'm sure I could imagine someone wanting to choose their GPU to render
Zed on, that may not be something that the application really needs to
support.
>
> I have a branch with just this as the only change that I can push to
that PR if the simpler solution is preferred.
>
> ```rust
> let adapter: IDXGIAdapter1 = unsafe {
> dxgi_factory.EnumAdapters(adapter_index)?.cast()?
> };
> ```
Gathering LSP declarations in zeta_cli can take a really long time for
big repos and has to be started from scratch if interrupted.
Instead of writing the cache file once we have walked the whole
worktree, we'll now do so incrementally as we complete each file. On
subsequent runs, we'll load as many valid declarations as has been
previously written to the cache, and then continue to request the rest
from the LSP which will append to the existing file as it makes
progress. If the last cache entry is incomplete, we'll truncate the
cache file to the end of the last valid line and continue from there, so
we can just `ctrl-c` without breaking resumability.
Release Notes:
- N/A
- Update `AcpThreadView.insert_selections` to take into account whether
the user is currently editing an existing message and, if it is, insert
the selection into that message instead of the thread's message editor
- Update Window's default keymap to use the `agent::QuoteSelection`
action instead of the deprecated `assistant::QuoteSelection` action
- Introduce `AcpThreadView.active_editor` to allow callers to retrieve
either the thread view's message editor or the editor for the message
being edited, in case `AcpThreadView.editing_message` is not `None`
- Improve `AcpThreadView.focus_handle` to focus on the message being
currently edited in case the user navigates back to the editor and then
to the thread view again, all while editing a message
- Add tests for `AcpThreadView.insert_selections`, ensuring that the
selection is inserted in the message being currently edited, if a
message is being edited, or the thread view's message editor if no
message is being edited
Closes#39693
Release Notes:
- Improved `agent: quote selection` to also work for a message that was
already sent but is being edited
---------
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
The feedback modal did not match our keyboard-driven design. We can
revisit this later if we want, but for now, removing it makes sense. All
actions have been inlined in the `Help` menu to maintain
discoverability.
Additionally, not all feedback-based actions in the command palette were
namespaced under `feedback:`, and now they are, so they can all be found
there easily.
Release Notes:
- Notice: The `Give Feedback` modal has been removed. The options to
file bug reports, feature requests, email us, and open the Zed
repository can now be found within the `Help` menu directly. The command
palette actions have undergone the following changes:
- `feedback: give feedback` (removed)
- `feedback: file bug report` (no change)
- `zed: request feature` → `feedback: request feature`
- `zed: email zed` → `feedback: email zed`
- `zed: open zed repo` → `contribute: open zed repo`
Previously we were guessing the context window size here:
8c3f09e31e/crates/ollama/src/ollama.rs (L22)
This is inaccurate and must be updated manually. This PR ensures that we
extract the context window size from the request in the same way that
the Ollama CLI does when running `ollama show <model-name>` (Relevant
code is
[here](3d32249c74/cmd/cmd.go (L860)))
The format looks like this:
```json
{
"model_info": {
"general.architecture": "llama",
"llama.context_length": 132000
}
}
```
Once this PR is merged we could technically remove the old code
8c3f09e31e/crates/ollama/src/ollama.rs (L22)
I decided to keep it for now, as it is unclear if the necessary fields
are available via the API on older Ollama versions.
Release Notes:
- Fixed an issue where Ollama models would use the wrong context window
size
The issue was caused by the scroll handle taking a couple of frames to
update its offset correctly after calling
`ScrollHandle::scroll_to_top_of_item`. The fast fix is forcing 3 frames
to render back-to-back.
In the future, we should look into `ScrollHandle` and see if there's any
way to update its state outside of paint.
Release Notes:
- N/A
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Co-authored-by: Katie Geer <katie@zed.dev>
Co-authored-by: Ben Kunkle <ben@zed.dev>
Re-adds: https://github.com/zed-industries/zed/pull/37264
This PR re-adds basic support for showing HTML images, without touching
the display mode for images.
The initial PR changed the `div().flex().flex_col()` to
`h_flex().flex_wrap()` but this broke the text wrapping in almost all
cases.
**Note**: This does not add support for showing the images inline,
because we haven't figured out how they correctly do this.
I'm working on adding the CSS `inline` display feature support to taffy
that hopefully allows us to correctly show images/other elements inline
without breaking the text wrapping.
**Before (nightly) and after (dev) for the README file inside Zed.
(nothing has changed, which is good)**
<img width="3440" height="1380" alt="Screenshot 2025-09-13 at 12 49 08"
src="https://github.com/user-attachments/assets/9cbdcb07-dbe9-4236-9d20-e59acc0e955e"
/>
**Result**
<img width="1717" height="1314" alt="Screenshot 2025-09-13 at 12 51 54"
src="https://github.com/user-attachments/assets/1c0f8507-c63d-472e-8e82-a654a63f7153"
/>
cc @SomeoneToIgnore
Release Notes:
- markdown preview: Added support for HTML `img` tags inside paragraphs
As you can see in the image, we were previously returning different
`ascent`s/`descent`s when a line would/would not contain an Emoji.
<img width="104" height="36" alt="image"
src="https://github.com/user-attachments/assets/436aeda0-87c0-4dee-943b-6da83681d466"
/>
---
CoreTexts `CTLineGetTypographicBounds` seems to return a different
ascent/descent depending on if an Emoji is there or not AFAIK it is not
documented if this is intended behaviour or not. For us it is
undesirable, as typing an Emoji causes the line to be shifted to the
bottom, see here:
https://github.com/user-attachments/assets/2ad1c82e-6297-48ac-a522-fb382ea56eea
---
Instead of using `CTLineGetTypographicBounds` to resolve the
ascent/descent, we look at every run and choose the maximum
ascent/descent. This matches how it [works on
Linux](f1d17fcfbe/crates/gpui/src/platform/linux/text_system.rs (L452))
Release Notes:
- Fixed an issue on macOS where typing an emoji on a line would cause
the line to shift downwards by a few pixels
Fixes the `Open Diff` action for untracked files when the `sort_by_path`
setting is enabled. The `ProjectDiff` wasn't correctly moving the
multibuffer's cursor to the untracked file because, when that setting is
enabled, it's sort prefix is changed to the tracked files sort prefix, and that
wasn't accounted for in `move_to_entry`.
Before these changes, the `sort_prefix` field for `PathKey` was called `namespace`, it was renamed to be clearer what its purpose is.
Closes#39529
Release Notes:
- Fixed 'Open Diff' action for untracked files when `sort_by_path` is
enabled
---------
Co-authored-by: David Kleingeld <davidsk@zed.dev>
- Prefer agent-specific logout handling to allow state reset
- Treat any auth method as supported; remove provider-specific filter
- Avoid prompting auth when issuing /logout and agent supports it
Release Notes:
- N/A
These changes refactor the whitespace handling logic for Vim's change
surrounds command (`cs`), making its behavior closely match
[tpope/vim-surround](https://github.com/tpope/vim-surround), following
[this
discussion](https://github.com/zed-industries/zed/issues/38169#issuecomment-3304129461).
Zed's current implementation has two main differences when compared to
[tpope/vim-surround](https://github.com/tpope/vim-surround):
- It only considers whether a single space should be added or removed,
instead of all the space that is between the surrounding character and
the content
- It only takes into consideration the new surrounding characters in
order to determine whether to add or remove that space
A review of
[tpope/vim-surround](https://github.com/tpope/vim-surround)'s behavior
reveals these rules for whitespace:
* Quote to Quote
* Whitespace is never changed
* Quote to Bracket
* If opening bracket, add one space
* If closing bracket, do not add space
* Bracket to Bracket
* If opening to opening, keep only one space
* If opening to closing, remove all space
* If closing to opening, add one space
* If closing to closing, do not change space
* Bracket to Quote
* If opening, remove all space
* If closing, preserve all space
Below is a table with examples for each scenario. A new test has also
been added to specifically check the scenarios outlined above,
`vim::surrounds::test::test_change_surrounds_vim`.
| Type | Before | Command | After |
|-------------------|-------------|---------|---------------|
| Quote → Quote | `' a '` | `cs'"` | `" a "` |
| Quote → Quote | `" a "` | `cs"'` | `' a '` |
| Quote → Bracket | `' a '` | `cs'{` | `{ a }` |
| Quote → Bracket | `' a '` | `cs'}` | `{ a }` |
| Bracket → Bracket | `[ a ]` | `cs[{` | `{ a }` |
| Bracket → Bracket | `[ a ]` | `cs[}` | `{a}` |
| Bracket → Bracket | `[ a ]` | `cs]{` | `{ a }` |
| Bracket → Bracket | `[ a ]` | `cs]}` | `{ a }` |
| Bracket → Quote | `[ a ]` | `cs['` | `'a'` |
| Bracket → Quote | `[ a ]` | `cs]'` | `' a '` |
These changes diverge from
[tpope/vim-surround](https://github.com/tpope/vim-surround) when
handling newlines. For example, with the following snippet:
```rust
fn test_surround() {
if 2 > 1 {
println!("place cursor here");
}
};
```
Placing the cursor inside the string and running any combination of
`cs{[`, `cs{]`, `cs}[`, or `cs}]` would previously remove newline
characters. With these changes, using commands like `cs}]` will now
preserve newlines.
Related to #38169Closes#39334
Release Notes:
- Improved Vim’s change surround command to closely match
[tpope/vim-surround](https://github.com/tpope/vim-surround) behavior.
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This takes the idea that @RemcoSmitsDev started on in
https://github.com/zed-industries/zed/pull/39354. We did away with
grabbing a snapshot of the display map when buffer coordinates were
sufficient.
Closes#37267
Release Notes:
- Reduced micro-stutters in project search with large multi-buffer
contents.
---------
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Closes #ISSUE
From notes:
```markdown
- [x] Clicking on the disclsoure icon button in the root-level tree view item should steal focus and move it to the root item (not the icon button)
- [x] [@ben] Allow left/right arrow keys to expand/collapse root tree view items in the nav
- [x] With this, make enter/space work the same as clicking (activate page, don't expand root items, focus moves to the content and leaves nav — becomes consistent with mouse interaction)
- [x] Smart cmd-shift-e: toggling focus should take you to the selected item
- [x] [@ben] pageup + pagedown in nav -> jump between root items
- [x] [@ben] home + end buttons should work
- in nav:
- home always goes to first section header
- end always goes to last _visible_ item (does not expand)
```
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Closes https://github.com/zed-industries/zed/issues/39259
- Fixes import of `editor.fontFamily` (we were looking for the wrong
key)
- Adds basic support for the CSS font-family syntax used by VS Code,
including font fallback
Release Notes:
- N/A
This PR adds support for browser debugging in SSH and WSL projects. We
use the vscode-js-debug-companion extension, repackaged as a standalone
CLI (https://github.com/zed-industries/js-debug-companion-cli).
Closes#38878
Release Notes:
- debugger: Browser debugging is now supported in SSH and WSL projects.
---------
Co-authored-by: Nia <nia@zed.dev>
Two tweaks were required to ensure we correctly clear the shell after
running an activate script(s):
1. PowerShell upon receiving `\r\n` input, will enter the continuation
mode (>>). To avoid this, we send an "enter" key press instead `\x0d`.
2. In order to clear the terminal _after_ issuing all activation
commands, we need to take into account the asynchronous nature of the
activation process:
- We write the command to run the script to PTY
- We send "enter" (It is now being processed by the shell) At this point
we need to wait for the shell to finish executing before we clear the
terminal. Otherwise we will create a race where we might clear the
terminal _before_ the shell finished executing the activation script(s).
- Write `clear`/`cls` command to PTY
- Send "enter" This way we guarantee that we clear the terminal _after_
all scripts were executed.
Closes#38474
Release Notes:
- N/A
Plans and displays the prompt locally before the response arrives.
Helpful while debugging prompt planning.
Release Notes:
- N/A
---------
Co-authored-by: Michael Sloan <mgsloan@gmail.com>
I didn't find a commit, but it's now required for all platforms, I got
this compile error with 0.207.3 tag
```
error: cannot find macro `info` in this scope
--> crates\audio\src\audio.rs:121:13
|
121 | info!("Output stream: {:?}", output_handle);
| ^^^^
|
help: consider importing this macro
|
1 + use log::info;
|
error: could not compile `audio` (lib) due to 1 previous error
```
Closes #ISSUE
Release Notes:
- N/A
Closes #ISSUE
This allows new windows like the Rules library or the Settings UI window
to appear floating on window managers like hyprland:
https://github.com/user-attachments/assets/628db7f9-4459-4601-85f1-789923831182
Left is with `WindowKind::Floating` and right is with
`WindowKind::Normal`
Release Notes:
- Added support for floating windows on x11 and wayland
Release Notes:
- Added Codestral edit predictions provider which can be enabled by adding an API key in the Mistral section of agent settings.

## Config
Get API key from https://console.mistral.ai/codestral and add it in the Mistral section of the agent settings.
```
"features": {
"edit_prediction_provider": "codestral"
},
"edit_predictions": {
"codestral": {
"model": "codestral-latest",
"max_tokens": 150
}
},
```
---------
Co-authored-by: Michael Sloan <michael@zed.dev>
## Description
Fixes#39376
Add individual FoldAtLevel1-9 actions so users can find fold commands in
the command palette while keeping existing keybindings.
Migrating user keymaps is necessary to have the keybinds show in the command palette.
Closes#39376
### Changes
- `crates/editor/src/actions.rs` - Added FoldAtLevel1-9 action structs
- `crates/editor/src/editor.rs` - Implemented fold_at_level_1-9 handler
methods
- `crates/editor/src/element.rs` - Registered new actions
- `assets/keymaps/*.json` - Updated keybindings to use new individual
actions
### Other Approaches considered
- Adding #[serde(default)] to existing FoldAtLevel(u32) - wouldn't make
it discoverable
- Creating a single action with enumerated variants - idk about this
that well.
### Release Notes
Release Notes:
- Added Fold At Level 1-9 actions to the command palette
---------
Co-authored-by: HactarCE <6060305+HactarCE@users.noreply.github.com>
# How
Tweak the way in which inspected element bounds and size are printed to
improved readability of GPUI Inspector data.
> [!note]
> It looks like the only place in the workspace where bounds are used
within formatted print is GPUI Inspector panel, but I decided to do not
alter [GPUI `geometry.rs` default
format](a7e7f46020/crates/gpui/src/geometry.rs (L1579-L1587)),
since adding multiline output and additional labels in there does not
feel like the beast approach, but maybe I'm wrong?
Release Notes:
- N/A
# Preview
<img width="1168" height="224" alt="Screenshot 2025-10-07 at 20 08 35"
src="https://github.com/user-attachments/assets/97753fc1-68d7-4cf8-ad92-afe85319f3d8"
/>
<img width="1168" height="228" alt="Screenshot 2025-10-07 at 20 09 24"
src="https://github.com/user-attachments/assets/beed2a92-0817-4ed2-bb62-4d7b931e8709"
/>
I mistakenly broke this when refactoring settings
Closes#39479
Release Notes:
- Fixed a bug where you could no longer configure `terminal.shell` in
project settings
A couple of caveats:
- We should not auto-escape arguments with Alacritty's `escape_args`
option if using CMD otherwise, the generated command will have way too
many escaped characters for CMD to parse correctly.
- When composing a full command for CMD, we need to put it in double
quotes manually: `cmd /C "activate.bat& pwsh.exe -C do_something"` so
that CMD executes the entire string as a sequence of commands.
- CMD requires `&` as a chaining operator for commands (`;` for other
shells).
Release Notes:
- N/A
This PR expands our automatic retry behavior for certain classes of
completion errors (e.g., rate limit errors).
Previously this was only available when using burn mode.
We now auto-retry when:
- Using the Zed provider while on a token-based plan
- Using the Zed provider while on a legacy plan with burn mode enabled
- Using a non-Zed provider
Release Notes:
- Expanded automatic retry behavior for errors in the Agent. Errors
classified as "retryable" (such as rate limit errors) will now
automatically be retried when:
- Using the Zed provider while on a token-based plan
- Using the Zed provider while on a legacy plan with burn mode enabled
- Using a non-Zed provider
---------
Co-authored-by: David Kleingeld <davidsk@zed.dev>
These changes update the way the file finder decides wether to only look
for an absolute path or for a relative path too.
When the provided query started with a slash (`/`) the file finder would
assume this to be an absolute path so would always try to find an
absolute path and return no matches if none was found. This is meant to
support situtations where, for example, a CLI tool might output the
absolute path of a file and the user can copy and paste that in the file
finder.
However, it's should be possible to use slash (`/`) at the start of the
query to specify that only relative files inside a folder should be
matched, which would not work in this scenario.
With these changes, the file finder will first check if the path is
absolute and, if it is and no absolute matches were found, it'll still
try to find relative matches, otherwise it'll simply look for relative
matches.
Closes#39350
Release Notes:
- Fixed project files matches when using slash (`/`) at the start in
order to consider relative paths
---------
Co-authored-by: Piotr Osiewicz <piotr@zed.dev>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
We don't get an ExitStatus from a remote terminal, so this check was
failing.
Ideally we move all of this to just needing an exit code, but we will
have to revisit that later.
Release Notes:
- N/A
Update Vim's `%` motion to first attempt finding the exact matching
bracket/tag under the cursor, then fall back to the previous
nearest-enclosing logic if none is found. This prevents accidentally
jumping to nested pairs in languages like TSX and Svelte where `<>`,
`</>`, and `/>` are also treated as brackets.
Closes#39368
Release Notes:
- Fixed an edge case with the `%` motion in vim, where the cursor could
end up in a closing HTML tag instead of the matching bracket
This commit fixes an issue where opening zed using `--user-data-dir`
with an empty directory would cause the first run to display a "Failed
to migrate settings" error.
This was caused by the migrator attempting to migrate an empty string,
so if that's the case, we'll simply return `Ok(None)` and avoid
attempting to migrate anything at all.
Relates to #39400
Release Notes:
- N/A
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Use path! macro for platform-specific path formatting in test
assertions, fixing hardcoded Unix-style paths that failed on Windows.
Release Notes:
- N/A
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
This PR adds support for HTML block quotes, that also allows you to have
nested variant of it.
<img width="1441" height="804" alt="Screenshot 2025-10-08 at 10 25 57"
src="https://github.com/user-attachments/assets/4e1da766-fb54-4e87-8654-1ea14330bc97"
/>
Code example used in screenshot:
```html
<blockquote>
<p>
Words can be like X-rays, if you use them properly—they’ll go through
anything. You read and you’re pierced.
</p>
<blockquote>
<p>
lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor.
</p>
</blockquote>
</blockquote>
```
Release Notes:
- Markdown: Added support for `HTML` block quotes
Follow up to https://github.com/zed-industries/zed/pull/39468.
Unlike `agent_ui_font_size`, the `agent_buffer_font_size` setting does
have a default value, which means it does not fall back to the regular
UI font size, but rather to its default value.
Release Notes:
- N/A
Closes#38538
Release Notes:
- Fixed an issue where opening a remote terminal failed on systems like
BusyBox, Alpine, Amazon Linux 2, some CentOS images, etc., due to an
invalid option 'C'.
This PR makes selecting a sub-entry in the settings UI nav bar scroll to
that section in the settings page. It also updates the selected
sub-entry when scrolling through a settings page to match what a user is
viewing on the page.
I also added a new helper method to `ScrollHandle` type called
`scroll_to_top_of_item` that scrolls until an item is the top element
visible.
Release Notes:
- N/A
Closes#38919
Now, when unfocusing the filename editor while creating a file or
directory in the project panel, it will create it by default unless the
name is empty or already exists.
Release Notes:
- Improved behavior where unfocusing while creating a new file or
directory in the project panel now creates it instead of discarding it.
The previous modifier detection treated `AltGr` presses as `Ctrl+Alt`,
which broke entering characters produced by AltGr. For example, on a
Hungarian layout `{` is typed with `AltGr+B`; our code saw that as
`Ctrl+Alt+B` and the keybind took precedence, so the character couldn’t
be entered.
On Windows, AltGr isn’t a first-class modifier. It’s emulated as a
combination of `Right Alt (VK_RMENU)` plus a synthetic `Left Ctrl
(VK_LCONTROL)` press. When users press AltGr, `GetKeyState` reports both
Ctrl and Alt as down, which makes AltGr indistinguishable from a real
`Ctrl+Alt` chord if we only look at aggregate modifier state.
Fix: detect the AltGr pattern by checking `VK_RMENU && VK_LCONTROL`.
When that pattern is present, treat it as text-entry intent and suppress
`control` and `alt` in `current_modifiers()`. This prevents
AltGr-produced characters from colliding with `Ctrl+Alt` keybinds while
keeping other modifiers intact.
Limitation: there is no Windows API to tell whether the active layout
actually has AltGr. As a result, on non-AltGr layouts (e.g. US),
pressing `Right Alt + Left Ctrl` will be interpreted as AltGr and will
not trigger `Ctrl+Alt` keybinds. This is an acceptable trade-off to
ensure AltGr layouts can reliably enter characters; users can still
invoke `Ctrl+Alt` keybinds using `Left Alt` or by choosing bindings that
avoid common AltGr pairs.
I based this on https://github.com/zed-industries/zed/pull/36115 after
trying other different approaches, but this one is a bit more specific.
Does this approach make sense, or is slightly breaking US input in favor
of fixing international input a no-go? I think the benefit - being able
to type certain characters _at all_ - outweighs the shortcomings.
Otherwise, there's a way to detect if the keyboard layout uses AltGr or
not, but it's quite hacky, and involves reading the registry to find the
current layout dll's name, opening that dll, manually declaring struct
layouts that it uses, then parsing out the AltGr flag from a function
call result. I don't think that's worth it, but if needed, I can give
that a shot, let me know.
Release Notes:
- windows: Fixed handling of AltGr to avoid keybinds preventing
character input
Reverts zed-industries/zed#39581
This has done its job uncovering incorrect constructions of the
highlight ranges pretty fast. Reverting this to prevent this from
spilling into preview until I can fix the call sites next week
Closes#39007
Strings should be escaped with backticks in PowerShell, so the following
```
\"pwsh.exe -C pytest -m \\\"some_test\\\"\"
```
becomes
```
\"pwsh.exe -C pytest -m `\"some_test`\"\"
```
Otherwise PowerShell will misinterpret the invocation resulting in
weirdness all-around such as the issue linked above.
Release Notes:
- N/A
Follow-up to #39649, possible fix for #39669
This implements an alternate strategy for showing/hiding the agent panel
in response to `disable_ai`. We don't load the panel at all if AI is
disabled at startup, and when the value of `disable_ai` changes, we load
the panel or destroy it as needed.
Release Notes:
- N/A
Closes#39028
Fixed empty lines appearing when collapsing files with diagnostic
messages in the diagnostics panel.
Added a flag to track when processing a `FoldedBuffer` and skip
`Near/Below` blocks (diagnostic messages) that immediately follow it.
This prevents diagnostics from rendering as empty lines when their file
is collapsed.
Before:
<img width="1489" height="429" alt="before"
src="https://github.com/user-attachments/assets/5e233290-1f6e-403c-a6b3-a65107586d01"
/>
After:
<img width="981" height="270" alt="after"
src="https://github.com/user-attachments/assets/a877b651-6b7f-4441-805c-38ea41e73a18"
/>
Release Notes:
- Fixed empty lines when collapsing files with diagnostics in the
diagnostics panel
This PR fixes an issue where scrollbars would overagressively capture
some events, which could lead to clicks being lost in the process. Also
improves how hovering of the parent is detected to lead to less false
positives.
Release Notes:
- Fixed a rare issue where scrollbars would react to and capture events
they should not react to.
Fixes ZED-1NX
This panic could occur when an `bulk_staging` was set to `Some(...)` and
`sort_by_path` was set to `true`.
When setting `sort_by_path: true`, we call `update_visible_entries(...)`
which then checks if `bulk_staging ` is `Some(...)` and calls
`entry_by_path`. That function accesses `entries`, which still consists
of both headers and entries. But the code
(`entry.status_entry().unwrap()`) assumes that there are no headers in
the entry list if `sort_by_path: true`.
```rust
if GitPanelSettings::get_global(cx).sort_by_path {
return self
.entries
.binary_search_by(|entry| entry.status_entry().unwrap().repo_path.cmp(path)) //This unwrap() would panic
.ok();
}
```
This has now been fixed by clearing all the entries when `sort_by_path`
changes, as this is the only case where our assumptions are invalid. I
also added a test which 1) actually tests the sort_by_path logic 2)
ensures that we do not re-introduce this panic in the future.
Release Notes:
- Fixed a panic that could occur when using `sort_by_path: true` in the
git panel
- **paths: Cache away results of static construction of RelPath**
- **agent: Cache away results of converting rules file names into
relpaths**
This PR fixed a regression from relpath PR where we've started doing
more work when working with static (Rel-)Paths.
Release Notes:
- N/A
Prior we only logged the crate in `log_err`, which is not too helpful.
We now assemble the module path from the file system path.
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Before this change the active theme and icon theme were retrofitted onto
the ThemeSettings.
Now they're in their own new global (GlobalTheme::theme(cx) and
GlobalTheme::icon_theme(cx))
This lets us remove cx from the settings traits, and tidy up a few other
things along the way.
Release Notes:
- N/A
Closes#39469Closes#39438Closes#39458
I'm not able to test it, i would appreciate if somebody could do it. I
think this bug was present also for SSH remote projects
Release Notes:
- Fixed an issue where zed bin was not found in remote servers for
askpass
---------
Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>
This fixes a regression in #39557--for the project diff, we rely on
getting an event when a path inside a git repository changes, even if
the git state of the repository didn't change as a result (e.g. a new
modification to a file that already had the "modified" status).
I've also changed this code to send the `UpdateRepository` proto message
even when the git state didn't change, since otherwise we have the same
problem in SSH and collab projects.
Release Notes:
- N/A
The panic happened when a user had a settings file with a buffer line
height custom variant, because the drop-down renderer only took into
account the two named variants.
The fix for this will be creating a custom element that allows a user to
manually input a line height greater than one or select either
Comfortable or Standard.
Release Notes:
- N/A
The font picker from onboarding is a lot friendlier to interact with and
makes it impossible for a user to select an invalid font from the
settings ui.
I also moved the font picker from the onboarding crate to the ui_input
crate
## New Look
<img width="1136" height="812" alt="image"
src="https://github.com/user-attachments/assets/7436682c-6a41-4860-a18b-13e15b8f3f31"
/>
Release Notes:
- N/A
mac_watcher already does this so it would make more sense to also do
this on Windows and it saves ~500-600mb of ram on the chromium project.
This does not improve memory usage on linux because inotify cannot do
recursive directory monitoring
Release Notes:
- N/A
## Summary
Fixes an issue where font features (like ligatures) were not applied to
text under the vim block cursor. The cursor would inherit the font
family from the character at the cursor
position, but would use default font features instead of the editor's
configured font features.
## Changes
- Make the font mutable when rendering the vim block cursor
- Apply the editor's text style font features to the cursor font
This ensures that text under the block cursor renders with the same
visual appearance as the rest of the editor content.
Closes#39471
Release Notes:
- Fixed vim block cursor not respecting font features (like ligatures)
Should close#39428
The working directory of the `wsl.exe` program is set to a Linux path,
which is invalid on the Windows side, causing the terminal to crash. The
first spawn works because there is no active terminal view, allowing a
new shell (which checks for the remote) to be created. I cannot explain
why it works on SSH remote clients, but I may be missing something in
the remote connection implementation.
I don't have a Windows machine to test this, so I would appreciate
someone testing it. 🙏🏼
Release Notes:
- Fixed an issue where WSL terminals could not be splitted
---------
Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>
This PR adds the numeric stepper component to the settings ui and
implements some settings that rely on this component as well.
I also switched {buffer/ui}_font_weight to the `gpui::FontWeight` type
and added a manual implementation of the Schemars trait. This allows Zed
to send min, max, and default information to the JSON LSP when a user is
manually editing the settings file.
The numeric stepper elements added to the settings ui are below:
- ui font size
- ui font weight
- Buffer font size
- Buffer font weight
- Scroll sensitivity
- Fast scroll sensitivity
- Vertical scroll margin
- Horizontal scroll margin
- Inline blame padding
- Inline blame delay
- Inline blame min column
- Unnecessary code fade
- Tab Size
- Hover popover delay
Release Notes:
- N/A
# Why
I have find out that this tool exists by browsing Keymap Editor. I think
it would be nice for its discoverability to show it in the app menus in
Dev builds.
# How
Add "GPUI Inspector" app menu item conditionally for Dev builds only.
Release Notes:
- N/A
# Preview
<img width="1014" height="948" alt="Screenshot 2025-10-01 at 14 36 48"
src="https://github.com/user-attachments/assets/c0409e67-1f4d-44f3-90b3-293ad4fe5c73"
/>
We have unnecessary clones for the fields here as most of the snapshots
contain the others hierarchically.
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Add support for rendering Unicode combining characters (diacritics) in
the terminal's batched text runs.
- Add append_zero_width_chars() to handle combining marks
- Integrate zero-width chars into all batching code paths
- Update cell extras tracking logic
- Add test for combining character rendering
Fixes display of é, ñ, ô and other diacritics.
Closes#39525
Release Notes:
- Fixed: NFD/NFKD normalized text (e.g., é as e + ◌́) not rendering in
integrated terminal
Before:
<img width="874" height="688" alt="SCR-20251004-udnj"
src="https://github.com/user-attachments/assets/8d9f9c9f-dac4-4382-92c2-8b6c1d817abd"
/>
After:
<img width="873" height="686" alt="SCR-20251004-ulsw"
src="https://github.com/user-attachments/assets/fbd5cdc7-fdd6-44dc-8b05-cc425644f1a0"
/>
The editor settings control module was the first prototype of what a
settings UI could look like in Zed, but the code is outdated now and is
no longer used. So this PR removes it for cleanup.
Release Notes:
- N/A
I was looking at the rope implementation and some of the existing bugs
that crash in there, and I ran cargo-mutants to inspect test coverage. I
was motivated by bugs like
https://github.com/zed-industries/zed/issues/38556 but this doesn't fix
it and the bug may well be at a higher layer.
This PR adds coverage for a few functions that aren't tested today. I
didn't find any actual bugs yet.
I can see this tree is pretty sparse on docstrings so if you think these
are too verbose I can take them out or drop the whole PR.
Release Notes:
- N/A
When running flycheck, I've noticed that scrolling starts to lag:
https://github.com/user-attachments/assets/b0bef0a3-ccbd-479d-a385-273398086d38
When checking the trace, it is notable that project panel updates its
entire tree multiple times during flycheck:
<img width="2032" height="1136" alt="image"
src="https://github.com/user-attachments/assets/d1935e77-3b00-4be5-a12a-8a17a9d64202"
/>
[scrolling.trace.zip](https://github.com/user-attachments/files/22710852/scrolling.trace.zip)
Turns out, `target/debug` directory is loaded by Zed (presumably,
reported by langserver as there are sources generated by bindgen and
proto that need to be loaded), and `target/debug/build` directory
received multiple events of a `None` kind for Zed, which trigger the
rescans.
Rework the logic to omit the `None`-kind events in Zed, and to avoid
excessive repo updates if not needed.
Release Notes:
- Improved worktree FS event emits in gitignored directories
---------
Co-authored-by: Cole Miller <cole@zed.dev>
Follow-up: https://github.com/zed-industries/zed/pull/38590
**Note**: this PR contains changes from the [previous
PR](https://github.com/zed-industries/zed/pull/38590), when that PR gets
merged we should see the real changes.
This PR fixes 4 things in order to make:
1. Add html/markdown minifier to remove all the **\t** and **\n**
characters. This is needed as you cannot create new lines with markdown
by just adding an enter to the source file.
2. The event Event::HTML only contained a chunk of the real html for
multiline HTML code. I fixed this by storing the currently watched HTML
inside a buffer and at the end we parse it into the right elements.
Instead of trying to parse a chunck into multiple elements which would
always fail before.
3. Add support for html tables.
4. Fixed panic that occured when table does not have an header.
I also decided to keep the html minifier inside Zed, because making it a
dependency for just a few 100 lines seems to be an overkill. The
original crate had a few cve in their dependencies, so figured this
would be the best.
**Html table support**
<img width="1439" height="801" alt="Screenshot 2025-09-27 at 12 19 07"
src="https://github.com/user-attachments/assets/a884cc6f-cf47-45a2-81fa-91300c7bbf3f"
/>
**Before & after Zed's README (no changes)**
<img width="3440" height="1378" alt="Screenshot 2025-09-27 at 12 34 47"
src="https://github.com/user-attachments/assets/1273b094-fb24-4abd-bffa-56ef3b44670c"
/>
Release Notes:
- Markdown: Added support for html tables
## Problem
When splitting a terminal pane, the new pane opens in the root directory
(`/`) instead of preserving the current working directory of the
original terminal.
For example, when working in `/Users/modestnerd/Developer/Projects/zed`
(my pc) and splitting the terminal pane, the new pane would open in `/`
instead of staying in the current directory.
## Solution
Restructured the fallback logic in
`new_pane_with_cloned_active_terminal` (terminal_panel.rs:452-456) to
ensure `default_working_directory(workspace, cx)` is called as a
fallback even when a terminal view exists but its `working_directory()`
returns `None`.
The fix changes the nested `and_then` to use `or_else` for the fallback,
ensuring the working directory is always properly resolved before
entering the async block.
Release Notes:
- Fixed terminal split pane opening in wrong directory instead of
preserving the current working directory
Fixes a `--release`-only bug in feature-flagged agents where the feature
flag isn't picked up in some situations (unless there was a settings
change to go with it - due to an early return when settings didn't
change).
Release Notes:
- N/A
If we get a `cwd` from ACP (because e.g. `codex-acp` is driving the
terminal rather than our own PTY) then use that to display the `cwd` of
the terminal process.
Release Notes:
- N/A
This only affects `codex-acp` for now.
Not using the PTY in display-only terminals means they don't display the
login prompt (or spurious `%`s) at the end of terminal output
renderings.
Release Notes:
- N/A
The ordering of path-based excerpts in multibuffers regressed with
#38744, because we changed the `path` field of `PathKey` to be a string
(from `std::path::Path`) and used the derived `Ord` implementation,
which doesn't agree with the path-based order of worktree traversals.
This PR fixes that by using `RelPath` for `PathKey`. Instead of using
`File::full_path`, which can be absolute, we always use `File::path` and
distinguish different worktrees using their ID.
Release Notes:
- N/A
---------
Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
This fixes an issue where the outline modal would not work in editors
that had no explicit workspace attached to them.
Release Notes:
- Enabled the outline modal to work in channel notes.
This is the first step to allowing users to type into a numeric stepper
to set its value. This PR makes the numeric stepper take in a generic
type `T` where T: `NumericStepperType`
```rust
pub trait NumericStepperType:
Display
+ Add<Output = Self>
+ Sub<Output = Self>
+ Copy
+ Clone
+ Sized
+ PartialOrd
+ FromStr
+ 'static
{
fn default_format(value: &Self) -> String {
format!("{}", value)
}
fn default_step() -> Self;
fn large_step() -> Self;
fn small_step() -> Self;
fn min_value() -> Self;
fn max_value() -> Self;
}
```
This allows setting of step sizes and min/max values as well as making
the component easier to use.
cc @danilo-leal
Release Notes:
- N/A
---------
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Co-authored-by: Gaauwe Rombouts <mail@grombouts.nl>
Closes https://github.com/zed-industries/zed/issues/39406
Follow up to https://github.com/zed-industries/zed/pull/38726
This PR introduces the `agent_buffer_font_size` setting and renames
`agent_font_size` to `agent_ui_font_size`. This allows whoever wants
`buffer_font_size` and `agent_buffer_font_size` to match, as well as
folks who want a slightly smaller size only in the agent panel (which...
also looks just better by default!).
Release Notes:
- agent: Introduced the `agent_buffer_font_size` setting and renamed
`agent_font_size` to `agent_ui_font_size`, allowing for granular buffer
font size control in the agent panel vs. regular editors.
This PR fixes the JSON schema for the `ExtensionCapabilityContent`.
Having the nested structs in the variants caused the `kind` property to
not be generated properly. Inlining the fields into the variants fixes
this.
Release Notes:
- N/A
This PR adds the ability to control the capabilities granted to
extensions by the extension host via the new
`granted_extension_capabilities` setting.
This setting is a list of the capabilities granted to any extension
running in Zed.
The currently available capabilities are:
- `process:exec` - Grants extensions the ability to invoke commands
using
[`zed_extension_api::process::Command`](https://docs.rs/zed_extension_api/latest/zed_extension_api/process/struct.Command.html)
- `download_file` - Grants extensions the ability to download files
using
[`zed_extension_api::download_file`](https://docs.rs/zed_extension_api/latest/zed_extension_api/fn.download_file.html)
- `npm:install` - Grants extensions the ability to install npm packages
using
[`zed_extension_api::npm_install_package`](https://docs.rs/zed_extension_api/latest/zed_extension_api/fn.npm_install_package.html)
Each of these capabilities has parameters that can be used to customize
the permissions.
For instance, to only allow downloads from GitHub, the `download_file`
capability can specify an allowed `host`:
```json
[
{ "kind": "download_file", "host": "github.com", "path": ["**"] }
]
```
The same capability can also be granted multiple times with different
parameters to build up an allowlist:
```json
[
{ "kind": "download_file", "host": "github.com", "path": ["**"] },
{ "kind": "download_file", "host": "gitlab.com", "path": ["**"] }
]
```
When an extension is not granted a capability, the associated extension
APIs protected by that capability will fail.
For instance, trying to use `zed_extension_api::download_file` when the
`download_file` capability is not granted will result in an error that
will be surfaced by the extension:
```
Language server phpactor:
from extension "PHP" version 0.4.3: failed to download file: capability for download_file https://github.com/phpactor/phpactor/releases/download/2025.07.25.0/phpactor.phar is not granted by the extension host
```
Release Notes:
- Added a `granted_extension_capabilities` setting to control the
capabilities granted to extensions.
Closes#39308
Also fixes a possible bug in `apply_selected_diff_hunks()` caused by
reversed selections.
Release Notes:
- Fixed "editor: fold at level" closing regions containing selections
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
These changes fix an issue with vim's visual block mode when soft
wrapping is enabled. In this situation, if one was to move the cursor
either up or down, the selection would be updated to include visual
(wrapped) rows, instead of only the buffer rows. For example, take the
following contents:
```
1 | And here's a very long line that is wrapping
at this exact point.
2 | And another very long line that is will also
wrap at this exact point.
```
If one was to place the cursor at the start of the first line, character
`A`, trigger visual block mode with `ctrl-v` and then move down one line
with `j`, the selection would end up as (with [X] representing the
selected characters):
```
1 | [A]nd here's a very long line that is wrapping
[a]t this exact point.
2 | [A]nd another very long line that is will also
wrap at this exact point.
```
Instead of the expected:
```
1 | [A]nd here's a very long line that is wrapping
at this exact point.
2 | [A]nd another very long line that is will also
wrap at this exact point.
```
With the changes in this commit, `Vim.visual_block_motion` will now
leverage buffer rows in order to navigate to the next or previous row.
Release Notes:
- Fixed handling of soft wrapped lines in vim's visual block mode
This improves the design of the profile picker a bit by making every
item on it have the same height; it also makes it more consistent with
the model selector.
Release Notes:
- N/A
I'm not sure about the exact conditions for reproducing this issue, but
whenever I build Zed locally and have it open a single-file worktree on
launch, the rust-analyzer language server fails to start up because Zed
attempts to run `rust-analyzer --help` on a path that is not a
directory. This fixes that by running the command on the parent path in
the case of a single-file worktree.
Release Notes:
- Fixed rust-analyzer startup issue in single-file worktrees
Now we use GitHub Releases to detect when there's a new version of
codex-acp out, and we notify the user in the same way we do for the
other external agents.
This also moves `github_download.rs` out of the `languages` crate and
into `http_client`, because now we're not just using it for language
servers anymore, we're also using it for external agents.
Release Notes:
- N/A
---------
Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
Currently most icon theme extensions already support file types like
stories.tsx and stories.svelte. However within Zed itself these file
type overrides are not supported yet. This change adds support for those
Release Notes:
- Added support for icons on file extensions such as stories.tsx and
stories.svelte
This removes a long-standing thing we've done, which is send a `DidSave`
notification to the language server for the clean parts of a
multi-buffer. However, it seems like the intent of that notification is
to tell the language server to reload the file from disk.
As we didn't actually write those files to disk, it seems clearer to not
send this notification; and just remove this whole code-path.
Release Notes:
- Fixed a race where autosave in a multibuffer could cause unsaved
buffers to appear saved
Codex needs (and future projects are anticipated to need as well) a
concept of display-only terminals. This refactors terminals to decouple
the PTY part from the display part, so that we can render terminal
changes based on a series of events - regardless of whether they're
being driven from a PTY inside Zed or from an outside source (e.g.
`codex-acp`).
Release Notes:
- N/A
This was added for Codex, but had undesirable consequences for Claude
Code (on Nightly, never made it to Preview). We're going to address this
in `codex-acp` instead.
Release Notes:
- N/A
This PR adds a `token_spend_in_cents` and associated
`token_spend_in_cents_updated_at` column to the `billing_subscriptions`
table.
Release Notes:
- N/A
Closes#5355
Release Notes:
- Fixed rendering glitches with files with more than 16 million lines
(that occured due to floating number rounding errors).
---------
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Closes #ISSUE
Release Notes:
- settings: Removed support for having format steps in both the
`format_on_save` and `formatter` settings for languages.
`format_on_save` is now restricted to the values of `"on"` and `"off"`,
and all format steps should be set under the `formatter` key. If you
were using `format_on_save` but not `formatter` this will be migrated
for you, otherwise it will require a manual migration.
---------
Co-authored-by: Smit <smit@zed.dev>
When sourcing the project environment for the terminal tool, we will now
do so by spawning the shell specified by the users `terminal.shell`
setting (or as usual fall back to the login shell).
Closes#37687
Release Notes:
- N/A
Closes #ISSUE
Adds the ability to create settings and keymap migrations by mutating
`serde_json::Value`s instead of using tree-sitter queries. This
(hopefully) will make complicated migrations far simpler to implement.
Release Notes:
- N/A *or* Added/Fixed/Improved ...
---------
Co-authored-by: Smit <heysmitbarmase@gmail.com>
Co-authored-by: Smit <smit@zed.dev>
Closes#38571
Release Notes:
- git: Fixed git features not working when git was installed in an
unusual location.
---------
Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
How it looks:
https://github.com/user-attachments/assets/9a355807-5461-4e8d-b7a8-9efb98cea67a
Idea behind this is to reduce flickering in areas where nothing is
happening - whenever these hide, the user is specifically not
interacting with them, hence it can be distracting to have something
flicker in the side of your eye. This PR tackles this.
Release Notes:
- Added graceful autohiding to scrollbars outside of the editor
---------
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Closes#39283
Release Notes:
- Fixed: In multi-repo workspaces, files with the same name are no
longer hidden in the file picker after one is opened
---------
Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>
Closes #ISSUE
Release Notes:
- settings: Changed code action format in `formatter` and
`format_on_save` settings.
**Previous format:**
```
{
"code_actions": {
"source.organizeImports": true,
"source.fixAll": true
}
}
```
**New format:**
```
[
{"code_action": "source.organizeImports"},
{"code_action": "source.fixAll"}
]
```
After #39246, code actions run sequentially in order. The structure now
reflects this and aligns with other formatter options (e.g., language
servers).
Both the `formatter` and `format_on_save` settings will be
auto-migrated.
### Summary
* Auto-activates the active repository when opening a buffer.
* Prepares branching for future support of a user choice (e.g.,
`auto_activate_repo_on_open` flag).
### Release Notes
* **Improved**: Opening a buffer now automatically updates the active
repository.
This pull request adds the missing **`GEMINI.md`** file, which will
serve as the rule/configuration file for **`gemini-cli`**.
Currently, the repository includes several rule files such as
**`.clinerules`**, **`.cursorrules`**, **`.rules`**, and
**`.windsurfrules`**. Adding **`GEMINI.md`** standardizes the
configuration structure and ensures that the specific rules for the
`gemini-cli` are properly documented alongside the others.
Release Notes:
- N/A
Remove the ad-hoc quoting we were doing before, which only works for
POSIX shells, in favor of using `Shell::WithArguments`.
Release Notes:
- N/A
---------
Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
This PR starts the process of adding each setting field manually to
their respective page in the UI and organizes user/project fields as
well. The next major step is implementing a numeric stepper component,
and handling discriminate union enums as well.
I also did some minor polish in this PR as well
- Switches now use accent color
- Fixed text input rendering with zero width
- Made setting pages scrollable
- Set drop down context menu style to outline
Release Notes:
- N/A
---------
Co-authored-by: dino <dinojoaocosta@gmail.com>
In the ACP changes, we changed how terminals are created for the agent,
and so the system prompt was putting in the system shell instead of the
default one, potentially causing confusion for the model.
These are now in sync, so this will hopefully alleviate issues people
were seeing, as well as use a more standard shell to increase the
likelihood of successful model tool calls.
Release Notes:
- agent: Align default shell path in system prompt with the actual path
it is given
Fixes titlebar double-click behavior to properly handle the macOS system
setting when "Do Nothing" is selected in System Settings > Desktop &
Dock > "Double-click a window's title bar to".
Closes https://github.com/zed-industries/zed/issues/39102
Release Notes:
- Fixed macOS Do Nothing window double click setting not being
respected.
Closes #ISSUE
Release Notes:
- project panel: Revamped how project panel entries are refreshed, which
should lead to a significantly smoother experience when working in large
projects.
---------
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Thanks to @Zertsov for #37932 which caused me to consider this
implementation approach.
One known issue with this is that it will not wait for actions that do
async work to complete. Supporting this would require quite a lot of
code change. It also doesn't affect the main usecase of sequencing
editor actions, since few are async.
Another caveat is that this is implemented as an action handler on
workspace and so won't work in other types of windows. This seems fine
for now, since action sequences don't seem useful in other window types.
The command palette isn't accessible in non-workspace windows.
Alternatives considered:
* Add `cx: &App` to `Action::build`. This would allow removal of the
special case in keymap parsing. Decided not to do this, since ideally
`build` is a pure function of the input json.
* Build it more directly into GPUI. The main advantage of this would be
the potential to handle non-workspace windows. Since it's possible to do
outside of GPUI, seems better to do so. While some aspects of the GPUI
action system are pretty directly informed by the specifics of Zed's
keymap files, it seems to avoid this as much as possible.
* Bake it more directly into keymap syntax like in #37932. While I think
it would be good for this to be a primitive in the JSON syntax, it seems
like it would better fit in a more comprehensive change to provide
better JSON structure. So in the meantime it seems better to keep the
structure the same and just add a new action.
- Another reason to not bake it in yet is that this provides a place to
document the caveat about async actions.
Closes#17710
Release Notes:
- Added support for action sequences in keymaps. Example:
`["action::Sequence", [ ["editor::SelectLargerSyntaxNode",
"editor::Copy", "editor::UndoSelection"]`
---------
Co-authored-by: Mitchel Vostrez <mitch@voz.dev>
Closes#39318
The rules panel on the rules library window was rendering a black
background when the `panel.background` property on the active theme had
some level of transparency (for example `1917264D` on `nightfox` theme).
<img width="1650" height="889" alt="image"
src="https://github.com/user-attachments/assets/6a8d124a-38da-4d01-817a-c289926bd39c"
/>
Left is before, right is after. The bug can be replicated by using
`theme_overrides` on settings:
```json
"experimental.theme_overrides": {
"panel.background": "#00000000",
"background": "#ffffff"
},
```
Release Notes:
- Fix "secondary" background on rules panel
These are now being crafted by hand, using the social media content we
do each Wednesday. I'm keeping the action around because we may want to
use this to automate publishing the hand-crafted emails in the future.
Release Notes:
- N/A
Removes the preview note of the `buffer_font_size` used for agent panel
buffers, now that's available in stable as of 206.6. Also ended up
removing the "available in agent settings UI" thing because... that will
very soon not be needed to be called out.
Release Notes:
- N/A
Closes#24412 and #19471
I tested both insertion and replacing with o3-mini and it failed with
the current prompt. With the updated prompt it does no longer return
`<document><rewrite_this>` or `{{REWRITTEN_CODE}}`
I have ensured the LLM Worker works with these prompt changes.
Release Notes:
- Improved prompting for the inline assistant
This removes a hack from `MultiBuffer::anchor_at` that works around
missing logic for handling `ExcerptId::max()` by implementing that said
missing logic.
Generally, `ExcerptId::min()` is already being handled correctly due to
how `Cursor` seeking works, we tend to seek to or beyond a seek target,
meaning `min` will always match the first excerpt as expected. `max` on
the other hand will always seek beyond the last excerpt resulting in no
excerpt being found, so any code path dealing with the excerpt sumtree
will have to specially check for this special excerpt ID to work
correctly.
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Fixes titlebar double-click behavior to properly handle the macOS system
setting when "Do Nothing" is selected in System Settings > Desktop &
Dock > "Double-click a window's title bar to".
Closes#39102
Release Notes:
- Fixed macOS `Do Nothing` window double click setting not be respected
Before this change, it would save every buffer and wait for diagnostics.
For rust analyzer this would cause a lot of rechecking and greatly slow
down the analysis
Release Notes:
- N/A
Co-authored-by: Agus <agus@zed.dev>
Closes#39112
Release Notes:
- Fixed an issue when using code actions on format where specifying
multiple code actions in the same code actions block that resolved to
code actions from different language servers could result in conflicting
edits being applied and mangled buffer text.
@ConradIrwin No longer needed the issue appears to be fully resolved
after moving to MacOS Tahoe as the latest instead of only in dev beta
Release Notes:
- N/A
This happened when search results completely filtered out a page above
the selected page index.
The old index was calculated based on the nav bar entry's position and
the count of root entries above it, this was wrong because root entries
could be filtered out with a search. Now the page index is saved when
building the navbar
Release Notes:
- N/A
Get a basic search implementation working in the settings ui and fix nav
bar toggling bugs.
Search functionality works by passing in each page and its items into
our fuzzy search crate and filtering out any non-matches. A page is a
match if any of its items are a match and an item is a match if its
title or description has a fuzzy score greater than zero.
In the future, a page section header will be filtered out if none of its
children has a match or it will show all its children on a match. The
team still has to decide what to do in that edge case, but that's the
last step until search is fully implemented for our initial launch.
Finally, I found some bugs in our nav bar toggling that occurred because
we weren't taking into account the index change that occurred when
toggling an element with children that is above the selected nav bar
entry. I added tests to cover those edge cases as well.
Release Notes:
- N/A
---------
Co-authored-by: Ben Kunkle <ben@zed.dev>
We've seen this panic come up in the last two weeks, which might be
caused by #33592. However, we are not sure what paths can cause this
`unwrap()` to fail. Therefore adding some logging around this, so that
the next time someone opens a bug report we can further diagnose the
issue.
Fixes ZED-1F6
Release Notes:
- Fixed an issue where Zed could crash when including specific paths in
a global `.gitignore` files
The bug happened because the Python locator was checking for a quote
before the ZED task variable. Removing that part of the check fixed the
issue.
Closes#39179
Release Notes:
- Fix Python debug tasks not showing up in code actions or debug picker
Closes #ISSUE
Adds a couple functions to the `SettingsStore`:
- `get_value_from_file`: Gets a value from a given settings file
(`Local`, `User`, etc) and if the value isn't found in the requested
file, walks the known settings files in the order in which they are
merged to find the settings value in lower precedence settings files
(i.e. if value not set anywhere will always return default value)
- `get_overrides_for_field`: Returns a list of settings files where a
given setting is set that have higher precedence than the passed in
file. e.g. passing in user will result in project settings files where
the value is set being returned.
Additionally changes the default for the `project_name` setting to
uphold the rules we are attempting to enforce on the settings, namely:
- All settings fields should be of the form `Option<T>`
- `None` (or `null` in JSON) should never be a meaningful value
Follow up PRs will handle implementing a function to write to an
arbitrary settings file, and passing through metadata to the above
functions to control how overrides are determined for more complicated
cases like `SaturatingBool` (`disable_ai`) and `ExtendingVec`
Release Notes:
- N/A *or* Added/Fixed/Improved ...
---------
Co-authored-by: Ben Kunkle <ben@zed.dev>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Anthony <anthony@zed.dev>
There was an issue with login after the migration to the new anthropic
package. This makes sure folks are migrated to a known working version
(though the latest version also now works on old versions)
Release Notes:
- N/A
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
I don't totally follow how the `cmd_click_reveal_task` function works,
but it branches on whether `self.hovered_link_state` exists and contains
any links, and in case it doesn't, it doesn't use `modifiers.alt` for
deciding where to navigate. This PR addresses that.
The problem I've been having is that cmd-alt-click sometimes behaves as
cmd-click, i.e. it navigates to the definition in the current pane. This
appears to happen whenever I cmd-alt-click while the symbol I'm hovering
over isn't underlined, possibly when I click too quickly?
An alternative way to reliably reproduce this is to cmd-alt-click on a
symbol without letting go of cmd and alt and without moving the cursor.
Now the symbol is no longer underlined (and the hover preview has
disappeared as well), so clicking again (while still holding cmd and
alt) goes to the definition in the current pane:
https://github.com/user-attachments/assets/34003e01-fd95-4741-8a7d-6240d1c5a495
Release notes:
- Fixed a bug that caused cmd-alt-click to sometimes go to the
definition in the current pane
Co-authored-by: Joseph T. Lyons <JosephTLyons@gmail.com>
Closes https://github.com/zed-industries/zed/issues/39183
This PR adds UI improvements to clarify the concept of "default rules"
and how they separate from regular rules. This is mostly motivated by
the issue linked above, where it clarified that the star icon was
communicating a "favoriting" affordance, which is not correct with how
rules work in Zed. When you tag/attach a rule as default, it will always
be included in every prompt, together with the agent's system prompt and
project rules (if they exist).
Hopefully, this will make understanding better. Here's how it looks like
now?
https://github.com/user-attachments/assets/435d3af7-e8a6-4646-8f00-94a409bd5f42
Release Notes:
- Improve rules library UI to better communicate the concept of default
rules vs. regular rules.
Despite how great `cmd-d` as a keybinding is, that was not working as it
was conflicting with an editor keybinding:
https://github.com/user-attachments/assets/2ea8665b-7008-4f0a-9426-8d31d379ee1c
This PR changes it to `cmd-alt-z`, which is the best "remove/fix"-type
of keybinding I could find that doesn't conflict with anything else.
Ideally, we'd use either the D, N, or R letters for "deny", "no", and
"reject", but unfortunately, none of them are nicely available in this
context...
Release Notes:
- agent: Fix keybinding to deny running a command
Before we would notify the user even if the download failed. We also
we're overwriting the directory, which means a user could be stuck in a
loop if a previous download failed
Release Notes:
- acp: Fix user seeing update prompt in a loop because of a previous
failed download
Closes#34393
Currently, we’re using `zed.exe --askpass` kind of like an `nc`
substitute, it prints out the SSH password to stdout with something like
`println!("user-pwd")`. `ssh.exe` then reads the password from stdout so
it can establish the connection.
The problem is that in release builds we set `subsystem=windows` to
avoid Windows spawning a black console window by default. The side
effect is that `zed.exe` no longer has a stdout, so `ssh.exe` can’t read
the password.
Through testing, I confirmed that neither allocating a new console for
`zed.exe` nor attaching it to the parent process’s stdout resolves the
issue. As a result, this PR updates the implementation to use `cli.exe
--askpass` instead.
TODO:
- [ ] Check that the `cli` path is correct on macOS
- [ ] Check that the `cli` path is correct on Linux
Release Notes:
- N/A
---------
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
This PR is a follow-up to #39090 and addresses two issues:
* Moves `conpty.dll` and `OpenConsole.exe` out of the `bin` folder to
prevent other programs from using them.
* Updates these files only after Zed exits, avoiding update failures due
to file locks.
Release Notes:
- N/A
---------
Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
The state of the child bounds is not up-to-date when `scroll_to_item`
gets triggered, causing the new tab to not scroll completely into view.
Closes#36317
Release Notes:
- Fix an issue where a new tab is only partially visible on creation.
Update the list of supported options in vim mode so that the following
are now available:
- `:set ignorecase`
- `:set noignorecase`
- `:set ic`
- `:set noic`
This controls whether the case-sensitive search option is disabled or
enabled when using the buffer and project searches, with `ignorecase`
disabling the search option and `noignorecase` enabling it.
Release Notes:
- Added support for `:set ignorecase` and `:set noignorecase` in vim
mode
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Also skips indexing files that don't have a suffix that indicates a
known language, and skips when the language doesn't have an outline
grammar.
Release Notes:
- N/A
---------
Co-authored-by: Agus <agus@zed.dev>
Closes#10930Closes#11353
Release Notes:
- Adds commands to project_panel
- `ctrl-u` scrolls the project_panel up half of the visible entries
- `ctrl-d` scrolls the project_panel down half of the visible entries
- `z z` scrolls current selection to center of window
- `z t` scrolls current selection to top of window
- `z b` scrolls current selection to bottom of window
- `{num} j` and `{num} k` now move up and down with a count
Add the single word "Locally" to clarify where the info is coming from,
(and that you don't need to be online.)
Closes #ISSUE
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Since 2021 Neovim remaps Y to $y (1). DO the same in zed through a new action `YankToEndOfLine`.
1: https://github.com/neovim/neovim/pull/13268
Release Notes:
- Added vim::YankToEndOfLine action which copies from the cursor to the end of the line excluding the newline. We bind it to Y by default in the vim keymap.
Closes#22657Closes#37863
# Background
Several users have noted that the terminal shipped with Zed on Windows
is either misbehaving or missing several features including lack of
consistent clearing behaviour. After some investigation which included
digging into the Microsoft Terminal project and VSCode editor, it turns
out that the pseudoconsole provided by Windows OS is severely outdated
which manifests itself in problems such as lack of clearing behaviour,
etc. Interestingly however, neither MS Terminal nor VSCode exhibit this
limitation so the question was why. Enter custom `conpty.dll` and
`OpenConsole.exe` runtime. These are updated, developed in MS Terminal
tree subprojects that aim to replace native Windows API as well as
augment the `conhost.exe` process that runs by default in Windows. They
also fix all the woes we had with the terminal on Windows (there is a
chance that ctrl-c behaviour is also fixed with these, but still need to
double check that this is indeed the case). This PR ensures that Zed
also benefits from the update pseudoconsole API.
# Proposed approach
It is possible to fork MS Terminal and instrument the necessary
subprojects for Rust-awareness (using `cc-rs` or otherwise to compile
the C++ code and then embed it in Rust-produced binaries for easier
inclusion in projects) but it comes at a cost of added complexity,
maintenance burden, etc. An alternative approach was proposed by
@reflectronic to download the binary from the official Nuget repo and
bundle it for release/local use. This PR aims to do just that.
There are two bits to this PR:
1. ~~when building Zed locally, and more specifically, when the `zed`
crate is being built, we will strive to download and unpack the binaries
into `OUT_DIR` provided by `cargo`. We will then set
`ZED_CONPTY_INSTALL_PATH=${OUT_DIR}/conpty` and use it at runtime in Zed
binary to tweak the loader's search path with that additional path. This
effectively ensures that Zed built from source on Windows has full
terminal support.~~ EDIT: after several discussions offline, we've
decided that keeping it minimal will serve us best, meaning: when
developing locally it is up to the developer of Zed to install
`conpty.dll` and put it in the loader's search path.
2. when bundling Windows release, we will download and unpack the nuget
package into Zed's bundle which will ensure it is installed in the same
directory as Zed by the installer.
**Note** I realise that 1. may actually not be needed - instead we could
leave that bit for the user who wants to run Zed from source to ensure
that they have `conpty.dll` in the loader's search path. I'd love to
hear opinions on this!
Release Notes:
- N/A
---------
Co-authored-by: Cole Miller <cole@zed.dev>
Fixes two inconsistencies around the behavior of cmd-alt-click that mess
with my VSCode muscle memory:
- The definition is opened in a pane to the right of the current pane,
unless there exists an adjacent pane to the left and not to the right,
in which case it's opened in the pane on the left
- In case Go to Definition needs to open a multibuffer, cmd-alt-click
does not open it in an existing pane to the right of the current pane,
it always creates a new pane directly to the right of the current pane
This PR irons out this behavior by always going to the definition in the
pane directly to the right of the current one, creating one only if one
doesn't yet exist.
If changing `Workspace::adjacent_pane` to not consider an existing pane
to the left is undesirable then that logic could be moved somewhere
else, or we can make it user configurable if necessary. Also happy to
split this PR up if either of these changes is controversial 🙂
Before:
https://github.com/user-attachments/assets/395754cd-6ecb-40bf-ae61-ee8903eed4ae
After:
https://github.com/user-attachments/assets/002797b1-51a7-48e5-a8d0-100d3a5049eb
Release Notes:
- Made the behavior of cmd-alt-click more consistent
---------
Co-authored-by: Joseph T. Lyons <JosephTLyons@gmail.com>
This is a follow up to #37510 and is also related to #38910.
Release Notes:
- Improved ordering of virtual environments, sort by distance to
worktree root.
I was trying to use the new user toolchains but every time I clicked on
one I had added, it would delete it from the picker. Ironically, it
wouldn't delete it permanently when I tried to by clicking on the trash
can icon. Every time I reopened the workspace all user toolchains were
there.
Release Notes:
- Fixed selecting and deleting user toolchains.
This allows to filter by main zed binary or remote server crashes, as
well as easily tell whether a crash happened in a remote-server binary
or not.
Release Notes:
- N/A
Previously, search results were sorted solely by candidate_id
(preserving original order from the database), which could result in
less relevant matches appearing before better ones.
This change sorts results primarily by fuzzy match score (descending),
with candidate_id as a tiebreaker for equal scores. This ensures that
better matches appear first while preserving recency order among items
with identical scores.
Example improvement:
- Searching for 'pica' will now rank 'picabo' higher than scattered
matches like 'project-api, project-chat'
- Consecutive character matches are prioritized over scattered matches
across multiple path segments
Release Notes:
- Improved project search relevance by ranking results using match score
instead of insertion order.
Replaces the use of Rodio's basic linear resampler with an fft based
resampler from the rubato crate. As we are down-sampling to the minimal
(transparent) sample rate for human speech (16kHz) any down-sampling
artifact will be noticeable.
This also refactors the rodio_ext module into sub-models as it was
getting quite long.
Release Notes:
- N/A
Closes https://github.com/zed-industries/zed/issues/38643
This PR adds some UI improvements to the Zed replacement of the system
dialog/prompt, including better visibility of which button is currently
focused.
One little design note, though: because of a current (and somewhat
annoying) constraint of button component, where we're only drawing a
border when its style is outlined, if I kept them horizontally stacked,
there'd be a little layout shift now that I'm toggling styles for better
focus visibility. So, for this reason, I changed them to be vertically
stacked, which matches the macOS design and avoids this problem. Maybe
in the future, we'll revert it back to being `flex_row` because that
ultimately consumes less space.
https://github.com/user-attachments/assets/500c840b-6b56-4c0c-b56a-535939398a7b
Release Notes:
- Improve focus visibility of the actions within Zed's UI system prompt.
Since https://github.com/zed-industries/zed/pull/36219 we now render
inlay hints as bold due to this.
Release Notes:
- N/A *or* Added/Fixed/Improved ...
- The fork with the patch is now included in 0.25.0
(7ff26dacd7).
- We no longer need `except*` as a keyword, which was added in
https://github.com/zed-industries/zed/pull/21389. It now highlights
correctly without explicitly mentioning it after
1b1ca93298.
Release Notes:
- N/A
After the change, we can add "supports_images", "supports_tools" and
"parallel_tool_calls" properties to set up new models. Our
`settings.json` will be as follows:
```json
"language_models": {
"x_ai": {
"api_url": "https://api.x.ai/v1",
"available_models": [
{
"name": "grok-4-fast-reasoning",
"display_name": "Grok 4 Fast Reasoning",
"max_tokens": 2000000,
"max_output_tokens": 64000,
"supports_tools": true,
"parallel_tool_calls": true,
},
{
"name": "grok-4-fast-non-reasoning",
"display_name": "Grok 4 Fast Non-Reasoning",
"max_tokens": 2000000,
"max_output_tokens": 64000,
"supports_images": true,
}
]
}
}
```
Closes https://github.com/zed-industries/zed/issues/38752
Release Notes:
- xAI: Added support for for configuring tool and image support for
custom model configurations
Since we might run MCP servers locally for an agent, we don't want to
use the proxy for those.
We set this if the user has set a proxy, but not a custom NO_PROXY env
var.
Closes#38839
Release Notes:
- acp: Don't run local mcp servers through proxy, if set
Using `crate::command::new_smol_command` on the Windows platform will
not display the PowerShell window.
Closes#39052
Release Notes:
- N/A
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Fixes the "failed to get working directory environment for repository"
error on Windows by implementing proper shell environment variable
capture.
Release Notes:
- Fixed failed to get working directory environment for repository
---------
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Release Notes:
- collab: A distinct sound effect is now used for when a guest joins a
call.
- collab: Fixed the "joined" sound being excessively loud when joining a
call that already has many participants.
---------
Co-authored-by: David Kleingeld <davidsk@zed.dev>
⚠️ Don't merge until Zed 0.205.x is on stable ⚠️
See https://github.com/zed-industries/zed/pull/37811
This PR updates the HTML extension, bumping the zed extension API to the
latest version, which removes the need to work around a bug where
`current_dir()` returned an invalid path on windows.
Release Notes:
- N/A
The edit prediction button menu was displaying stale authentication
status due to capturing the Copilot status in a closure. After signing
out, the menu would still show "Sign Out" instead of "Sign In to
Copilot".
This change fixes the issue by reading the current Copilot status each
time the menu is displayed, ensuring the menu options are always
accurate.
Release Notes:
- Fixed Copilot AI menu not updating after sign out
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
i'm testing out zed, coming from emacs, and so i'm trying out the base
keymap for it. i noticed though that zed's default git keybindings don't
work when the gitpanel is open though, because of the top-level binding
of `ctrl-g` to cancel. my expectation is that the emacs-like keybindings
would work insofar as they don't clobber zed's defaults (which would
take precedence), but obviously i'll defer to others on this!
another option could be to use the `C-x v` keymap prefix that the emacs
built-in `vc` package uses, but it doesn't contain the same set of
bindings for git commands that zed has.
This reverts commit 1bbf98aea6.
We found that #38411 caused problems where anonymous functions are
included too many times in the outline. We'd like to figure out a better
fix before shipping this to stable.
Fixes#38956
Release Notes:
- (preview only) revert changes to outline view
Follows on from
https://github.com/zed-industries/zed/pull/37717#discussion_r2376739687
@dvdsk suggested this but I didn't get to it in the previous PR.
# Tested
```
; sudo rm /usr/local/bin/wild
; ./script/install-wild
Downloading from https://github.com/davidlattimore/wild/releases/download/0.6.0/wild-linker-0.6.0-x86_64-unknown-linux-gnu.tar.gz
Wild is installed to /usr/local/bin/wild
To make it your default, add or merge these lines into your ~/.cargo/config.toml:
[target.x86_64-unknown-linux-gnu]
linker = "clang"
rustflags = ["-C", "link-arg=--ld-path=wild"]
[target.aarch64-unknown-linux-gnu]
linker = "clang"
rustflags = ["-C", "link-arg=--ld-path=wild"]
```
```
; sudo rm /usr/local/bin/mold
; ./script/install-mold 2.34.0
Downloading from https://github.com/rui314/mold/releases/download/v2.34.0/mold-2.34.0-x86_64-linux.tar.gz
Mold is installed to /usr/local/bin/mold
To make it your default, add or merge these lines into your ~/.cargo/config.toml:
[target.'cfg(target_os = "linux")']
linker = "clang"
rustflags = ["-C", "link-arg=-fuse-ld=mold"]
```
Release Notes:
- N/A
# Why
I have recently corrected this tooltip content for macOS, but recently
have learnt that keystroke to text helpers already exist in the
codebase.
# How
Replace hardcoded keystroke for Excerpt Fold Toggle in Uncommitted
Changes tab.
> [!important]
> Should be merged after #38969 and #38971, otherwise it would be a
regression on macOS.
Release Notes:
- N/A
# Preview (stacked on mentioned above PRs)
<img width="618" height="248" alt="Screenshot 2025-09-26 at 17 43 53"
src="https://github.com/user-attachments/assets/cdc7fb74-e1d8-4a59-b847-8a8d2edd4641"
/>
# Why
Refs:
* #38969
When working on the PR above I have spotted that keybinding to text
helpers incorrectly detects if Vim mode is enabled.
# How
Replace inline check with an existing `KeyBinding::is_vim_mode` method
in keybinding text helpers.
Release Notes:
- Fixed incorrect Vim mode detection in UI keybinding to text helpers.
# Test plan
Made sure that when Vim mode is not specified in settings file it
resolves to `false`, and correct keybindings are displayed, than I have
added the `"vim_mode": true,` line to my settings file and made sure
that keybindings text have changed accordingly.
### Before
<img width="712" height="264" alt="Screenshot 2025-09-26 at 16 57 08"
src="https://github.com/user-attachments/assets/62bc24bd-c335-420f-9c2e-3690031518c1"
/>
### After
<img width="712" height="264" alt="Screenshot 2025-09-26 at 17 13 50"
src="https://github.com/user-attachments/assets/e0088897-eb6b-4d7b-855a-931adcc15fe8"
/>
Closes #ISSUE
Improves the efficiency of our interactions with the Zed language
server. Previously, on startup and after every workspace configuration
changed notification, we would send >1MB of JSON Schemas to the JSON
LSP. The only reason this had to happen was due to the case where an
extension was installed that would result in a change to the JSON schema
for settings (i.e. added language, theme, etc).
This PR changes the behavior to use the URI LSP extensions of
`vscode-json-language-server` in order to send the server URI's that it
can then use to fetch the schemas as needed (i.e. the settings schema is
only generated and sent when `settings.json` is opened. This brings the
JSON we send to on startup and after every workspace configuration
changed notification down to a couple of KB.
Additionally, using another LSP extension request we can notify the
server when a schema has changed using the URI as a key, so we no longer
have to send a workspace configuration changed notification, and the
schema contents will only be re-requested and regenerated if the schema
is in use.
Release Notes:
- Improved the efficiency of communication with the builtin JSON LSP.
JSON Schemas are no longer sent to the JSON language server in their
full form. If you wish to view a builtin JSON schema in the language
server info tab of the language server logs (`dev: open language server
logs`), you must now use the `editor: open url` action with your cursor
over the URL that is sent to the server.
- Made it so that Zed urls (`zed://...`) are resolved locally when
opened within the editor instead of being resolved through the OS. Users
who could not previously open `zed://*` URLs in the editor can now do so
by pasting the link into a buffer and using the `editor: open url`
action (please open an issue if this is the case for you!).
---------
Co-authored-by: Michael <michael@zed.dev>
std commands can block for an arbitrary duration and so runs risk of
blocking tasks for too long. This replaces all such uses where sensible
with async processes.
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Wild changed in 0.6.0 to using gzip rather than xz, and changed the
format of the package name.
Follows on from and fixes
https://github.com/zed-industries/zed/pull/37717
cc @dvdsk @mati865
Release Notes:
- N/A
This PR adds an `x-zed-client-supports-x-ai` header to the `GET /models`
request sent to Cloud to indicate that the client supports xAI models.
Release Notes:
- N/A
Make `resolve_full_path` use the appropriate separators, and return a
`String`.
As part of fixing the fallout from that type change, this also fixes a
bunch of places in the agent code that were using `std::path::Path`
operations on paths that could be non-local, by changing them to operate
instead on strings and use the project's `PathStyle`.
This clears the way a bit for making `full_path` also return a string
instead of a `PathBuf`, but I've left that for a follow-up.
Release Notes:
- N/A
Closes#38553
Release Notes:
- Fixed wrong AssetKind specified on linux for ty
As discussed in the linked issue. All of the non windows assets for ty
are `tar.gz` files. This change applies that fix.
Release Notes:
- When `helix_mode = true`, modes are called without the `HELIX_` prefix
in the UI:
`HELIX_NORMAL` becomes `NORMAL`
`HELIX_SELECT` becomes `SELECT`
- (breaking change) Helix users should remove `"default_mode":
"helix_normal"` from their settings. This is now the default when
`"helix_mode": true`.
Release Notes:
- Fixed editor inlay hints incorrectly using status theming when syntax
theming is available
Previously, a theme's `style.syntax.hint` object is completely ignored,
and `style.hint` `style.hint.background` are used instead. However,
these seem to be related to status hints, such as the inline git blame
integration.
For syntax hints (as given by an LSP), the reasonable assumption would
be that the `style.syntax.hint` object is used instead, but it isn't.
This means that defining other style characteristics (`font_style`, for
example) does nothing.
I've fixed the issue in a backward-compatible way, by using the theme
`syntax` `HighlightStyle` as the base for inlay hint styling, and
falling back to the original `status` colors should the syntax object
not contain the color definitions.
With the following theme settings:
```jsonc
{
"hint": "#ff00ff", // Status hints (git blame, etc.)
"hint.background": "#ff00ff10",
"syntax": {
"hint": {
"color": "#ffffff", // LSP inlay hints
"background_color": "#ffffff10",
"font_style": "italic", // Now properly applied
"font_weight": 700
}
}
}
```
Current behavior:
<img width="896" height="201" alt="image"
src="https://github.com/user-attachments/assets/e89d212f-ed7e-4d27-94e4-96d716e229d2"
/>
Italics and font weight are ignored. Uses status colors instead.
Fixed behavior:
<img width="896" height="202" alt="image"
src="https://github.com/user-attachments/assets/f14ed2c3-bb60-4b74-886d-6b409d338714"
/>
Italics and font weight are used properly. Status color is preserved for
the git blame status, but correct syntax colors are used for the inlay
hints.
Closes#38620
`Url::from_file_path` and `Url::from_directory_path` assume the path
style of the target they were compiled for, so we can't use them in
general. So, switch from `file://` to encoding the absolute path (for
mentions that have one) as a query parameter, which works no matter the
platforms. We'll still parse the old `file://` mention URIs for
compatibility with thread history.
Release Notes:
- windows: Fixed a crash when using `@mentions` in agent threads when
remoting from Windows to Linux or WSL.
Tracing terminal events can now be enabled using typical `RUST_LOG`
invocation:
```
RUST_LOG=info,terminal=trace,alacritty_terminal=trace cargo run
```
Release Notes:
- N/A
This allows ITERATIONS and SEED environment variables to override the
hard coded values during testing.
cc @ConradIrwin @as-cii
Release Notes:
- N/A
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
# Why
I have spotted that Keymap Editor filter input (editor) is misaligned
vertically.
# How
Switch the input wrapper to flex layout, use `items_center` to align
editor vertically in center of the wrapper.
Release Notes:
- Fixed Keymap Editor filter input alignment
# Test plan
I have tested the change locally and compared the UI before and after,
to make sure that change does not affect the size of the wrapper
element.
### Before
<img width="1622" height="428" alt="Screenshot 2025-09-25 at 18 18 59"
src="https://github.com/user-attachments/assets/7d09be5c-6caf-4873-8ecf-2542851cb40a"
/>
### After
<img width="1622" height="428" alt="Screenshot 2025-09-25 at 18 07 18"
src="https://github.com/user-attachments/assets/540fcb3e-691d-4fb7-8130-2ed45ddc0adc"
/>
This is how `ctrl-n` works on macOS. Right now `ctrl-n` on Windows with
the default keymap usually causes a new buffer to open, which is
inconvenient.
Release Notes:
- N/A
BusyBox's off brand `wget` does not have support for the `--method`
argument, which makes `zed` incapable of downloading the remote server
unless the _☙authentic❧_ one is installed. Removing this should fix the
issue. Couldn't find much about guidelines on how the code is supposed
to be formatted, so I opted for commenting the line out with an
explanation.
Closes#38712
Release Notes:
- Fixed remote development on BusyBox
This reverts commit ed7bd5a8ed.
We noticed this PR causes the editor to hang if you hold down any of the
menu item actions like ctrl+z, ctrl+x, etc
Release Notes:
- Fixed macOS menu item actions hanging the editor when their key
combination is held down
Uses the previously merged denoising crate (and fixes a bug in it that
snug in during refactoring) to add denoising to the microphone input.
Adds automatic volume control for microphone and output.
Prepares for migrating to 16kHz SR mono:
The experimental audio path now picks the samplerate and channel count depending on a setting. It can handle incoming streams with both the current (future legacy) and new samplerate & channel count. These are url-encoded into the livekit track name
Release Notes:
- N/A
There's a mismatch between the URL used here and the one that's referred
to in `build_zed_cloud_url`, which prevents using the script on Windows.
A previous PR changed the script to use `127.0.0.1` instead of
`localhost` because of supposed URL parsing issues, but we were unable
to reproduce those.
Release Notes:
- N/A
- Map path lookup and internal failures to acp::Error
- Return INVALID_PARAMS for reads beyond EOF
Release Notes:
- acp: Return more informative error types from `read_text_file` to
agents
This now uses the default zed icon for file associations as our own icon
svgs are black/white shapes which are not suitable to set as an icon in
a file explorer.
Closes#36286
Release Notes:
- N/A
Inspired by the recent anchor assertions, this asserts that the produced
selections are always ordered at various resolutions stages, this is an
invariant within `SelectionsCollection` but something breaks it
somewhere causing us to seek cursors backwards which panics.
Related to ZED-13X
Release Notes:
- N/A
The previous validation was too strict and didn't permit reading empty
files.
Addresses: https://github.com/google-gemini/gemini-cli/issues/9280
Release Notes:
- acp: Fix `read_text_file` returning errors for empty files
# Summary
Today, Zed uses Mold on Linux, but Wild can be significantly faster.
On my machine, Wild is 14% faster at a whole-tree clean build, 20%
faster on an incremental build with a minimal change, and makes no
measurable effect on runtime performance of tests.
However, Wild's page says it's not yet ready for production, so it seems
to early to switch for production and CI builds.
This PR keeps using Mold in CI and lets developers choose in their own
config what linker to use. (The downside of this is that after landing
this change, developers will have to do some local config or it will
fall back to the default linker which may be slower.)
[Wild 0.6 is out, and their announcement has some
benchmarks](https://davidlattimore.github.io/posts/2025/09/23/wild-update-0.6.0.html).
cc @davidlattimore from Wild, just fyi
# Tasks
- [x] Measure Wild build, incremental build, and runtime performance in
different scenarios
- [x] Remove the Linux linker config from `.cargo/config.toml` in the
tree
- [x] Test rope benchmarks etc
- [x] Set the linker to Mold in CI
- [x] Add instructions to use Wild or Mold into `linux.md`
- [x] Add a script to download Wild
- [x] Measure binary size
- [x] Recommend Wild from `scripts/linux`
# Benchmarks
| | wild 0.6 (rust 1.89) | mold 2.37.1 (1.89) | lld (rust 1.90) | wild
advantage |
| -- | -- | -- | -- | -- |
| clean workspace build | 176s | 184s | 182s | 5% faster than mold |
| nextest run workspace after build | 137s | 142s | 137s | in the noise?
|
| incremental rebuild | 3.9s | 5.0s | 6.6s | 22% faster than mold |
I didn't observe any apparent significant change in runtime performance
or binary size, or in the in-tree microbenchmarks.
Release Notes:
- N/A
---------
Co-authored-by: Mateusz Mikuła <oss@mateuszmikula.dev>
# Why
In Git Panel, it felt to me that repo and branch separator can be
slightly demphasized (since it is not-interactable) and separated a bit
more from the repo and branch popover triggers.
# How
Use `icon_muted` color for the separator (happy to know if this is an
abuse of the UI styleguide 😄), add one pixel horizontal spacing around
the `/` character.
Release Notes:
- Improved appearance of repo and branch separator in Git Commit Panel
# Test plan
I have tested the change locally and compared the UI before and after to
make sure it feels right.
### Before
<img width="466" height="196" alt="Screenshot 2025-09-18 at 20 25 46"
src="https://github.com/user-attachments/assets/7bfcd1a4-8d16-4e75-8660-9cbfa3952848"
/>
### After
<img width="466" height="196" alt="Screenshot 2025-09-18 at 20 25 12"
src="https://github.com/user-attachments/assets/100d3599-ecc6-473f-b270-a71005b41494"
/>
---------
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Added blank line in front of 2 image tags so markdown renders correctly
in zed. (Previously, images were skipped. They are also skipped in zed
if there are leading spaces in front of img tag.)
Updated text in 3 alt tags.
Fixed 1 typo.
Release Notes:
- N/A
Closes#37601
Regressed in https://github.com/zed-industries/zed/pull/36469.
Edit: Original issue https://github.com/zed-industries/zed/issues/25744
is fixed for Zeta in this PR. For Copilot, it will be covered in a
follow-up. In the case of Copilot, even after discarding, we still get a
prediction on suggest, which is a bug.
Release Notes:
- Fixed issue where predict edit at cursor didn't work when
`show_edit_predictions` is `false`.
Closes https://github.com/zed-industries/zed/issues/38690Closes#37353
### Background
On Windows, paths are normally separated by `\`, unlike mac and linux
where they are separated by `/`. When editing code in a project that
uses a different path style than your local system (e.g. remoting from
Windows to Linux, using WSL, and collaboration between windows and unix
users), the correct separator for a path may differ from the "native"
separator.
Previously, to work around this, Zed converted paths' separators in
numerous places. This was applied to both absolute and relative paths,
leading to incorrect conversions in some cases.
### Solution
Many code paths in Zed use paths that are *relative* to either a
worktree root or a git repository. This PR introduces a dedicated type
for these paths called `RelPath`, which stores the path in the same way
regardless of host platform, and offers `Path`-like manipulation APIs.
RelPath supports *displaying* the path using either separator, so that
we can display paths in a style that is determined at runtime based on
the current project.
The representation of absolute paths is left untouched, for now.
Absolute paths are different from relative paths because (except in
contexts where we know that the path refers to the local filesystem)
they should generally be treated as opaque strings. Currently we use a
mix of types for these paths (std::path::Path, String, SanitizedPath).
Release Notes:
- N/A
---------
Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Peter Tripp <petertripp@gmail.com>
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
Closes #ISSUE
Updates the settings editor to collect all known settings files from the
settings store, in order to show them in the UI. Additionally adds a
fake worktree instantiation in the settings UI example binary in order
to have more than one file available when testing.
Release Notes:
- N/A *or* Added/Fixed/Improved ...
On macOS, traditionally when a keyboard shortcut is activated, the menu
in the menu bar flashes to indicate that the action was recognised.
<img width="289" height="172" alt="image"
src="https://github.com/user-attachments/assets/a03ecd2f-f159-4f82-b4fd-227f34393703"
/>
This PR adds this functionality to GPUI, where when a keybind is pressed
that triggers an action in the menu, the menu flashes.
Release Notes:
- N/A
This makes rust-analyzer not consider the function for project symbols,
meaning searching for tests wont show two entries.
Release Notes:
- N/A *or* Added/Fixed/Improved ...
As of stable 206.0, the `agent.message_editor_min_lines` setting is
fully available, so removing the docs note that said it was only for
Preview.
Release Notes:
- N/A
This reverts commit 9e7302520e.
I run into an infinite hang in Zed nightly and used instruments and
activity monitor to sample what was going on. The root cause seemed to
be the unwrap_unchecked introduced in reverted PR.
Release Notes:
- N/A
Just making it more consistent with other pickers—button actions
justified to the right and timestamp directly in the list item to avoid
as much as possible relevant information tucked away in a tooltip where
using the keyboard will mostly be the main mean of interaction.
<img width="500" height="310" alt="Screenshot 2025-09-24 at 10 41@2x"
src="https://github.com/user-attachments/assets/0bd478da-d1a6-48fe-ade7-a4759d175c60"
/>
Release Notes:
- N/A
The new cloud endpoint returns structured edits, but they may include
more of the input excerpt than what we want to display in the preview,
so we compute a smaller diff on the client side against the snapshot.
Release Notes:
- N/A
In some rare cases, the auto-generated block gets stuck in
`.git/info/exclude`. We now auto-clean it.
Closes#38374
Release Notes:
- Remove auto-generated block from git excludes if it gets stuck there.
The `Duration` argument in `get_models` has been unused for over a year.
The `complete` function is also unused and it has fallen behind in new
feature additions such as Authorization support. This used to exist
because ollama didn't support tools in streaming mode, `with_tools` also
existed because of that. Now however there is no reason to keep this
around.
`ChatResponseDelta ` had unnecessary `#[allow(unused)]` macros since the
fields are marked `pub`. Using `#[expect(unused)]` would've caught this.
Release Notes:
- N/A
Not an ideal fix, but a proper one will require restructuring the
iterator state (which would be easier if Rust had first class
generators)
Fixes ZED-1MB
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Closes https://github.com/zed-industries/zed/issues/38547
Release Notes:
- Reverted the ability to show/hide the titlebar. This caused rendering
bugs on
macOS, and we're preparing for the redesign which requires the toolbar
being present.
---------
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Closes https://github.com/zed-industries/zed/issues/38528
In the agent panel's `thread_view.rs` file, we have a `render_tool_call`
function that controls what we show in the UI for most types of tools.
However, for some of them—for example, terminal/execute and edit
tools—we have a special rendering so we can tailor the UI for their
specific needs. But... before the specific rendering function is called,
all tools still go through the `render_tool_call`.
Problem is that, in the case of the terminal tool, you couldn't see the
full command the agent wants to run when the tool is still in its
`render_tool_call` state. That's mostly because of the treatment we give
to labels while in that state. A particularly bad scenario because
well... seeing the _full_ command _before_ you choose to accept or
reject is rather important.
This PR fixes that by essentially special-casing the terminal tool
display when in the `render_tool_call` rendering state, so to speak.
There's still a slight UI misalignment I want to fix but it shouldn't
block this fix to go out.
Here's our final result:
<img width="400" height="1172" alt="Screenshot 2025-09-23 at 6 19@2x"
src="https://github.com/user-attachments/assets/71c79e45-ab66-4102-b046-950f137fa3ea"
/>
Release Notes:
- agent: Fixed terminal command not being fully displayed while in the
"waiting for confirmation" state.
This PR removes the experimental jj bookmark picker that was added in
#30883.
This was just an exploratory prototype and while I would like to have
native jj UI at some point, I don't know when we'll get back to it.
Release Notes:
- N/A
Closes#30678
This is caused by `TerminalOutput::full_text` triming trailing newline
when creating the "REPL Output" buffer.
Release Notes:
- fix: Preserve trailing newline in `TerminalOutput::full_text`
The current problem is that if I specify model parameters, like
`max_tokens`, in `settings.json` for an Ollama model, they do not
override the values coming from the Ollama API. Instead, the parameters
from the API are used. For example, in the settings below, even though I
have overridden `max_tokens`, Zed will still use the API's default
`context_length` of 4k.
```
"language_models": {
"ollama": {
"available_models": [
{
"name": "qwen3-coder:latest",
"display_name": "Qwen 3 Coder",
"max_tokens": 64000,
"supports_tools": true,
"keep_alive": "15m",
"supports_thinking": false,
"supports_images": false
}
]
}
},
```
Release Notes:
- Fixed an issue where Ollama model parameters were not being correctly
overridden by user settings.
Closes https://github.com/zed-industries/zed/issues/37882
Previously, every piece of text in the agent panel was controlled by
`agent_font_size`. Although it is nice to only have one setting to tweak
that, it could be a bit misleading particularly because we use
monospaced and sans-serif fonts for different elements in the panel. Any
editor/textarea in the panel, whehter it is the main message editor or
the previous message editor, uses the buffer font. Therefore, I think it
is reasonable to expect that tweaking `buffer_font_size` would also
change the agent panel's usage of buffer fonts.
With this change, regular buffers and the agent panel's message editor
will always have the same size.
Release Notes:
- agent: Made the agent panel's textarea font size follow the font size
of regular buffers. They're now both controlled by the
`buffer_font_size` setting.
Address an issue where, in Vim mode, clicking past the end of a line
after selecting the entire line would place the cursor on the newline
character instead of the last character of the line, which is
inconsistent with Vim's normal mode expectations.
I believe the root cause was that the cursor’s position was updated to
the end of the line before the mode switch from Visual to Normal, at
which point `DisplayMap.clip_at_line_ends` was still set to `false`. As
a result, the cursor could end up in an invalid position for Normal
mode. The fix ensures that when switching between these two modes, and
if the selection is empty, the selection point is properly clipped,
preventing the cursor from being placed past the end of the line.
Related #38049
Release Notes:
- Fixed issue in Vim mode where switching from any mode to normal mode
could end up with the cursor in the newline character
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Nowadays, people don't expect @-mentioning a directory to include the
contents of all files within it. Doing so makes it very likely to
consume an undesirable amount of tokens.
By default, we'll now only include the path of the directory and let the
model decide how much to read via tools. We'll still include the
contents if no tools are available (e.g. "Minimal" profile is selected).
Release Notes:
- Agent Panel: Do not include the content of @-mentioned directories
when tools are available
The edit prediction debug tools has been renamed to zeta2 inspector
because it's now zeta specific. It will now always display the last
prediction request context, prompt, and model response.
Release Notes:
- N/A
---------
Co-authored-by: Bennet <bennet@zed.dev>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Closes#38651
`git_panel.set_amend_pending(false, cx);` was being called before
`git_panel.commit_changes(...)` which was causing the commit buffer to
be cleared/reset before actually sending the commit request to git.
Introduced by #35268 which added clear buffer functionality to the
`set_amend_pending` function.
Release Notes:
- Fix git amend on panel sending "Update ..." instead of the original
commit message
- FIx git amend button not working
Release Notes:
- Added "show_summary" & "show_command" settings to the initial
tasks.json file.
This makes the initial task template match the docs here:
https://zed.dev/docs/tasks
Solves an issue where Google APIs refuse all requests with file-based
tool calls attached.
This seems to get triggered in the case where:
- copy_path + another file-based tool call is enabled
- default terminal is `/bin/bash` or something similar
It is unclear why this is happening, but removing the terminal commands
in those tool calls seems to have solved the issue.
Closes#37180 and #37414
Release Notes:
- agent: Fix Gemini refusing requests with certain profiles/systems.
## Problem
Zed was crashing with a UTF-8 character boundary error when rendering
text containing multi-byte characters (like emojis or CJK characters):
```
Thread "main" panicked with "byte index 49 is not a char boundary; it is inside '…' (bytes 48..51)"
```
## Root Cause Analysis
The PR reviewer correctly identified that the issue was not in the
DirectWrite boundary handling, but rather in the text run length
calculation in the text system. When text runs are split across lines in
`text_system.rs:426`, the calculation:
```rust
let run_len_within_line = cmp::min(line_end, run_start + run.len) - run_start;
```
This could result in `run_len_within_line` values that don't respect
UTF-8 character boundaries, especially when multi-byte characters (like
'…' which is 3 bytes) get split across lines. The resulting `FontRun`
objects would have lengths that don't align with character boundaries,
causing the panic when DirectWrite tries to slice the string.
## Solution
Fixed the issue by adding UTF-8 character boundary validation in the
text system where run lengths are calculated. The fix ensures that when
text runs are split across lines, the split always occurs at valid UTF-8
character boundaries:
```rust
// Ensure the run length respects UTF-8 character boundaries
if run_len_within_line > 0 {
let text_slice = &line_text[run_start - line_start..];
if run_len_within_line < text_slice.len() && !text_slice.is_char_boundary(run_len_within_line) {
// Find the previous character boundary using efficient bit-level checking
// UTF-8 characters are at most 4 bytes, so we only need to check up to 3 bytes back
let lower_bound = run_len_within_line.saturating_sub(3);
let search_range = &text_slice.as_bytes()[lower_bound..=run_len_within_line];
// SAFETY: A valid character boundary must exist in this range because:
// 1. run_len_within_line is a valid position in the string slice
// 2. UTF-8 characters are at most 4 bytes, so some boundary exists in [run_len_within_line-3..=run_len_within_line]
let pos_from_lower = unsafe {
search_range
.iter()
.rposition(|&b| (b as i8) >= -0x40)
.unwrap_unchecked()
};
run_len_within_line = lower_bound + pos_from_lower;
}
}
```
## Testing
- ✅ Builds successfully on all platforms
- ✅ Eliminates UTF-8 character boundary panics
- ✅ Maintains existing functionality for all text types
- ✅ Handles edge cases like very long multi-byte characters
## Benefits
1. **Root cause fix**: Addresses the issue at the source rather than
treating symptoms
2. **Performance optimal**: Uses the same efficient algorithm as the
standard library
3. **Minimal changes**: Only modifies the specific problematic code path
4. **Future compatible**: Can be easily replaced with
`str::floor_char_boundary()` when stabilized
## Alternative Approaches Considered
1. **DirectWrite boundary fixing**: Initially tried to fix in
DirectWrite, but this was treating symptoms rather than the root cause
2. **Helper function approach**: Considered extracting to a helper
function, but inlined implementation is more appropriate for this
specific use case
3. **Standard library methods**: `floor_char_boundary()` is not yet
stable, so implemented equivalent logic
The chosen approach provides the best balance of performance, safety,
and code maintainability.
---
Release Notes:
- N/A
Closes
https://github.com/zed-industries/zed/issues/6730#issuecomment-3320933701
That way if multiple servers are running while reporting the same
results we prevent opening multi buffers for single entries.
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Add tests on task commands, to ensure things like
https://github.com/zed-industries/zed/issues/38343 do not come so easily
unnoticed and to provide a base to create more tests in the future, if
needed.
Release Notes:
- N/A
---------
Co-authored-by: Lukas Wirth <lukas@zed.dev>
Closed#33759Closed#38166
### Summary
This PR fixes the way `go test` commands are generated for **testify
suite test methods**.
Previously, only the method name was included in the `-run` flag, which
caused Go’s test runner to fail to find suite test cases.
---
### Problem
https://github.com/user-attachments/assets/e6f80a77-bcf3-457c-8bfb-a7286d44ff71
1. **Incorrect command** was generated for suite tests:
```bash
go test -run TestSomething_Success
```
This results in:
```
testing: warning: no tests to run
```
2. The correct format requires the **suite name + method name**:
```bash
go test -run ^TestFooSuite$/TestSomething_Success$
```
Without the suite prefix (`TestFooSuite`), Go cannot locate test methods
defined on a suite struct.
---
### Changes Made
* **Updated `runnables.scm`**:
* Added a new query rule for suite methods (`.*Suite` receiver types).
* Ensures only methods on suite structs (e.g., `FooSuite`) are matched.
* Tagged these with `go-testify-suite` in addition to `go-test`.
* **Extended task template generation**:
* Introduced `GO_SUITE_NAME_TASK_VARIABLE` to capture the suite name.
* Create a `TaskTemplate` for the testify suite.
* **Improved labeling**:
* Labels now show the full path (`go test ./pkg -v -run
TestFooSuite/TestSomething_Success`) for clarity.
* **Added a test** `test_testify_suite_detection`:
* Covered testify suite cases to ensure correct detection and command
generation.
---
### Impact
https://github.com/user-attachments/assets/ef509183-534a-4aa4-9dc7-01402ac32260
* **Before**: Running a suite test method produced “no tests to run.”
* **After**: Suite test methods are runnable individually with the
correct `-run` command, and full suites can still be executed as before.
### Release Notes
* Fixed generation of `go test` commands for **testify suite test
methods**.
Suite methods now include both the suite name and the method name in the
`-run` flag (e.g., `^TestFooSuite$/TestSomething_Success$`), ensuring
they are properly detected and runnable individually.
Buffer search initiates a new search every time a key is pressed in the
buffer search bar. This would cancel the task associated with any
pending searches. Whenever one of these searches was canceled Zed would
log `[search]: oneshot canceled`. This log would trigger almost on every
keypress when typing moderately fast. This PR silences these logs by not
treating canceled searches as errors.
Release Notes:
- N/A
I noticed that after we paste in line mode, the cursor position is
positioned at the beginning of the next logical line which is somewhat
undesirable since then inserting/appending will position the cursor
after the selection. This does not match helix behaviour which we should
further investigate.
Follow-up to https://github.com/zed-industries/zed/pull/38663
Release Notes:
- N/A
iTerm's editor configuration dialog allows you to set your editor to
`zed \1:\2`, but not (as far as I know) to leave off the : when there's
no line number
This fixes clicking on bare filenames in iTerm for me.
Release Notes:
- Fixed line number parsing so that `zed filename.rs:` will now act as
though you did `zed filename.rs`
Creates a new `EditPredictionProvider` for zeta2, that requests
completions from a new cloud endpoint including context from the new
`edit_prediction_context` crate. This is not ready for use, but it
allows us to iterate.
Release Notes:
- N/A
---------
Co-authored-by: Michael Sloan <michael@zed.dev>
Co-authored-by: Bennet <bennet@zed.dev>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
This took me quite a while to find out when I developed my first
language extension. I had non-matching entries in the `languages` array
and in the name field of `config.toml`, and it was especially tricky
because the zed extension would start up, but not the language server. I
sure which this had been in the docs, so I am contributing it now!
In particular,
* if the selection ends at the beginning of the next line, and the
current line under the cursor is empty, we paste at the selection's end.
* if however the current line under the cursor is empty, we need to move
to the beginning of the next line to avoid pasting above the end of
current selection
In addition, in line mode, we always move the cursor to the end of the
inserted text. Otherwise, while it looks fine visually,
inserting/appending ends up in the next logical line which is not
desirable.
Release Notes:
- N/A
This PR updates the Gemini provider to treat a
`prompt_feedback.block_reason` as a refusal, as Gemini does not seem to
return a `stop_reason` to use in this case.
<img width="639" height="162" alt="Screenshot 2025-09-22 at 4 23 15 PM"
src="https://github.com/user-attachments/assets/7a86d67e-06c1-49ea-b58f-fa80666f0f8c"
/>
Previously this would just result in no feedback to the user.
Release Notes:
- Added an error message when a Gemini response contains a
`block_reason`.
This PR fixes a regression where settings profiles were no longer
ordered in the same order that the user defined in their settings.
Release Notes:
- N/A
Closes#38495
Cause:
- When the Find input is focused, CopyPath/CopyRelativePath were handled
by the editor and stopped during the bubble phase, preventing
BufferSearchBar from relaying to the file-backed editor.
Release Notes:
- Fixes “Workspace: Copy Relative Path” not copying while the Find bar
is focused.
This PR adds automatic markdown URL embedding on paste when you are in
text associated with the Markdown language and you have a valid URL in
your clipboard. This the default behavior in VS Code and GitHub, when
pasting a URL in Markdown. It works in both singleton buffers and multi
buffers.
One thing that is a bit unfortunate is that, previously, `do_paste` use
to simply call `Editor::insert()`, in the case of pasting content that
was copied from an external application, and now, we are duplicating
some of `insert()`'s logic in place, in order to have control over
transforming the edits before they are inserted.
Release Notes:
- Added automatic Markdown URL embedding on paste.
---------
Co-authored-by: Cole Miller <53574922+cole-miller@users.noreply.github.com>
Vim mode currently supports `gt` (go to next tab) and `gT` (go to
previous tab) but not with count. Implement the expected behavior as
defined by vim:
- `<count>gt` moves to tab `<count>`
- `<count>gT` moves to previous tab `<count>` times (with wraparound)
Release Notes:
- Improved vim `gt` and `gT` to support count, e.g. `5gt` - go to tab 5,
`8gT` - go to 8th previous tab with wraparound.
This button already exists in the main menu, as well as the "New
Session" view in the debugger panel. However, this view disappears after
starting the debugging session. This PR adds the same button to the
debugger control strip that remains accessible. This is convenient for
people editing their debug.json frequently.
Site-node: I feel like the `Cog` icon would be more appropriate, but I
picked `Code` to stay consistent with the "New Session" view.
Before:
<img width="194" height="118" alt="image"
src="https://github.com/user-attachments/assets/5b42a8a4-f48f-4145-a425-53365dd785ca"
/>
After:
<img width="194" height="118" alt="image"
src="https://github.com/user-attachments/assets/12f56ea1-150b-4564-8e6a-da4671f52079"
/>
Release Notes:
- Added "Edit debug.json" button to debugger control strip
Found this outdated piece of information in the docs while trying to
disable it myself, this PR simply changes `false` to `"off"`.
Release Notes:
- N/A
> Your extension can define it's own debug locators
> Your extension can define it is own debug locators
The sentence above does not make sense after expanding "it's". We should
instead be using the possessive "its" in this scenario.
Release Notes:
- N/A
Signed-off-by: Remy Suen <remy.suen@docker.com>
Expands on #38543 (notably allows setting importance categories and
weights on tests, and a lot of internal refactoring) because I couldn't
help myself. Also allows exporting runs to json and comparing across them. See code for docs.
Release Notes:
- N/A
Reverts #38175, which is not correct, since in fact we do need to
pre-quote the command and arguments for the shell when using
`SpawnInTerminal` (although we should probably change the API so that
this isn't necessary). Then, applies the same fix as #38565 to fix the
root cause of being unable to spawn the login task on macOS, or in any
case where the command/args contain spaces.
Release Notes:
- Fixed being unable to login with Claude Code or Gemini using the
terminal.
Hi! This pull request mentions [the `herb` LSP](https://herb-tools.dev)
for `HTML/ERB` language that the Ruby extension supports. Thanks!
Release Notes:
- N/A
---------
Co-authored-by: Finn Evers <finn.evers@outlook.de>
Add an auto-profiler for our tests, to hopefully allow better triage of
performance impacts resulting from code changes. Comprehensive usage
docs are in the code.
Currently, it uses hyperfine under the hood and prints markdown to the
command line for all crates with relevant tests enabled. We may want to
expand this to allow outputting json in the future to allow e.g.
automatically comparing the difference between two runs on different
commits, and in general a lot of functionality could be added (maybe
measuring memory usage?).
It's enabled (mostly as an example) on two tests inside `gpui` and a
bunch of those inside `vim`. I'd have happily used `cargo bench`, but that's nightly-only.
Release Notes:
- N/A
This PR updates the version range for v0.6.0 of the extension API to
include v0.7.0.
Since we bumped the `zed_extension_api` crate's version to v0.7.0, we
need to expand this range in order for Zed clients to be able to install
extensions built against v0.7.0 of `zed_extension_api`.
Currently no extensions that target `zed_extension_api@0.7.0` can be
installed.
Release Notes:
- N/A
In the settings refactor I'd assumed server settings were like project
settings. This is not the case, they are in fact the normal user
settings;
but just read from the server.
Release Notes:
- N/A
It was just a bunch of finnickery around UI layout. It affected Linux
too.
Release Notes:
* Fixed aspect ratio of peer screen share when using Linux/Windows
builds.
Fix an issue introduced in
https://github.com/zed-industries/zed/pull/37321 where vim's surround
wouldn't work as expected when replacing quotes with non-quotes, with
whitespace always being added, regardless of whether the opening or
closing bracket was used. This is not the intended, or previous,
behavior, where only the opening bracket would trigger whitespace to be
added.
Closes#38169
Release Notes:
- Fixed regression in vim's surround plugin that ignored whether the
opening or closing bracket was being used when replacing quotes, so
space would always be added
https://github.com/zed-industries/zed/pull/38367 introduced panic:
```
thread 'main' panicked at crates/theme/src/settings.rs:812:18:
called `Option::unwrap()` on a `None` value
```
In this PR I restored fallback logic from the original code - before
settings refactor.
Release Notes:
- N/A
Closes https://github.com/zed-industries/zed/issues/38331
This fixes an issue where we would not dismiss the panel once the user
toggled the setting, leaving them in an awkward state where closing the
panel would become hard.
Also takes care of one more check for the `Fix with assistant` action
and consolidates some of the `AgentSettings` and `DisableAiSetting`
checks into one method to make the code more readable.
Release Notes:
- N/A
Found duplicate `postgresql` package in installation command. Uncertain
whether it should be `postgresql-contrib` or `postgresql-client`, but
neither appears necessary.
Release Notes:
- N/A
Just install Zed for the first time and got a warning from the first
config example i copied from docs.
Great design btw, immediately able to see that this is a well thought
out app. seems like i'll stick with zed and make it my new dev
'sanctuary'.
Release Notes:
- N/A
Closes#38347
Release Notes:
- Fixed path and args to ty lsp binary
When attempting to use the new ty lsp integration in the preview, I
noticed issues related to accessing the binary. After deleting the
downloaded archive and adding the following changes that:
- downloads the archive with the correct `AssetKind::TarGz`
- uses the correct path to the extracted binary
- adds the `server` argument to initialize the lsp (like ruff)
After the above changes the LSP starts correctly
```bash
2025-09-18T16:17:03-05:00 INFO [lsp] starting language server process. binary path: "/Users/dereknguyen/Library/Application Support/Zed/languages/ty/ty-0.0.1-alpha.20/ty-aarch64-apple-darwin/ty", working directory: "/Users/dereknguyen/projects/test-project", args: ["server"]
```
<img width="206" height="98" alt="image"
src="https://github.com/user-attachments/assets/8fcf423f-40a0-4cd9-a79e-e09666323fe2"
/>
---------
Co-authored-by: Cole Miller <cole@zed.dev>
Uses the previously merged denoising crate (and fixes a bug in it that snug in during refactoring) in the microphone input. The experimental audio path now picks the samplerate and channel count depending on a setting. It can handle incoming streams with both the current (future legacy) and new samplerate & channel count. These are url-encoded into the livekit track name.
This is a redo of #29776. I went for a separate function -- instead of
adding a bunch of conditions to `vim::Paste` -- because there were quite
a few differences.
Release Notes:
- Added a `vim::HelixPaste` command that imitates Helix's paste behavior
---------
Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
`HttpClient`: Relaxes the lifetime bound to `&self` in `get`/`post`
by returning the `self.send` future directly. This makes both
methods return `'static` futures without extra boxing.
`HttpRequestExt`: Added fluent builder methods to `HttpRequestExt`
inspired by the `gpui::FluentBuilder` trait.
Release Notes:
- N/A
When we refactored settings to not pass JSON blobs around, we ended up
needing
to write *a lot* of code that just merged things (like json merge used
to do).
Use a derive macro to prevent typos in this logic.
Release Notes:
- N/A
Closes#36280
Release Notes:
- Added additional context to debug task selection
Adding additional context when selecting a debug task to help with
projects that have multiple config files with similar names for tasks.
I think there is room for improvement, especially adding context for a
LanguageTask type. I started but it looked like it would need to add a
path value to that and wanted to make sure this was a good idea before
working on that.
Also any thoughts on the wording if you do like this format?
---
<img width="1246" height="696" alt="image"
src="https://github.com/user-attachments/assets/b42e3f45-cfdb-4cb1-8a7a-3c37f33f5ee2"
/>
---------
Co-authored-by: Anthony <anthony@zed.dev>
Co-authored-by: Anthony <hello@anthonyeid.me>
2025-09-18 16:05:55 -04:00
1508 changed files with 217658 additions and 77354 deletions
# Arrays are merged together though. See: https://doc.rust-lang.org/cargo/reference/config.html#hierarchical-structure
# The intent for this file is to configure CI build process with a divergance from Zed developers experience; for example, in this config file
# we use `-D warnings` for rustflags (which makes compilation fail in presence of warnings during build process). Placing that in developers `config.toml`
# would be incovenient.
# would be inconvenient.
# The reason for not using the RUSTFLAGS environment variable is that doing so would override all the settings in the config.toml file, even if the contents of the latter are completely nonsensical. See: https://github.com/rust-lang/cargo/issues/5376
# Here, we opted to use `[target.'cfg(all())']` instead of `[build]` because `[target.'**']` is guaranteed to be cumulative.
[target.'cfg(all())']
rustflags=["-D","warnings"]
# We don't need fullest debug information for dev stuff (tests etc.) in CI.
[profile.dev]
debug="limited"
# Use Mold on Linux, because it's faster than GNU ld and LLD.
#
# We no longer set this in the default `config.toml` so that developers can opt in to Wild, which
# is faster than Mold, in their own ~/.cargo/config.toml.
filter='package(worktree) and test(test_random_worktree_changes)'
priority=100
[[profile.default.overrides]]
filter='package(collab) and (test(random_project_collaboration_tests) or test(random_channel_buffer_tests) or test(test_contact_requests) or test(test_basic_following))'
priority=99
[[profile.default.overrides]]
filter='package(extension_host) and test(test_extension_store_with_test_extension)'
@@ -63,6 +63,7 @@ Although there are few hard and fast rules, typically we don't merge:
- New file icons. Zed's default icon theme consists of icons that are hand-designed to fit together in a cohesive manner, please don't submit PRs with off-the-shelf SVGs.
- Giant refactorings.
- Non-trivial changes with no tests.
- Stylistic code changes that do not alter any app logic. Reducing allocations, removing `.unwrap()`s, fixing typos is great; making code "more readable" — maybe not so much.
- Features where (in our subjective opinion) the extra complexity isn't worth it for the number of people who will benefit.
@@ -9,11 +9,10 @@ Welcome to Zed, a high-performance, multiplayer code editor from the creators of
### Installation
On macOS and Linux you can [download Zed directly](https://zed.dev/download) or [install Zed via your local package manager](https://zed.dev/docs/linux#installing-via-a-package-manager).
On macOS, Linux, and Windows you can [download Zed directly](https://zed.dev/download) or [install Zed via your local package manager](https://zed.dev/docs/linux#installing-via-a-package-manager).
Other platforms are not yet available:
- Windows ([tracking issue](https://github.com/zed-industries/zed/issues/5394))
- Web ([tracking issue](https://github.com/zed-industries/zed/issues/5396))
You are a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.
## Communication
1. Be conversational but professional.
2. Refer to the user in the second person and yourself in the first person.
3. Format your responses in markdown. Use backticks to format file, directory, function, and class names.
4. NEVER lie or make things up.
5. Refrain from apologizing all the time when results are unexpected. Instead, just try your best to proceed or explain the circumstances to the user without apologizing.
{{#ifhas_tools}}
## Tool Use
1. Make sure to adhere to the tools schema.
2. Provide every required argument.
3. DO NOT use tools to access items that are already available in the context section.
4. Use only the tools that are currently available.
5. DO NOT use a tool that is not available just because it appears in the conversation. This means the user turned it off.
6. NEVER run commands that don't terminate on their own such as web servers (like `npm run start`, `npm run dev`, `python -m http.server`, etc) or file watchers.
7. Avoid HTML entity escaping - use plain characters instead.
## Searching and Reading
If you are unsure how to fulfill the user's request, gather more information with tool calls and/or clarifying questions.
{{! TODO: If there are files, we should mention it but otherwise omit that fact }}
If appropriate, use tool calls to explore the current project, which contains the following root directories:
{{#eachworktrees}}
- `{{abs_path}}`
{{/each}}
- Bias towards not asking the user for help if you can find the answer yourself.
- When providing paths to tools, the path should always start with the name of a project root directory listed above.
- Before you read or edit a file, you must first find the full path. DO NOT ever guess a file path!
{{#if(has_tool'grep')}}
- When looking for symbols in the project, prefer the `grep` tool.
- As you learn about the structure of the project, use that information to scope `grep` searches to targeted subtrees of the project.
- The user might specify a partial file path. If you don't know the full path, use `find_path` (not `grep`) before you read the file.
{{/if}}
{{else}}
You are being tasked with providing a response, but you have no ability to use tools or to read or write any aspect of the user's system (other than any context the user might have provided to you).
As such, if you need the user to perform any actions for you, you must request them explicitly. Bias towards giving a response to the best of your ability, and then making requests for the user to take action (e.g. to give you more context) only optionally.
The one exception to this is if the user references something you don't know about - for example, the name of a source code file, function, type, or other piece of code that you have no awareness of. In this case, you MUST NOT MAKE SOMETHING UP, or assume you know what that thing is or how it works. Instead, you must ask the user for clarification rather than giving a response.
{{/if}}
## Code Block Formatting
Whenever you mention a code block, you MUST use ONLY use the following format:
```path/to/Something.blah#L123-456
(code goes here)
```
The `#L123-456` means the line number range 123 through 456, and the path/to/Something.blah
is a path in the project. (If there is no valid path in the project, then you can use
/dev/null/path.extension for its path.) This is the ONLY valid way to format code blocks, because the Markdown parser
does not understand the more common ```language syntax, or bare ``` blocks. It only
understands this path-based syntax, and if the path is missing, then it will error and you will have to do it over again.
Just to be really clear about this, if you ever find yourself writing three backticks followed by a language name, STOP!
You have made a mistake. You can only ever put paths after triple backticks!
<example>
Based on all the information I've gathered, here's a summary of how this system works:
1. The README file is loaded into the system.
2. The system finds the first two headers, including everything in between. In this case, that would be:
```path/to/README.md#L8-12
# First Header
This is the info under the first header.
## Sub-header
```
3. Then the system finds the last header in the README:
```path/to/README.md#L27-29
## Last Header
This is the last header in the README.
```
4. Finally, it passes this information on to the next process.
</example>
<example>
In Markdown, hash marks signify headings. For example:
```/dev/null/example.md#L1-3
# Level 1 heading
## Level 2 heading
### Level 3 heading
```
</example>
Here are examples of ways you must never render code blocks:
<bad_example_do_not_do_this>
In Markdown, hash marks signify headings. For example:
```
# Level 1 heading
## Level 2 heading
### Level 3 heading
```
</bad_example_do_not_do_this>
This example is unacceptable because it does not include the path.
<bad_example_do_not_do_this>
In Markdown, hash marks signify headings. For example:
```markdown
# Level 1 heading
## Level 2 heading
### Level 3 heading
```
</bad_example_do_not_do_this>
This example is unacceptable because it has the language instead of the path.
<bad_example_do_not_do_this>
In Markdown, hash marks signify headings. For example:
# Level 1 heading
## Level 2 heading
### Level 3 heading
</bad_example_do_not_do_this>
This example is unacceptable because it uses indentation to mark the code block
instead of backticks with a path.
<bad_example_do_not_do_this>
In Markdown, hash marks signify headings. For example:
```markdown
/dev/null/example.md#L1-3
# Level 1 heading
## Level 2 heading
### Level 3 heading
```
</bad_example_do_not_do_this>
This example is unacceptable because the path is in the wrong place. The path must be directly after the opening backticks.
{{#ifhas_tools}}
## Fixing Diagnostics
1. Make 1-2 attempts at fixing diagnostics, then defer to the user.
2. Never simplify code you've written just to solve diagnostics. Complete, mostly correct code is more valuable than perfect code that doesn't solve the problem.
## Debugging
When debugging, only make code changes if you are certain that you can solve the problem.
Otherwise, follow debugging best practices:
1. Address the root cause instead of the symptoms.
2. Add descriptive logging statements and error messages to track variable and code state.
3. Add test functions and statements to isolate the problem.
{{/if}}
## Calling External APIs
1. Unless explicitly requested by the user, use the best suited external APIs and packages to solve the task. There is no need to ask the user for permission.
2. When selecting which version of an API or package to use, choose one that is compatible with the user's dependency management file(s). If no such file exists or if the package is not present, use the latest version that is in your training data.
3. If an external API requires an API Key, be sure to point this out to the user. Adhere to best security practices (e.g. DO NOT hardcode an API key in a place where it can be exposed)
## System Information
Operating System: {{os}}
Default Shell: {{shell}}
{{#if(orhas_ruleshas_user_rules)}}
## User's Custom Instructions
The following additional instructions are provided by the user, and should be followed to the best of your ability{{#ifhas_tools}} without interfering with the tool use guidelines{{/if}}.
{{#ifhas_rules}}
There are project rules that apply to these root directories:
{{#eachworktrees}}
{{#ifrules_file}}
`{{root_name}}/{{rules_file.path_in_worktree}}`:
``````
{{{rules_file.text}}}
``````
{{/if}}
{{/each}}
{{/if}}
{{#ifhas_user_rules}}
The user has specified the following rules that should be applied:
@@ -29,7 +29,9 @@ Generate {{content_type}} based on the following prompt:
Match the indentation in the original file in the inserted {{content_type}}, don't include any indentation on blank lines.
Immediately start with the following format with no remarks:
Return ONLY the {{content_type}} to insert. Do NOT include any XML tags like <document>, <insert_here>, or any surrounding markup from the input.
Respond with a code block containing the {{content_type}} to insert. Replace \{{INSERTED_CODE}} with your actual {{content_type}}:
```
\{{INSERTED_CODE}}
@@ -66,7 +68,9 @@ Only make changes that are necessary to fulfill the prompt, leave everything els
Start at the indentation level in the original file in the rewritten {{content_type}}. Don't stop until you've rewritten the entire section, even if you have no more changes to make, always write out the whole section with no unnecessary elisions.
Immediately start with the following format with no remarks:
Return ONLY the rewritten {{content_type}}. Do NOT include any XML tags like <document>, <rewrite_this>, or any surrounding markup from the input.
Respond with a code block containing the rewritten {{content_type}}. Replace \{{REWRITTEN_CODE}} with your actual rewritten {{content_type}}:
# Suppresses clippy::mutable_key_type, which is a false positive as the Eq
# and Hash impls do not use fields with interior mutability.
"agent::context::AgentContextKey"
"agent_ui::context::AgentContextKey"
]
disallowed-methods=[
{path="std::process::Command::spawn",reason="Spawning `std::process::Command` can block the current thread for an unknown duration",replacement="smol::process::Command::spawn"},
{path="std::process::Command::output",reason="Spawning `std::process::Command` can block the current thread for an unknown duration",replacement="smol::process::Command::output"},
{path="std::process::Command::status",reason="Spawning `std::process::Command` can block the current thread for an unknown duration",replacement="smol::process::Command::status"},
{path="std::process::Command::stdin",reason="`smol::process::Command::from()` does not preserve stdio configuration",replacement="smol::process::Command::stdin"},
{path="std::process::Command::stdout",reason="`smol::process::Command::from()` does not preserve stdio configuration",replacement="smol::process::Command::stdout"},
{path="std::process::Command::stderr",reason="`smol::process::Command::from()` does not preserve stdio configuration",replacement="smol::process::Command::stderr"},
{path="serde_json::from_reader",reason="Parsing from a buffer is much slower than first reading the buffer into a Vec/String, see https://github.com/serde-rs/json/issues/160#issuecomment-253446892. Use `serde_json::from_slice` instead."},
{path="serde_json_lenient::from_reader",reason="Parsing from a buffer is much slower than first reading the buffer into a Vec/String, see https://github.com/serde-rs/json/issues/160#issuecomment-253446892, Use `serde_json_lenient::from_slice` instead."},
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.