This mimics VSCode's `files.readonlyExclude` setting, to allow setting
specific path matches as readonly locations like lockfiles and generated
sources etc.
Also renders a lock icon to the right side of the path names for
readonly files now.
This does a couple more things for completion sake:
- Tabs of readonly buffers now render a file lock icon
- Multibuffer buffer headers now render a file lock icon if the excerpts
buffer is readonly
- ReadWrite multibuffers now no longer allow edits to read only buffers
contained within
Release Notes:
- Added `read_only_files` setting to allow specifying glob patterns of
files that should not be editable by default
---------
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Lukas Wirth
and
Danilo Leal
created
848d3cc
Fix inlay hint hover highlight for multi-byte UTF-8 characters (#44872)
Click to expand commit body
## Summary
Fixes #44812
The hover highlight for clickable inlay hints was not covering the last
character when the label contained multi-byte UTF-8 characters (e.g.,
`→`).
## Problem
When hovering over an inlay hint like `→ app/Livewire/UserProfile.php`,
the highlight/underline stopped one character short, leaving the final
character unhighlighted.
**Root cause:** `find_hovered_hint_part()` in `hover_popover.rs` used
`part.value.chars().count()` (character count) but `InlayOffset` wraps
`MultiBufferOffset(pub usize)` which is byte-based.
For a label like `→ app/Livewire/UserProfile.php`:
- Byte length: 32 (the `→` character is 3 bytes in UTF-8)
- Character count: 30
This mismatch caused the calculated highlight range to end 2 bytes
short.
## Changes
1. **Use byte length instead of character count** (line 112):
```rust
// Before (buggy)
let part_len = part.value.chars().count();
// After (correct)
let part_len = part.value.len();
```
2. **Fix boundary condition** (line 113): Changed `>` to `>=` for
correct `[start, end)` range semantics when hovering at part boundaries.
3. **Rename variable** for clarity: `hovered_character` →
`offset_in_hint` since it's a byte offset, not a character position.
4. **Add unit test** reproducing the exact scenario from the issue with
multi-byte UTF-8 characters.
## Testing
Added `test_find_hovered_hint_part_with_multibyte_characters` which:
- Verifies the label `→ app/Livewire/UserProfile.php` has 32 bytes but
30 characters
- Tests hovering at the last byte correctly returns the full range
- Tests boundary behavior with multiple label parts containing
multi-byte characters
Release Notes:
- Fixed inlay hint hover highlight not covering the last character when
the label contains multi-byte UTF-8 characters
rari404
created
61b3889
extension_host: Avoid creating a Tokio runtime (#45990)
Click to expand commit body
While profiling Zed, I noticed around 12 `tokio-runtime-worker` threads.
Since `gpui_tokio` runs a Tokio runtime with only two worker threads,
this meant something else was spinning up a default Tokio runtime (My
machine has 10 cores).
After digging into it a bit, it looks like `wasmtime-wasi` needs a Tokio
runtime for some of its calls. That’s also why we run extension tasks on
`gpui-tokio` in the first place.
Reproduction case:
1. Run a clean Zed build.
2. Sample the process → only 2–3 Tokio threads.
3. Install a WASM extension (for example
https://github.com/zed-extensions/nix), which shouldn’t pull in anything
that creates its own runtime.
4. Sample the process again → 10+ Tokio worker threads show up.
```
marcocondrache@xawed ~/P/zed (main)> sample 34260 1 | grep -E "Thread_"
Sampling process 34260 for 1 second with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Sample analysis of process 34260 written to file /tmp/zed_2026-01-03_112527_5pq7.sample.txt
744 Thread_3086626 DispatchQueue_1: com.apple.main-thread (serial)
744 Thread_3086629: RayonWorker0
....
744 Thread_3086651: MacWatcher
744 Thread_3086653: MacWatcher
744 Thread_3086661: com.apple.NSEventThread
744 Thread_3086680: tokio-runtime-worker
744 Thread_3086681: tokio-runtime-worker
...
744 Thread_3087087: tokio-runtime-worker
744 Thread_3087089: tokio-runtime-worker
744 Thread_3087090: tokio-runtime-worker
744 Thread_3087091: tokio-runtime-worker
744 Thread_3087092: tokio-runtime-worker
744 Thread_3087093: tokio-runtime-worker
744 Thread_3087094: tokio-runtime-worker
744 Thread_3087095: tokio-runtime-worker
744 Thread_3087096: tokio-runtime-worker
744 Thread_3087097: tokio-runtime-worker
...
```
Release Notes:
- Reduced number of threads when using extensions
---------
Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>
64b0502
languages: Escape test names for bun runner (#45749)
Click to expand commit body
Closes #45746
Release Notes:
- Fixed un-escaped regexp characters in test names passed to `bun test`
Patrick Kilgore
created
9a79cb8
Improve support for collecting edit prediction training and eval examples (#45914)
Click to expand commit body
* Fix some bugs in capture of EP examples from running app
* Tweak markdown format for EP examples
* Store repo and revision in TOML front matter
* Represent cursor position using a comment line
* Allow multiple expected patches in evals
* Remove line-based scoring criteria for evals
* Add a `synthesize` subcommand to the EP cli that generates examples
from git commits
Release Notes:
- N/A
Max Brunsfeld
created
21eb233
Fix diff base text not being syntax-highlighted (#46001)
Click to expand commit body
Regressed in #44838
- Wait to emit `LanguageChanged` from `BufferDiff` until the base text
has finished (re)parsing
- Set the language registry on the base text buffer before setting the
language, to ensure that language inclusions are correctly parsed
Release Notes:
- N/A (nightly only)
Cole Miller
created
43f7dc4
editor: Use a default font for the minimap (#45999)
Click to expand commit body
Closes #45496
Should help #43460
And probably also #44503
The minimap usually renders about 10x more lines of code and shaped text
than the editor. With expensive fonts such as Google Sans Code, this can
cause noticeable lag, since we attempt to synthesize 300+ lines of code
using a heavy font. Because minimap text is rendered at around 2px and
is essentially illegible, it doesn’t make sense to use the custom buffer
font.
Release Notes:
- Improved minimap performance when using custom fonts
---------
Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>
Marco Mihai Condrache
created
94faaeb
Clean up image resources for the current window (#45969)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/35894
Trace:
https://drive.google.com/file/d/1pXDFzOg4ZS4p2SX8fk9Cjnyy1Qd1Pkrx/view?usp=sharing
[Relevant
part](https://github.com/user-attachments/files/24412472/image_leak.txt)
Release Notes:
- Fixed a memory leak when opening images
Fix the Rust tree-sitter language injection to syntax highlight HTML in
Leptos `view!` macros.
A [cleanup
commit](https://github.com/zed-industries/zed/commit/00278f43bb0c5ce7c9961fca42d8e924a0cb157a#diff-15e953fedef2880e09d9e57c8bddf9af5eb583b141fe7d2069c8e579378f4fccL6)
erroneously removed the `(#not-any-of? @_macro_name "view" "html")`
filter from a query that injects Rust into macro invocations. This
causes the query to always match with higher precedence over another one
that sets the `view!` macro language to `rstml`. I have verified that my
fix works locally.
On a related note, I am not sure why language injection for the `sql`
macro is there, which is not even exported by
[sqlx](https://docs.rs/sqlx/latest/sqlx/). The commit author
[mentions](https://github.com/zed-industries/zed/pull/41258#issue-3555384722)
that it is for `sqlez`, a Go library, not a Rust crate.
Release Notes:
- Fixed rshtml injection not working inside Leptos `view!` macros.
Arhan Chaudhary
created
3140025
Make `extension` key context case-insensitive (#45961)
Click to expand commit body
Closes #45960
Release Notes:
- Made the `extension` key context case-insensitive. This e.g. enables
the `markdown: Open Preview` action to also handle files where the
extension is capitalised as MD (case-sensitive file system).
Krzysztof Furman
created
5120e63
Add back individual language server controls to status bar menu (#45882)
Danilo Leal
created
392c78e
docs: Point to the right docs for Tree-sitter queries (#45795)
Click to expand commit body
Release Notes:
- N/A
Haojian Wu
created
665ee3e
docs: Add missing option for `show_whitespaces` setting (#45667)
Click to expand commit body
The value for the `trailing` option in the `show_whitespaces` setting
was not documented, so I have added it.
Related Issue:
https://github.com/zed-industries/zed/pull/32329#issuecomment-3581576128
Release Notes:
- N/A
Koutaro Miura
created
8e82503
docs: Update casing of `Ty` to `ty` (#45622)
Click to expand commit body
### Why?
Small nit I noticed when configuring `ty` from Zed docs, ty should
always be stylized as lowercase.
See:
https://github.com/astral-sh/ty?tab=readme-ov-file#how-should-i-stylize-ty
Release Notes:
- N/A
Rob Hand
created
872b2b3
language: Change signature of `initialization_options_schema` (#45937)
Click to expand commit body
This makes this take the LSP adapter delegate instead of the binary
itself.
Despite us passing `LanguageServerBinaryOptions` with `allow_download:
false`, extensions would still try to download the binary because it was
never implemented for these to respect that. This would cause us to try
to download all langauge servers provided by extensions when opening a
settings file and/or requesting the JSON schema for that.
This PR fixes this by passing the LSP adapter delegate instead, so the
few language servers which actually want to have the binary for
resolving the initialization options can decide on this by themselves.
With that, we no longer download all language servers for the schema
request
Release Notes:
- N/A
Updates the community champions list to the latest state, adding some of
our active extension contributors, and sorts the list/removes
duplicates.
Release Notes:
- N/A
Finn Evers
created
554382a
git: Rework side-by-side diff to use distinct buffers for the left-hand side (#44838)
Click to expand commit body
This PR reworks the (still feature-gated) side-by-side diff view to use
a different approach to representing the multibuffers on the left- and
right-hand sides.
Previously, these two multibuffers used identical sets of buffers and
excerpts, and were made to behave differently by adding a new knob to
the multibuffer controlling how diffs are displayed. Specifically, the
left-hand side multibuffer would filter out the added range of each hunk
from the excerpts using a new `FilteredInsertedHunk` diff transform, and
the right-hand side would simply not show the deleted sides of expanded
hunks. This approach has some problems:
- Line numbers, and actions that navigate by line number, behaved
incorrectly for the left-hand side.
- Syntax highlighting and other features that use the buffer syntax tree
also behaved incorrectly for the left-hand side.
In this PR, we've switched to using independent buffers to build the
left-hand side. These buffers are constructed using the base texts for
the corresponding diffs, and their lifecycle is managed by `BufferDiff`.
The red "deleted" regions on the left-hand side are represented by
`BufferContent` diff transforms, not `DeletedHunk` transforms. This
means each excerpt on the left represents a contiguous slice of a single
buffer, which fixes the above issues by construction.
The tradeoff with this new approach is that we now have to manually
synchronize excerpt ranges from the right side to the left, which we do
using `BufferDiffSnapshot::row_to_base_text_row`.
Release Notes:
- N/A
---------
Co-authored-by: cameron <cameron.studdstreet@gmail.com>
Co-authored-by: HactarCE <6060305+HactarCE@users.noreply.github.com>
Co-authored-by: Miguel Raz Guzmán Macedo <miguel@zed.dev>
Co-authored-by: Anthony <anthony@zed.dev>
Co-authored-by: Cameron <cameron@zed.dev>
Cole Miller
,
cameron
,
HactarCE
,
Miguel Raz Guzmán Macedo
,
Anthony
, and
Cameron
created
9677da9
docs: Remove reference to non-existing binding for `tab switcher: toggle all` (#45919)
Click to expand commit body
There is no default binding for `{#kb tab_switcher::ToggleAll}`, so the
doc is rendered as:
<img width="1330" height="227" alt="image"
src="https://github.com/user-attachments/assets/a5ce2efd-69c4-4eb4-a28b-3fdb7825ce34"
/>
Release Notes:
- N/A
Haojian Wu
created
9e5546e
docs: Use inline code in `debugger.md` (#45920)
Click to expand commit body
Release Notes:
- N/A
Haojian Wu
created
c7203f7
docs: Fix an incorrect code-snippet in multibuffers.md (#45918)
Click to expand commit body
Release Notes:
- N/A
Haojian Wu
created
c87f12e
docs: Update workspace symbol search command in `configuring-languages.md` (#45906)
Click to expand commit body
Release Notes:
- N/A
---------
Co-authored-by: Finn Evers <finn.evers@outlook.de>
Haojian Wu
and
Finn Evers
created
084d01b
docs: Fix project-wide diagnostic command in `configuring-languages.md` (#45905)
Click to expand commit body
Release Notes:
- N/A
---------
Co-authored-by: Finn Evers <finn.evers@outlook.de>
Haojian Wu
and
Finn Evers
created
ed73602
debugger: Fix breakpoint store RPC handlers not being registered correctly on SSH remotes (#44908)
Click to expand commit body
Closes #36789
Release Notes:
- Fixed setting breakpoints on remotes
---------
Co-authored-by: Zed AI <ai@zed.dev>
Piotr Osiewicz
and
Zed AI
created
9f59946
agent_servers: Fix process leaks after terminating ACP server (#45902)
Click to expand commit body
Closes #45211
This ensures that all sub-processes that were launched by the ACP server
are terminated. One scenario where this is easily reproducible:
- Start a new Claude Code ACP session
- Submit a prompt
- While Claude-code is still responding, start a new session
- The `claude-code` subprocess is leaked from the previous session (The
Claude-code SDK runs the Claude-code binary in a sub process)
This PR fixes this by using process groups on Unix.
It does not fix the process leaks on Windows yet (will follow up with
another PR)
Release Notes:
- Fixed an issue where subprocesses of ACP servers could be leaked after
starting a new session
Bennet Bo Fenner
created
dffda91
Fixes a doc link to the license detection code (#45894)
Click to expand commit body
The existing link was 404-ing as the crate was renamed.
Not attached to any issue.
Release Notes:
- N/A
Nick Cho
created
6b34122
python: Add support for `uv run` as the shebang line (#45881)
Click to expand commit body
`uv run` can be used to specify a shebang for a Python script.
See:
https://docs.astral.sh/uv/guides/scripts/#using-a-shebang-to-create-an-executable-file
Release Notes:
- Added support for `uv run` in the shebang line to be interpreted as a
Python script
flou
created
963cb2c
settings_ui: Make font size settings use editable number fields (#45875)
Click to expand commit body
Now that the edit mode in number fields is finally working well, we can
make the UX of editing font sizes much nicer because you can now type
inside the number field :)
https://github.com/user-attachments/assets/8df7c6ee-e82b-4e10-a175-e0ca5f1bab1f
Release Notes:
- settings UI: Improved the UX of editing font size fields as you can
now type the desired value as opposed to just using the
decrement/increment buttons.
Danilo Leal
created
0c7d639
ui: Add fixes to the `NumberField` edit mode (#45871)
Click to expand commit body
Follow up to https://github.com/zed-industries/zed/pull/45447 and in
preparation to enable the edit mode in number field instances within the
settings UI. This PR fixes the editor in the number field capturing
focus automatically (unnecessary), tab index in the buttons and editor,
and other things.
Release Notes:
- N/A
Danilo Leal
created
189b5ff
ui: Make docs aside in pickers and context menu render centered to its trigger (#45868)
Click to expand commit body
This has been something we've wanted to do for a long time since docs
aside thus far have been hard-anchored either at the top or bottom of
the container that their trigger is sitting in. This PR introduces the
change so that they're centered with their trigger, regardless of
whether it's on a context menu or picker, by including a canvas element
in both the container and the trigger to calculate where the docs aside
should precisely sit on. Here's the result:
https://github.com/user-attachments/assets/8147ad05-1927-4353-991d-405631de67d0
Note that at the moment, docs aside are only visible through _hovering_,
and ideally, they should be available on both hover and selection
(keyboard nav). But I'll leave that for later.
Release Notes:
- N/A
Danilo Leal
created
a3bf58d
extension_ci: Improve title formatting (#45870)
Click to expand commit body
Just some minor formatting touchups I noticed after the first rollout
Release Notes:
- N/A
Finn Evers
created
d844f5d
extension_ci: Fix version bump not working (#45869)
Click to expand commit body
I changed the runner sizes to a smaller but more recent image yesterday
and broke the version bumping in the process. This PR fixes this by
force installing the needed package.
Release Notes:
- N/A
Finn Evers
created
fc45f6e
title_bar: Fix close button hover color on Windows (#45867)
Click to expand commit body
Release Notes:
- Fix close button hover text color on Windows
| Before | After |
| --- | --- |
| <img width="166" height="137" alt="before"
src="https://github.com/user-attachments/assets/fcd225c4-c73f-4e21-8e8d-459395df27ec"
/> |<img width="188" height="156" alt="after"
src="https://github.com/user-attachments/assets/89f5dcba-d677-4eb9-a9b4-170eb9792cb2"
/> |
https://github.com/user-attachments/assets/27e88bf1-eddd-4ec8-a360-6a68eef484e0
And I also improved this file's implementation to merge the
`WindowsCaptionButtonIcon` into `WindowsCaptionButton`.
Jason Lee
created
843be76
project search: Make cancellation smoother (#45406)
Click to expand commit body
- **search: Make search cancellation more responsive (again)**
- **Fix project benchmarks build**
- **Less scoping and lifetimes for workers**
Related to #45300
Release Notes:
- Project search will consume less resources immediately after
cancellation.
---------
Co-authored-by: Max Brunsfeld <max@zed.dev>
Piotr Osiewicz
and
Max Brunsfeld
created
469ad07
ui: Add submenus to `ContextMenu` (#45743)
392b618
Fix worktree trust handling of multiple projects on the same remote host (#45834)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/45630
Remote host location alone is not enough to distinguish between remote
worktrees: different remote projects open in different windows will have
the same remote host location and _will_ have the same `WorktreeId`.
Thus, require an associated `WorktreeStore` with all
`WorktreeId`-related trust questions, and store those IDs based on the
store key.
Release Notes:
- Fixed worktree trust handling of multiple projects on the same remote
host
Kirill Bulatov
created
fc89e19
extension_ci: Move shared workflows into nested folder (#45828)
Click to expand commit body
This makes the rollout as well as distinguishing this in the future
easier.
Release Notes:
- N/A
Finn Evers
created
f53b01d
ci: Grant GitHub token more granular permissions (#45825)
Click to expand commit body
Release Notes:
- N/A
Finn Evers
created
bf1c881
ci: Properly request token for extension repositories (#45824)
Click to expand commit body
Release Notes:
- N/A
Finn Evers
created
3247264
ui: Remove stray blank lines in ButtonStyle methods (#45822)
There were several places adding a copy icon button, so thought of
encapsulating the logic to copy a given string into the clipboard (and
other small details like swapping the icon and tooltip if copied) into a
component, making it easier to introduce this sort of functionality in
the future, with fewer lines of code.
All it takes (for the simplest case) is:
```rs
CopyButton::new(your_message)
```
<img width="600" height="714" alt="Screenshot 2025-12-29 at 10 50@2x"
src="https://github.com/user-attachments/assets/e6949863-a056-4855-82d8-e4ffb5d62c90"
/>
Release Notes:
- N/A
Danilo Leal
created
db221ca
Add workflow to rollout changes to the extension organization (#45579)
Click to expand commit body
This PR adds a workflow that we can utilize to rollout changes to the CI
workflows for the `zed-extensions` organization.
Release Notes:
- N/A
Finn Evers
created
1d006a8
extension_ci: Specify needed permissions for jobs (#45542)
Click to expand commit body
GitHub flags these as security vulnerabilities. Hence, this PR specifies
the needed permissions for the workflows used in the `zed-extensions`
organization.
Release Notes:
- N/A
Finn Evers
created
aaab9f6
Add a button to copy diagnostic messages from the hover popover to the clipboard (#45625)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/45346
Release Notes:
- Added a button to copy diagnostic messages from the hove popover
Screenshot:
<img width="842" height="360" alt="image"
src="https://github.com/user-attachments/assets/9c00fba5-82aa-4179-95b1-afd5c1173889"
/>
---------
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Rocky Shi
and
Danilo Leal
created
209cf0a
ui: Make long Callout descriptions scrollable (#45792)
Click to expand commit body
Fixes #43306
Long error messages from LLM providers in the Agent Panel were not
scrollable, making it impossible to read the full error content.
Changes:
- Add max_h_48() and overflow_y_scroll() to description containers
- Add element IDs required for scroll functionality
- Add min_h_0() and overflow_hidden() to parent flex container
- Add component preview example demonstrating scrollable content
Release Notes:
- Fixed long error messages in Agent Panel being unreadable by making
them scrollable
([#43306](https://github.com/zed-industries/zed/issues/43306)).
---------
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Ahmed Hesham Abdelkader
and
Danilo Leal
created
260691c
docs: Specify that dev containers are currently previeiw-only (#45816)
Click to expand commit body
Thanks for the cool project and making it open source! Started using Zed
recently and I really enjoy it.
Made a tiny addition to devcontainer docs to specify the version. Wasn't
able to get it to work as shown in the
[docs](https://zed.dev/docs/dev-containers) (should "just work"). The
feature was introduced recently on [PR
44442](https://github.com/zed-industries/zed/pull/44442) and is only
available as of v0.218 (currently still in preview), while I was still
on the latest stable version.
So I thought of opening a small PR 😊
Thanks again for the awesome project!
Release Notes:
- N/A
---------
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Murilo Cunha
and
Danilo Leal
created
9e88f3f
agent_ui: Fix issues with mention crease (#45683)
Click to expand commit body
This PR introduces the `MentionCrease` component, aimed at solving two
issues with mention creases in the agent panel:
- Previously, the mention crease was using a button with a regular size,
which is bigger than the default buffer font line height. That made the
crease look clipped and also overlapping with one another when in a
multiple line scenario where the creases would be on top of each other.
`MentionCrease` uses the window line height value to set the button
height, with a small one pixel vertical padding just for a bit of
spacing.
- Previously, given the crease used a `Label`, its font size wouldn't
scale if you changed the `agent_buffer_font_size` setting. Now,
`MentionCrease` uses that font size value, which makes regular text and
its text grow together as you'd expect.
Release Notes:
- agent: Fix a bug where mention creases didn't scale with
`agent_buffer_font_size` and got clipped/jumbled when rendered one above
the other.
Danilo Leal
created
2cad6c8
svg_preview: Detect SVG in single-file mode by checking file name (#45747)
Click to expand commit body
Release Notes:
- Use the files name for "is svg" checks so SVG previews and the toolbar
button work in single-file mode.
Gabe Shahbazian
created
bc24ffe
acp: Beta support for Session Config Options (#45751)
Click to expand commit body
Adds beta support for the ACP draft feature of Session Config Options:
https://agentclientprotocol.com/rfds/session-config-options
Release Notes:
- N/A