100 Commits
Author SHA1 Message Date
Kirill Bulatov 37faef81f7 Protect against solargraph LSP violations (#66157)
Closes https://github.com/zed-industries/zed/issues/65974

Upstream issue for the context:
https://github.com/castwide/solargraph/issues/1455

Release Notes:

- Fixed solargraph completions causing Zed to panic in certain cases
2026-10-27 14:32:31 +00:00
Kirill Bulatov 087340e2d7 Fix panic on cmd-q (#66158)
Closes https://github.com/zed-industries/zed/issues/57664

Updates `crash-context` transitive dependency (ergo the `patch` section)
to include https://github.com/rust-minidump/minidump-writer/pull/249
fix: given the latest release was a few months ago, decided to use the
git SHA pointer.

Release Notes:

- Fixed "Zed quit unexpectedly" when quitting via ⌘ + Q
2026-10-26 11:26:43 +00:00
Kirill Bulatov 96b617fa37 Cleanup history items for deleted entries (#65972)
Follow-up to
https://github.com/zed-industries/zed/pull/65660#issuecomment-6268647871

Release Notes:

- N/A
2026-10-26 11:20:26 +00:00
Kirill Bulatov f14592c4a5 Require macOS 12 and SDK 26 (#65994)
Closes https://github.com/zed-industries/zed/issues/9307

Use SDK 26 and require newer macOS.
The latter allows to remove a few deprecated API usages.

Release Notes:

- [GPUI] BREAKING: bumped minimum macOS version to 12 (Monterey)
2026-10-26 11:20:07 +00:00
Kirill Bulatov 1808df02c0 Remove block dependency from the tree (#65942)
Closes https://github.com/zed-industries/zed/issues/22408

See also
https://github.com/zed-industries/scap/commit/b5c86ec58dd4b6b7732bf6ac8be03d6b1f190a82
that makes all macOS dependencies optional: we do not use these in Zed
anyway, and have `default-features = false` that allow to remove all
transitive `block` dependencies from the tree.

Adjust the test to ensure no such dependencies can appear later.

Release Notes:

- [GPUI] Removed `block` dependecy from the tree
2026-10-26 11:20:06 +00:00
Kirill Bulatov 18f9d7e731 Fix pwsh-related issues with local and remote env variables detection (#66097)
Closes https://github.com/zed-industries/zed/issues/65931
Closes https://github.com/zed-industries/zed/issues/66021
Closes https://github.com/zed-industries/zed/issues/66094

Follow-up to https://github.com/zed-industries/zed/pull/65065

Release Notes:

- Fixed pwsh-related issues with local and remote env variables
detection
2026-10-25 08:21:37 +00:00
Kirill Bulatov b36b283021 Do not read LLM credentials when disable_ai is true (#66029)
Closes https://github.com/zed-industries/zed/issues/65735

Release Notes:

- Fixed LLM credentials being read despite disable_ai being true
2026-10-23 10:32:56 +00:00
Kirill Bulatov f1ccf949d5 gpui_ios: Reuse the cached main-thread marker (#65975)
Follow-up to
https://github.com/zed-industries/zed/pull/65934#issuecomment-6332065288

Release Notes:

- [GPUI] N/A
2026-10-22 15:35:30 +00:00
Kirill Bulatov 9b9e7b814a xtask: Forbid legacy Objective-C dependencies (#65935)
Reject objc, cocoa, and related legacy wrappers in workspace packages
and unused workspace dependency declarations.

Cover aliases, optional and target-specific dependencies, build and dev
dependencies, and permitted objc2 replacements.

Release Notes:

- N/A
2026-10-22 09:30:27 +00:00
Kirill Bulatov 2d6c664dc2 gpui_macos: Cache the main-thread marker per thread (#65934)
Reuse a thread-local `Option<MainThreadMarker>` for platform creation,
display queries, and display-link assertions.

Preserve background-thread rejection and cache both successful and
unsuccessful checks.

An instrumented standalone check observed one pthread_main_np call per
thread across repeated main-thread and worker-thread lookups; the
uncached implementation failed with 1000 calls.

Release Notes:

- [GPUI] Cache macOS main-thread checks per thread.
2026-10-22 09:30:26 +00:00
Kirill Bulatov 5d47f83542 Allow opening README files by default (#65389)
Closes https://github.com/zed-industries/zed/discussions/38228


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

Release Notes:

- Added a way to open README files by default, use `"on_new_window":
"readme",` to configure
2026-10-22 09:26:30 +00:00
Kirill Bulatov b7d50b95e8 Warn only for explicitly requested fonts (#65968)
Follow-up to https://github.com/zed-industries/zed/pull/65852

Release Notes:

- [GPUI] N/A
2026-10-22 09:11:13 +00:00
Kirill Bulatov 10cfb45944 gpui_macos: Migrate window and appearance bindings to objc2 (#65933)
Migrate window classes, callbacks, native geometry, ownership, and
appearance handling to objc2.

Remove the temporary legacy adapters and the now-unused objc and cocoa
dependencies.

Release Notes:

- [GPUI] Migrate macOS window and appearance bindings to objc2
2026-10-22 09:11:07 +00:00
Kirill BulatovandPiotr Osiewicz d86aa6e6b9 gpui_macos: Migrate application and menu bindings to objc2 (#65932)
Migrate application delegates, menus, platform services, and retained
AppKit objects while preserving checked ivar access.

Kept legacy window string allocation and an appearance pointer cast
until the window migration (next PR).

Release Notes:

- [GPUI] Migrate macOS application and menu bindings to objc2

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2026-10-22 08:26:45 +00:00
Kirill Bulatov 3389d87577 Cache resolved fonts (#65852)
Closes https://github.com/zed-industries/zed/issues/65777

Release Notes:

- [GPUI] Fixed font lookup causing performance issues
2026-10-22 08:04:55 +00:00
Kirill Bulatov e83f1c9495 gpui_macos: Migrate clipboard bindings to objc2 (#65713)
Use typed pasteboards and retained Foundation objects while preserving
clipboard formats and metadata.

Cover embedded NUL and Unicode text and autorelease lifetimes.

Release Notes:

- [GPUI] Migrated macOS clipboard bindings to objc2
2026-10-21 15:35:23 +00:00
Kirill Bulatov cb1937a8e7 gpui_macos: Migrate display bindings to objc2 (#65714)
Use retained NSScreen objects and objc2 main-thread checks while
preserving refresh-rate and display-bounds fallbacks.

Release Notes:

- [GPUI] Migrated macOS display and display-link bindings to objc2
2026-10-21 15:35:19 +00:00
Kirill Bulatov 0a9eb81e6c gpui_macos: Migrate keyboard and event bindings to objc2 (#65715)
Use typed NSEvent bindings, objc2 Carbon object pointers, and a
null-safe NSString conversion.

Keep the legacy string conversion and cast the two window event call
sites until window bindings migrate.

Release Notes:

- [GPUI] Migrated macOS keyboard and event bindings to objc2
2026-10-21 15:35:15 +00:00
Kirill Bulatov e80af52575 Preserve LSP message order (#65856)
Closes https://github.com/zed-industries/zed/issues/65667

Release Notes:

- Fixed LSP formatting requests bringing in incorrect changes sometimes
2026-10-21 15:35:05 +00:00
Kirill BulatovandAndrew Mitchell cc23f35a7d Remove deleted files from file finder's history items (#65660)
Closes https://github.com/zed-industries/zed/issues/65657

Release Notes:

- Fixed deleted files from file finder's history items not being removed

Co-authored-by: Andrew Mitchell <alamottemitchell@gmail.com>
2026-10-21 15:34:53 +00:00
Kirill Bulatov febcb5bb99 Bump proptest (#65821)
Closes https://github.com/zed-industries/zed/pull/65618

Release Notes:

- [GPUI] N/A
2026-10-19 14:16:08 +00:00
Kirill BulatovandAndrew Mitchell 32b16ce2ad Fix false syntax-layer ordering panic (#65663)
Match the invariant check to the existing longest-first ordering for
equal-start layers.

Preserve file context during parsing and cover initial Markdown parsing
and Unicode edits with a regression test.

Release Notes:

- N/A

Co-authored-by: Andrew Mitchell <alamottemitchell@gmail.com>
2026-10-16 09:31:06 +00:00
Kirill Bulatov 7fa2adbe08 Avoid allocations related to markdown parsing (#65409)
Follow-up to
https://github.com/zed-industries/zed/pull/65398#pullrequestreview-5471402233

Not implemented from the feedback:

- Returning the cached `Arc` runs from `highlight_text` behind a
newtype: read-only callers now use `highlight_text_resolved(..).runs`
directly, while `CodeLabel` callers still need an owned `Vec`, which
`highlight_text` now collects once.
- Caching the `Rope` itself to avoid the copy on a cache miss: this
needs a new rope-to-rope comparison and roughly doubles the memory each
entry retains, so the cache keeps one `String` copy.


Release Notes:

- N/A
2026-10-15 18:48:40 +00:00
Kirill Bulatov e463c5ab74 Fix focus cleanup stalls during conversation restoration (#65177)
Noticed hangs when opening certain agent threads, hang sample: [Sample
of Zed
Nightly.txt](https://github.com/user-attachments/files/33056833/Sample.of.Zed.Nightly.txt)

Focus cleanup scanned the entire handle registry before each app effect,
amplifying work while restoring large conversations. Queue final handle
drops instead and process only those IDs at the existing cleanup
boundary, preserving blur and pending-input behavior.

Recheck subagent registration after loading to avoid duplicate views and
subscriptions from concurrent loads.

Add targeted regression coverage and a focus-cleanup benchmark.

Release Notes:

- Fixed threads with subagents restoration causing hangs
- [GPUI] Improved focus cleanup performance when many focus handles are
retained or released
2026-10-14 17:42:31 +00:00
Kirill Bulatov 2dcc4cc04d Allow to restart stopped servers (#65387)
Part of https://github.com/zed-industries/zed/issues/61896


https://github.com/user-attachments/assets/1625de1d-0ce3-4257-9f61-887ae86954be

Currently, if one stops language servers via the LSP button, there's no
way to bring them back.
The PR adjusts the "restart language server" command to work so that it
actually restarts the servers relevant to the file opened, even in this
case.

Release Notes:

- Allowed to restart stopped servers
2026-10-14 16:09:28 +00:00
Kirill Bulatov 1de16662ee Fix cpal-related issue on Windows (#65550)
Follow-up to https://github.com/zed-industries/zed/pull/65158

Release Notes:

- N/A (Nightly only)
2026-10-13 14:09:05 +00:00
Kirill Bulatov 2c99f547cc markdown: Fix crashes on tab-indented code blocks (#65398)
Fixes https://github.com/zed-industries/zed/issues/65320

Key cached highlights by typed event indices instead of source offsets,
which can collide during tab expansion. Add a layout regression test
covering the crash and related edge cases.

Release Notes:

- Fixed crashes on tab-indented code blocks
2026-10-09 15:56:46 +00:00
Kirill Bulatov 93b4e5edec Release single worktree files from edit predictions (#65386)
Part of https://github.com/zed-industries/zed/issues/64761

Release Notes:

- Fixed edit predictions retaining single worktree files
2026-10-09 13:59:46 +00:00
Kirill Bulatov f0b38ac75e Bump reported dependencies (#65374)
Fixes https://github.com/zed-industries/zed/security/dependabot 

<img width="1266" height="253" alt="image"
src="https://github.com/user-attachments/assets/d32f6d3c-06a7-49ec-8144-c50c45590116"
/>

Release Notes:

- N/A
2026-10-09 09:15:09 +00:00
Kirill Bulatov 41dfc9953b Use latest v24 LTS Node.js version (#65373)
Closes https://github.com/zed-industries/zed/issues/65370

Release Notes:

- Used latest v24 LTS nodejs version
2026-10-09 09:01:40 +00:00
Kirill Bulatov 7ca96c2a58 Keep remote agent secrets out of launcher arguments (#65174)
Closes https://github.com/zed-industries/zed/issues/64511

Release Notes:

- Fixed remote agent secrets exposed in the launcher arguments
2026-10-07 15:35:34 +00:00
Kirill Bulatov 6110aa61e1 Improve icon handling on startup (#65173)
## First commit

Preload initial project panel icons before drawing
Preload the initial project panel icons through the asset cache.

Measurements (warm macOS launches):

- Time to complete Catppuccin Frappe icons: reductions of 4.0 ms and
16.2 ms in two runs of 10 pairs.
- Time to first nonblack captured frame: increases of 16.6 ms and 2.3
ms; all 16 icons were present in every candidate launch.

## Second commit

Reuse unchanged icon families during startup instead of loading them
twice.
Reuse icon families with unchanged source bytes and paths until
extensions finish loading.
Include file paths in theme-read errors.

Measurements (warm macOS launches):

- Time to first captured complete Catppuccin Frappe icons: paired median
reductions of 6.2 ms and 5.0 ms in two runs of 10 pairs.
- Capture gaps in the repeat run reached 216.7 ms.


Release Notes:

- Improved startup time when custom icons are used
2026-10-07 14:58:00 +00:00
Kirill Bulatov 786be276c7 Index restored editor selections and preserve their order (#65171)
Measurements (warm macOS launches):

- Time to captured active-file header, restoring 256 tabs with 17
selections each: reductions of 37.8 ms and 35.5 ms in two runs of 30
pairs.
- With one caret per tab: paired median reduction of 4.7 ms.
- Without tab restoration: no observed improvement.

Release Notes:

- Improved Zed's startup time when hundreds of selections are restored
2026-10-07 14:57:54 +00:00
Kirill Bulatov 56303a3372 audio: Recover from notification output stream failures (#65158)
Closes https://github.com/zed-industries/zed/issues/64962

Update CPAL and rodio to remove the uninterruptible ALSA write retry
loop.
Discard failed output streams so subsequent notifications can reopen the
device.
Preserve recoverable underruns, cancel stale error handlers on teardown,
and keep existing output buffer defaults.

Release Notes:

- Fixed audio thread failing to properly stop on errors
2026-10-07 14:56:19 +00:00
Kirill Bulatov 976ab33fb4 Reduce release binary sizes (#65168)
Not sure how worth such optimization is WRT the speed, but for such
gains, seems worth opening to discuss?

-----------

Optimize selected workspace crates for size and hide Rust exports in
macOS bundles.

Measurements (release editor executable size):

| Platform | Architecture | Before (bytes) | After (bytes) | Reduction
(bytes / %) |
| --- | --- | ---: | ---: | ---: |
| macOS | ARM64 | 258,218,240 | 172,524,896 | 85,693,344 / 33.19% |
| Linux | x86_64 | 317,435,136 | 295,344,952 | 22,090,184 / 6.96% |
| Windows | x86_64 | 358,987,776 | 256,678,400 | 102,309,376 / 28.50% |


Release Notes:

- Reduced Zed's binary size
2026-10-07 14:56:09 +00:00
Kirill Bulatov 83b332342f Support inlay hint edits via double clicks and AcceptInlayHint action (#64789)
Closes https://github.com/zed-industries/zed/discussions/51582


https://github.com/user-attachments/assets/fb4ae2c2-c134-4c7c-8fea-e886b085fc32

Limitations:

* we cannot accept all inlay hint at once, as each of them may apply
contradicting text edits (e.g. altering imports)
* next hint will be accepted with a slight delay, as, after the edit, we
need to re-fetch the hints and then resolve that new hint to get the
edits

Release Notes:

- Supported inlay hint edits via double clicks and `AcceptInlayHint`
action
2026-10-07 14:55:27 +00:00
Kirill Bulatov 8323e23277 Fix hanging during remote project search (#65257)
Closes https://github.com/zed-industries/zed/issues/65099

Before:


https://github.com/user-attachments/assets/36673f06-75b2-4d36-a8d9-4aaaa6bc1768

After:


https://github.com/user-attachments/assets/86a4e129-e1de-465f-9e70-fcec9d421c03

Issues:

- The host checked files that were not yet open for matches, but treated
every already-open buffer as a candidate.
Earlier queries leave thousands of buffers open, so later queries sent
all of them to the client: 3,339 buffers for 51 real matches in one
case.
Open buffers are now checked against their in-memory text first, which
also stops ordinary non-SSH searches from reporting open buffers with no
matches.

- The host queued every candidate buffer's full contents without waiting
for the client, so data from cancelled queries piled up in front of the
new query's results.
A single worker shared by all searches now sends at most 64 buffers or
about 1 MiB before waiting for the client to acknowledge them, and skips
batches from cancelled searches.

- Cancelling a search could stop a buffer transfer after the buffer was
already marked as shared, so later searches waited forever for its
contents.
`BufferStore` now owns transfers, so dropping the caller no longer
cancels them.

Release Notes:

- Fixed hanging during remote project search
2026-10-07 09:57:41 +00:00
Kirill Bulatov 72d073d642 Fix agent file link navigation (#64748)
Closes https://github.com/zed-industries/zed/issues/56633
Related to https://github.com/zed-industries/zed/issues/56067
Related to https://github.com/zed-industries/zed/issues/63968

Changes path handling to open files in the agent panel similar to what
cmd-click does: regular open for files from the project, singe-file
worktrees for files outside of the project

Release Notes:

- Fixed agent file link navigation
2026-10-06 21:35:37 +00:00
Kirill Bulatov 0849124bc2 Ensure more snapshots are used after .await points (#65219)
Follow-up to https://github.com/zed-industries/zed/pull/65193

Release Notes:

- N/A
2026-10-06 08:13:27 +00:00
Kirill Bulatov 285d975043 Improve Zed's startup time (#65170)
## First commit:

Avoid process enumeration during macOS startup
Read the real UID with getuid() instead of enumerating processes.
Keep the channel offsets, UID wrapping, and handshake unchanged.

Measurements (warm macOS launches):

- Time to presentation: median 525 ms -> 479 ms over 30 paired launches
(release-fast).

## Second commit: 

Reduce startup work and redraw before window reveal
Skip redundant settings recomputation, migration formatting, and
colour-scale construction.
Request a redraw of hidden macOS windows before revealing them.

Measurements (warm macOS launches):

- Startup work, time to selected presentation: paired median reductions
of 7.5 ms and 10.7 ms in two runs of 30 pairs.
- Window reveal, time to first captured text: paired median reduction of
18.4 ms over 30 pairs.

Release Notes:

- Slightly improved Zed's startup time in general case
- [GPUI] N/A
2026-10-05 20:30:23 +00:00
Kirill Bulatov 204362325c Fix incorrect LLD used when bundling (#65183)
Follow-up to https://github.com/zed-industries/zed/pull/65169
Fixes
https://github.com/zed-industries/zed/actions/runs/37313460920/job/111774290269#logs

Release Notes:

- N/A
2026-10-05 15:03:19 +00:00
Kirill Bulatov d544470d1d Reduce the dependency footprint (#65176)
Follows-up https://github.com/zed-industries/zed/pull/64862 with similar
fixes:

* replaces a few dependencies that are almost not used, removes unused
dependencies
* removed unused features
* removes `test-support` dependencies from the regular tree
* cleans up build scripts

Despite the large diff, the changes are rather mechanical, split by
commits.
Result:
<img width="1172" height="77" alt="image"
src="https://github.com/user-attachments/assets/7d8aeb58-7cec-4246-8157-d07fc585f81f"
/>

Release Notes:

- N/A
- [GPUI] N/A
2026-10-05 12:44:26 +00:00
Kirill Bulatov d6b7f24b7b Improve Linux binary size (#65169)
First commit enables safe identical-code folding and strip unneeded
Linux symbols.

Measurements (release editor executable size, made after
https://github.com/zed-industries/zed/pull/65168):

Baseline includes the workspace size optimizations in
kb/binary-size-again-1.

| Platform | Architecture | Before (bytes) | After (bytes) | Reduction
(bytes / %) |
| --- | --- | ---: | ---: | ---: |
| Linux | x86_64 | 295,344,952 | 225,907,112 | 69,437,840 / 23.51% |

Second commit ensures the symbols are always uploaded to Sentry.

Release Notes:

- Improved Linux binary size
2026-10-05 11:51:47 +00:00
Kirill Bulatov cb811b48c7 Flicker bracket colorisation less on reparse (#65157)
When agent shows file contents and edits that concurrently, sometimes
there's a lot of bracket flickering.
Avoid eager bracket invalidation until the colorization task is fully
awaited.

Release Notes:

- Reduced bracket flickering during agentic edits
2026-10-05 10:42:03 +00:00
Kirill Bulatov 2ff34954a0 Fix a flaky terminal test (#65160)
CI example:
https://github.com/zed-industries/zed/actions/runs/37274127321/job/111647574180?pr=65158

`true` could exit before the test checked for active PTY resources. The
ACP completion task releases those resources immediately after exit, so
correct cleanup could fail the assertion.


Release Notes:

- N/A
2026-10-05 08:24:37 +00:00
Kirill Bulatov ad4512a2e5 Fix tab double click (#65159)
Closes https://github.com/zed-industries/zed/issues/65140

Also return back the extra actions: for that, reverts part of
https://github.com/zed-industries/zed/pull/65081 and re-implements the
actions properly.


https://github.com/user-attachments/assets/04570ff5-08cb-4414-a386-b1b5b6660f47

Release Notes:

- N/A (Nightly only)
2026-10-05 07:20:42 +00:00
Kirill Bulatov 8bbcd83968 Speed up project search over misclassified binary files (#64549)
Based on
https://github.com/zed-industries/zed/issues/38799#issuecomment-5758593194
finding.

Project search treated any NUL-free file as text, then read it whole,
ran chardetng over every byte (~34 MiB/s) and decoded it into a String
before searching. For raw assets (.yuv/.raw/.onnx/.glb/.tif in #38799)
that cost ~8 s and ~2.6× the file size in RAM per worker.

- Bound chardetng to a 1 MiB window starting at the first non-ASCII
byte.
- Stream-decode legacy/UTF-16 files in project search (`DecodingReader`)
instead of materializing them.
- Scan the single-line text pre-filter in 64 KiB blocks instead of
`read_line`.
- Run the control-byte check even without NULs; treat all high bytes as
text so legacy encodings (windows-1251, GBK, ...) stay text.
- Add magic numbers for TIFF, glTF, ELF, Mach-O, gzip/xz/zstd, SQLite,
HDF5, NumPy, safetensors, GGUF, fonts, media containers and others.
- Move the classifier into a `file_content` crate and use it for git
commit blobs too, replacing the separate NUL-only `is_binary_content`.

Measured on a 200 MiB NUL-free raw file: 8.5 s → ~1.5 s per file, no
whole-file allocation.

Release Notes:

- Improved project search speed and memory usage over misclassified
binary files
2026-09-30 17:39:08 +00:00
Kirill Bulatov eb1ca9768b Avoid extra build step (#64919)
Follow-up to
https://github.com/zed-industries/zed/pull/64826#pullrequestreview-5350118966

Release Notes:

- N/A
2026-09-29 09:59:22 +00:00
Kirill Bulatov 4c841aaf1c Remove unused features from dependencies (#64826)
Release Notes:

- N/A
2026-09-27 16:19:10 +00:00
Kirill Bulatov f8f0a28508 Fix breadcrumb highlighting outside excerpts (#64738)
For semantic highlights, we fall back to tree-sitter highlights in the
multi buffers, as we limit the semantic tokens with the excerpt size.

Before, the fall back was also limited to the buffer excerpt, which did
not give enough highlights.

<img width="1728" height="421" alt="better_fallback"
src="https://github.com/user-attachments/assets/99517162-2d57-4369-994d-9cba8a9ac463"
/>

Release Notes:

- Fixed breadcrumb highlighting outside excerpts
2026-09-25 13:25:40 +00:00
Kirill Bulatov a84858acb9 Fix project panel requiring two Left presses to collapse opened files’ parent (#64733)
Based on
https://github.com/zed-industries/zed/issues/57771#issuecomment-5818927424

Release Notes:

- Fixed project panel requiring two Left presses to collapse opened
files’ parent
2026-09-25 08:45:27 +00:00
Kirill Bulatov 5ddc17645c Fix entries folding on clicks in the outline panel (#64736)
Closes https://github.com/zed-industries/zed/discussions/51877

Now, with the new, outline-less, mode in that panel, this issue is even
more prominent, ergo the fix.


https://github.com/user-attachments/assets/3b0af227-1c3f-4182-bd44-707641b886b8


Release Notes:

- Fixed entries folding on clicks in the outline panel
2026-09-25 07:50:32 +00:00
Kirill Bulatov eb2f43d982 Fix *Map randomized tests (#64527)
Closes https://github.com/zed-industries/zed/issues/64444

Ensures that with `ITERATIONS=200000 OPERATIONS=30`, each of the
following tests pass: `test_random_inlays`, `test_random_folds`,
`test_random_tabs`, `test_random_wraps`, `test_random_display_map`,
`test_random_blocks`, and 12/14 shards of the diff test.

Each comment contains the bug and the fix explanation.

Release Notes:

- N/A
2026-09-23 16:13:31 +00:00
Kirill Bulatov a49db374b6 ci: Disable library backtrace capture in macOS test jobs (#64555)
Based on
https://github.com/zed-industries/zed/pull/64464#issuecomment-5763255028

With `RUST_BACKTRACE=1` set, `anyhow` captures a backtrace for every
error it constructs; on macOS this costs ~30ms per error, on Linux ~µs.
`Project::test` alone hits several such errors during setup
(`canonicalize`/`load` of the non-existent global `tasks.json` and
`debug.json`, worktree creation, buffer open), adding ~0.8s of fixed
cost per test on macOS.

`RUST_LIB_BACKTRACE=0` is checked by std before `RUST_BACKTRACE`, so
panics keep their backtraces while library error captures stop.
Set only on the macOS test jobs (`run_tests.yml`, `release.yml`), since
Linux and Windows pay nothing for the captures and keep the error-origin
backtraces in failure output.
Measured with `cargo nextest run -p editor --lib`: macOS 119s → 72s,
Linux 78s → 76s (noise).

Trade-off on macOS: a failing `.unwrap()` on an `anyhow::Error` in CI
output loses the backtrace of where the error was constructed; the panic
backtrace at the unwrap site is unaffected.

Release Notes:

- N/A
2026-09-21 16:23:34 +00:00
Kirill Bulatov dc0bbb2b43 Speedup completions test (#64464)
Follow-up to https://github.com/zed-industries/zed/pull/64139 

Fixes CI flacks like
https://github.com/zed-industries/zed/actions/runs/35351932842/job/105623037967?pr=64405#step:15:7107

Halve the test runtime by avoiding the entire `MultiWorkspace` creation
and redraws.

Release Notes:

- N/A
2026-09-21 16:01:29 +00:00
Kirill Bulatov 51c0320392 Fix ctrl/cmd-w closing the project panel instead of the active pane (#64515)
Closes https://github.com/zed-industries/zed/issues/34865
Closes https://github.com/zed-industries/zed/discussions/41122

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

Release Notes:

- Fixed `ctrl/cmd-w` closing the project panel instead of the active
pane. BREAKING: closing the active dock moved from `cmd/ctrl-w` to
`ctrl-alt-w`
2026-09-21 13:53:43 +00:00
Kirill Bulatov 395def7a06 Exclude non-Linux remote-server checks from the merge queue runs (#64528)
Given that the rest of the checks are run for Linux only in the merge
queue, follow the pattern here too.

Release Notes:

- N/A
2026-09-20 19:51:23 +00:00
Kirill Bulatov 0d08af1e53 Share GPUI and scheduler implementations (#64261)
Move GPUI window/entity updates, view rendering, listener adapters,
arena allocation, and scheduler task setup into shared implementations.
Keep the generic entry points as thin adapters.

Uses pretty much the same technique prior PRs did, but this time on
`gpui` which I am not too confident about — can close it if seems
dangerous, but the binary strip win looks good to try.

`cargo llvm-lines --locked -p gpui`:
Before (01c555b435): 934803 lines, 33225 copies
After: 926925 lines (-0.8%), 33454 copies (+0.7%)

With compiler wrappers disabled, `cargo clean --target-dir
target/binary-size-split-build` and `cargo build --locked -p zed`:
Before: 135.6s wall, 1569.8s CPU, zed binary 1175563800 bytes 
After: 142.5s wall (+5.1%), 1589.0s CPU (+1.2%), zed binary 1144068952
bytes (-2.7%, -31.5MB)

Release Notes:

- N/A
- [GPUI] Shared GPUI and scheduler implementations to reduce the final
binary size of the app
2026-09-18 10:50:41 +00:00
Kirill Bulatov 15d2fd55d3 Disable share generics to reduce the binary size more (#64335)
After the new macOS nightly with
https://github.com/zed-industries/zed/pull/64260 arrived, I've noticed
that the binary had actually bloated back — run some bisecting and build
comparison, and seems that the shared generics are the culprit.

Platform / executable | Sharing enabled | Sharing disabled/default |
Reduction |
|---|---:|---:|---:|
| macOS ARM64 editor | 304,794,488 bytes | 266,242,792 bytes |
**38,551,696 bytes / 12.65%** |
| Linux x86_64 editor | 334,001,336 bytes | 325,916,104 bytes |
**8,085,232 bytes / 2.42%** |
| Linux x86_64 remote server | 123,618,032 bytes | 106,211,592 bytes |
**17,406,440 bytes / 14.08%**

Each pair uses the same checkout and Rust **1.98.1**, was built with the
bundling script:
- macOS: `9930d2c2a3`, measured after `strip -x`.
- Linux: `cd78c2db425e`, measured after `llvm-objcopy --strip-debug
--discard-all`.

The Linux section changes when disabling sharing are:

| Component | Editor | Remote server |
|---|---:|---:|
| Retained `.symtab` + `.strtab` | **−47,560,049 bytes** | **−17,733,989
bytes** |
| Allocated file-backed sections | +39,475,120 bytes | +327,448 bytes |
| Headers, padding, and other bytes | −303 bytes | +101 bytes |
| **Total** | **−8,085,232 bytes** | **−17,406,440 bytes** |


Release Notes:

- N/A
2026-09-18 10:49:35 +00:00
Kirill Bulatov cd78c2db42 Fix a flacky bracket test (#64321)
Fixes a flack from
https://github.com/zed-industries/zed/actions/runs/35127308706/job/104899555087?pr=64257#step:7:5674

I believe more tests are worth fixing like that, but those pass right
now, so let's first deal with the only flaky one.

Release Notes:

- N/A
2026-09-16 19:16:31 +00:00
Kirill Bulatov 70a74b8725 Check remote server on each commit (#64283)
Release Notes:

- N/A
2026-09-16 17:01:52 +00:00
Kirill Bulatovandzed-zippy[bot] 06e889c439 Enable compaction for subagents (#64135)
Release Notes:

- Enabled compaction for subagents

---------

Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-09-16 16:03:30 +00:00
Kirill Bulatov 67ebcd9517 Fix insertion modes for completions without edit ranges (#64139)
Closes https://github.com/zed-industries/zed/issues/64118


https://github.com/user-attachments/assets/f2152411-6011-4d87-8c8e-d83bed0afbbc

`ty` returns completion text without a `textEdit` or a completion-list
default edit range:

```json
{"label":"value2=","insertText":"value2="}
```

The [LSP
specification](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionItem)
explicitly states:

> The `insertText` is subject to interpretation by the client side.

For the reported example, `ˇ` marks the cursor:

```py
test(value1, ˇvalue2)
```

Previously, Zed inferred only a range covering the existing `value2`.
Without an insert range, completion acceptance bypassed
`completions.lsp_insert_mode` and replaced that argument with `value2=`,
producing:

```py
test(value1, value2=)
```

The patch also infers an insert range, ending at the cursor rather than
the end of the word.
This lets the existing setting choose between inserting before `value2`
and replacing it.
When a prefix has already been typed, insertion replaces that prefix
while preserving the text after the cursor.

With the unchanged default, `"replace_suffix"`, Zed replaces text after
the cursor only when it is a suffix of the completion’s label.
Here, `value2` is not a suffix of `value2=`, so Zed inserts and
produces:

```py
test(value1, value2=value2)
```

The suffix and subsequence checks now use the raw LSP `label`, not
decorated menu text or `filterText`.
These checks select the edit range; `insertText` still supplies the
inserted text in this example.

Release Notes:

- Fixed insertion modes for completions without edit ranges
2026-09-16 16:03:26 +00:00
Kirill Bulatov 9930d2c2a3 Share generics better and strip rodio audio features (#64260)
* Preserve bundle compiler flags commit commit is a follow-up to
https://github.com/zed-industries/zed/pull/63432

Linux bundling script had custom `RUSTFLAGS` set which eradicated prior
config.
Moved all flags into `.cargo/bundle-config.toml` instead.

* Trim audio features and compress resources commit removes unused
`rodio` features and enables resource compression

The win from the latter seems not that large, so can revert if needed,
but seemed very easy to enable.

With compiler wrappers disabled, `cargo clean --target-dir
target/binary-size-split-build` and `cargo build --locked -p zed`:
Before: 135.6s wall, 1569.8s CPU, zed binary 1175563800 bytes
After: 130.5s wall (-3.8%), 1488.7s CPU (-5.2%), zed binary 1171527064
bytes (-0.3%, -4.0MB)

With `ZED_BUNDLE=true CXXFLAGS=-stdlib=libc++` and `cargo --config
.cargo/bundle-config.toml build --locked --release -p zed -p cli
--target aarch64-apple-darwin`:
Before: 369.4s wall, 3861.6s CPU, zed binary 381662328 bytes
After: 369.4s wall (+0.01%), 3866.1s CPU (+0.1%), zed binary 377836968
bytes (-1.0%, -3.8MB)

Release Notes:

- N/A
2026-09-16 16:03:18 +00:00
Kirill Bulatov dc339e4f43 Share application adapter implementations (reduce LLVM IR bloat again) (#64262)
Move settings-update routing, fallible deserialization recovery,
selection effects, context-menu initialization, picker resize handles,
and ACP client setup into shared implementations. Inline the small
button callback adapters.

`cargo llvm-lines --locked -p settings_ui`:
Before (01c555b435): 1571017 lines, 53634 copies
After: 1177376 lines (-25.1%), 43380 copies (-19.1%)

With compiler wrappers disabled, `cargo clean --target-dir
target/binary-size-split-build` and `cargo build --locked -p zed`:
Before: 135.6s wall, 1569.8s CPU, zed binary 1175563800 bytes 
After: 140.9s wall (+3.9%), 1588.8s CPU (+1.2%), zed binary 1157304600
bytes (-1.6%, -18.3MB)

Release Notes:

- N/A
2026-09-16 16:03:09 +00:00
Kirill Bulatov b0f53ad23b Optimize GPUI inspector's runtime cost by an order of magnitude (#64309)
Prerequisite to https://github.com/zed-industries/zed/pull/64257

* gpui: build inspector IDs only when the window's inspector exists,
drop the inspector maps on close, skip inspector state lookups for
absent or non-selected IDs
* gpui: create inspector element renderers per inspector instance
instead of at registration
* inspector_ui: create the project and editors lazily per inspector
session, keep the init task and subscriptions cancellable, hold the
inspector weakly from the completion provider
* lsp: bound the shutdown output drain by the same timeout as the
shutdown request
* gpui_platform: add an `inspector_render` benchmark that builds with
the inspector in or out

Mean time per rendered frame with the inspector closed; overhead is
relative to the inspector compiled out.

| Benchmark | Frame, compiled out | Frame, `main` | Frame, this PR |
Overhead on `main` | Overhead on this PR |
| --- | ---: | ---: | ---: | ---: | ---: |
| 1,000 bare divs, never opened | 3.352 ms | 3.505 ms | 3.362 ms | +153
µs (+4.57%) | +10 µs (+0.29%) |
| 1,000 bare divs, opened and closed twice | 3.349 ms | 3.508 ms | 3.364
ms | +159 µs (+4.76%) | +15 µs (+0.46%) |
| 100 bare divs, opened and closed twice | 317.0 µs | 336.3 µs | 317.6
µs | +19 µs (+6.10%) | +1 µs (+0.18%) |
| 10,000 bare divs, never opened | 56.617 ms | 58.925 ms | 56.472 ms |
+2.31 ms (+4.08%) | -145 µs (-0.26%) |
| 500 panel rows with text, hover, click, never opened | 4.173 ms |
4.451 ms | 4.179 ms | +278 µs (+6.67%) | +7 µs (+0.16%) |
| 500 panel rows with text, hover, click, opened and closed twice |
4.197 ms | 4.448 ms | 4.159 ms | +252 µs (+6.00%) | -37 µs (-0.89%) |
| 50 panel rows with text, hover, click, never opened | 523.4 µs | 543.3
µs | 522.3 µs | +20 µs (+3.80%) | -1 µs (-0.21%) |
| 500 panel rows with text, hover, click, opened and closed twice,
another window inspected | 4.191 ms | 4.469 ms | 4.176 ms | +278 µs
(+6.64%) | -15 µs (-0.35%) |
| editor, cursor moves (`crates/benchmarks`, `release-fast`) | 940.9 µs
| 943.0 µs | 942.5 µs | +2 µs (+0.23%) | +2 µs (+0.17%) |




Release Notes:

- N/A
- [GPUI] Optimize GPUI inspector's runtime cost by an order of magnitude
2026-09-16 16:02:58 +00:00
Kirill Bulatov 0e7972f38e Check dependencies in merge queue (#64286)
Fall out of https://github.com/zed-industries/zed/pull/63248 's changes
getting missing the merge queue lockfile check.

Release Notes:

- N/A
2026-09-16 08:07:56 +00:00
Kirill Bulatov de2c85f255 Fix Windows build of remote-server (#64270)
Fixes a warning from
https://github.com/zed-industries/zed/actions/runs/35018526372/job/104551077687

Release Notes:

- N/A
- [GPUI] N/A
2026-09-16 06:30:27 +00:00
Kirill Bulatov 01c555b435 Revert "Implement inspector flag (#62920)" (#64248)
This reverts commit 91bf967e27.

As discussed with @\ChristopherBiscardi , this has to be implemented
differently, making a first step towards that.

Release Notes:

- N/A
2026-09-15 16:58:03 +00:00
Kirill Bulatov 763924c285 Fix project panel not scrolling to collapsed parent folders (#64207)
Closes https://github.com/zed-industries/zed/issues/57771

Release Notes:

- Fixed project panel not scrolling to collapsed parent folders
2026-09-15 16:33:57 +00:00
Kirill Bulatov 45ff33717b Refine recent commands' UX (#64181)
Follow-up to https://github.com/zed-industries/zed/pull/63388 


https://github.com/user-attachments/assets/2a855451-141b-4030-8475-92f23c661d51

Release Notes:

- Improved recent commands' UX
2026-09-15 09:58:45 +00:00
Kirill Bulatov 47b8ea5894 Reveal in all multi buffers (#64154)
Closes https://github.com/zed-industries/zed/issues/62909
Closes https://github.com/zed-industries/zed/issues/57396

Release Notes:

- Fixed project panel reveal not working in git diff-related multi
buffers
2026-09-14 15:54:54 +00:00
Kirill Bulatov 9d272b0363 Print macOS SDK version when bundling (#64119)
A preparation for solving
https://github.com/zed-industries/zed/issues/9307#issuecomment-4712583548
and other SDK-related issues.

Release Notes:

- N/A
2026-09-12 09:00:23 +00:00
Kirill Bulatov 1c3d902fbf Fix diagnostics batches stopping at paths without a worktree (#64017)
Closes https://github.com/zed-industries/zed/issues/62303

Based on the amazing find in
https://github.com/zed-industries/zed/issues/62303#issuecomment-5553387960

Release Notes:

- Fixed diagnostics batches stopping at paths without a worktree
2026-09-11 09:16:11 +00:00
Kirill Bulatov 26b6a267b0 Pin miri to the version that does not fail (#64013)
Seems that a few PRs' CI start to fail with unrelated errors, e.g.
https://github.com/zed-industries/zed/actions/runs/34428484649/job/102747668773?pr=63933

```
warning: integer-to-pointer cast
   --> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parking_lot_core-0.9.12/src/word_lock.rs:320:9
    |
320 |         (self & QUEUE_MASK) as *const ThreadData
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ integer-to-pointer cast
    |
    = help: this program is using integer-to-pointer casts or (equivalently) `ptr::with_exposed_provenance`, which means that Miri might miss pointer bugs in this program
    = help: see https://doc.rust-lang.org/nightly/std/ptr/fn.with_exposed_provenance.html for more details on that operation
    = help: to ensure that Miri does not miss bugs in your program, use Strict Provenance APIs (https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance, https://crates.io/crates/sptr) instead
    = help: you can then set `MIRIFLAGS=-Zmiri-strict-provenance` to ensure you are not relying on `with_exposed_provenance` semantics
    = help: alternatively, `MIRIFLAGS=-Zmiri-permissive-provenance` disables this warning
    = note: this is on thread `tests::test_non`
    = note: stack backtrace:
```

That used to be the case before too:
https://github.com/zed-industries/zed/actions/runs/34360850759/job/102497345024#step:9:402
but with the recent version bump it became a hard error ergo this for
now.

No new parking lot releases yet:
https://github.com/Amanieu/parking_lot/pull/502 hence pin Miri to
version that does not fail for now.

Release Notes:

- N/A
2026-09-10 06:50:03 +00:00
Kirill Bulatov 52b2927a1b Normalize CRLF line breaks in completion labels too (#63920)
Part of
https://github.com/zed-industries/zed/issues/63273#issuecomment-5562451827



https://github.com/user-attachments/assets/ecaa1bd0-672b-4323-a67e-e1a7e3c428fb


Release Notes:

- Fixed CRLF line breaks not normalized in completion labels
2026-09-09 15:23:30 +00:00
Kirill Bulatov d7f2889916 language: Cache buffer syntax highlighting per row chunk (#63145)
Closes https://github.com/zed-industries/zed/issues/63730
Related to #52340 and #43460
Based on https://github.com/zed-industries/zed/pull/63138 and needs it
to be merged first.

`BufferSnapshot::chunks` re-ran the tree-sitter highlight query over the
requested range on every call, so scrolling and cursor movement paid the
full query cost per frame.

Highlight runs are now computed once per 50-row chunk (the same
`RowChunks` that back bracket colorization), resolved against the
current `HighlightMap` at compute time, merged into `(Range<usize>,
HighlightId)` runs, and kept in a cost-budgeted per-buffer LRU (10MB).
Entries reuse the `ResolvedHighlights` representation from #63138: each
stores the grammars and maps it was resolved against and is served only
while every map is pointer-identical (`is_current`), so theme changes
and grammar reloads invalidate structurally, with no invalidation hooks
and no global state.
Edits and reparses drop the cache through the existing `TreeSitterData`
swap.
Chunks spanning more than 64KB bypass the cache and fall back to direct
querying, so files with giant lines behave as before.

## Benchmarks

`editor_render_highlighted` and `editor_render_highlighted_minimap`
benches (`cargo bench -p benchmarks --bench editor_render`) move the
cursor through a generated 10K-line Rust file with real tree-sitter
highlighting, with and without the minimap.
The benches are new in this PR, so the baseline is the same binary with
`ZED_DISABLE_HIGHLIGHT_CACHE=1`, which routes rendering through the
pre-existing direct-query path.

Run 1 — baseline, cache disabled:

```
editor_render_highlighted          time: [1.7164 ms 1.7377 ms 1.7604 ms]
editor_render_highlighted_minimap  time: [12.273 ms 12.407 ms 12.549 ms]
```

Run 2 — cache enabled:

```
editor_render_highlighted          time: [1.4572 ms 1.4597 ms 1.4627 ms]
                                   change: [-16.378% -14.944% -13.526%] (p = 0.00 < 0.05)
editor_render_highlighted_minimap  time: [9.2750 ms 9.3213 ms 9.3744 ms]
                                   change: [-25.800% -24.872% -23.930%] (p = 0.00 < 0.05)
```

Over the same runs, GPUI reports window draw mean 0.81 ms → 0.68 ms and
p99 1.06 ms → 0.76 ms without the minimap, and mean 5.14 ms → 4.12 ms,
p99 6.12 ms → 4.75 ms with it.
The relative deltas held across two independent sessions (-14.1…-14.9%
and -20.7…-24.9%), while absolute times drift a few percent with machine
state.

Release Notes:

- Improved editor rendering performance in syntax-highlighted files,
especially with the minimap enabled
2026-09-09 14:31:14 +00:00
Kirill Bulatov 318c664ec3 markdown: Cache code block syntax highlighting at parse time instead of re-highlighting every frame (#63138)
Part of https://github.com/zed-industries/zed/issues/57349

`MarkdownElement` re-highlights every code block with tree-sitter on
every frame.
Each visible code block pays a full parse per frame, which makes agent
panel streaming and hover popovers janky once the content grows.

This PR computes code block highlights once, in the background parse
task, instead of at render time:

- Highlights are resolved into `(Range<usize>, HighlightId)` runs at
parse time; each entry stores the grammar and `HighlightMap` it was
resolved against and is served only while the grammar still holds the
pointer-identical map (`ResolvedHighlights::is_current`), so theme
changes need no invalidation hooks, and a block whose entry went stale
falls back to direct fragment highlighting at render until the next
parse.
- `Language::highlight_text_resolved` memoizes results in a
content-keyed LRU (4MB budget, 512KB per-entry cap), so the re-parses
triggered by streaming appends reuse the highlights of unchanged blocks
instead of re-running tree-sitter on them.
- Blocks larger than the per-entry cap bypass the cache and are
highlighted directly, as before.

`CostBudgetedLru` is generic rather than specialized because a follow-up
PR reuses it for per-buffer highlight caching in
`BufferSnapshot::chunks`; the capture flattening keyed by grammar index
(`HighlightCaptureRef`) is shared with that follow-up as well.

## Benchmarks

`cargo bench -p benchmarks --bench markdown_renderer` renders generated
documents that mix paragraphs, headings, tables, and Rust code blocks.

**Run 1 — baseline, `main` (`d6449a9e3f`):**

```
Markdown render/min_bytes/5000    time: [1.2956 ms 1.2974 ms 1.3016 ms]
Markdown render/min_bytes/10000   time: [1.7919 ms 1.7955 ms 1.8026 ms]
Markdown render/min_bytes/50000   time: [6.5510 ms 6.6241 ms 6.6671 ms]
Markdown render/min_bytes/250000  time: [37.644 µs 2.4819 ms 4.3791 ms]   <- bimodal already on main
```

**Run 2 — this branch:**

```
Markdown render/min_bytes/5000    time: [940.11 µs 945.28 µs 948.79 µs]
                                  change: [-29.317% -28.385% -27.607%] (p = 0.00 < 0.05)
Markdown render/min_bytes/10000   time: [1.1162 ms 1.1331 ms 1.1407 ms]
                                  change: [-40.859% -39.151% -37.719%] (p = 0.00 < 0.05)
Markdown render/min_bytes/50000   time: [2.4943 ms 2.9225 ms 3.1051 ms]
                                  change: [-80.088% -67.885% -58.058%] (p = 0.00 < 0.05)
Markdown render/min_bytes/250000  time: [43.442 µs 44.661 µs 45.514 µs]
                                  change: [-98.210% -95.806% +5.5167%] (p = 0.17 > 0.05)
```

Over the same runs, GPUI reports window draw mean 2.22 ms → 1.26 ms, p99
31.2 ms → 16.0 ms, and the share of frames that blow the frame budget
drops from 3.9% to 2.0%.

Note: at the 250,000-byte case root blocks render lazily, which makes
the measurement bimodal and inconclusive in both configurations.

Release Notes:

- Improved rendering performance of markdown code blocks (agent panel,
hover popovers, markdown preview)
2026-09-09 14:31:14 +00:00
Kirill Bulatov 002161d5ba Support commands in inlay hints (#63605)
Closes https://github.com/zed-industries/zed/discussions/51582

During testing, spotted that if I toggle off the hints with the modifier
keys, they are resurrected on scrolling — fixed that in a small commit
on top.

Release Notes:

- Supported commands in inlay hints
2026-09-09 13:47:39 +00:00
Kirill Bulatov 0690433b60 Support LSP command executions and showDocument requests (#63607)
Closes https://github.com/zed-industries/zed/issues/13756
Closes https://github.com/zed-industries/zed/issues/61572

Last window client capability we were missing!
<img width="1557" height="159" alt="image"
src="https://github.com/user-attachments/assets/2cca5d92-a28e-4262-8f55-89f582782bbc"
/>

Two features are connected to each other, as most of the commands result
in opening a document:


https://github.com/user-attachments/assets/661aae88-7af9-4173-9f6a-2fd11dbec675


Release Notes:

- Added support for LSP command executions and showDocument requests
2026-09-09 13:47:28 +00:00
Kirill Bulatov fceace0b84 Autosuggest Emmet extension (#63750)
Closes https://github.com/zed-industries/zed/issues/32713

<img width="507" height="160" alt="image"
src="https://github.com/user-attachments/assets/356973ce-51b8-43be-9b4c-700d0d5dd009"
/>


https://github.com/user-attachments/assets/eea030ba-7a40-406d-bf43-3ac9c6af70f1


Release Notes:

- Added Emmet extension autosuggestion
2026-09-09 12:27:32 +00:00
Kirill Bulatov 20d3cd1d79 Fix block-comment prefix stripping when joining lines (#63916)
Closes
https://github.com/zed-industries/zed/issues/63273#issuecomment-5580302020



https://github.com/user-attachments/assets/0945d43d-9a19-4af6-bc85-c3369d8babb3


Release Notes:

- Fixed block-comment prefix stripping when joining lines
2026-09-08 15:16:55 +00:00
Kirill Bulatov 6f72bdb7b2 Unify copy actions for agent panel and markdown (#63884)
Before, it was not possible at all to copy the text from the agent
panel, only its markdown.
The PR breaks the existing ctrl/cmd-c binding there by using the same
approach markdown preview does: copy as text by default, allow to copy
as markdown via the context menu.

Before:


https://github.com/user-attachments/assets/2014f363-5167-4700-be86-9c0774d7e4fd

After:


https://github.com/user-attachments/assets/1dad253c-7a3b-4ca7-99c8-e8df8b3c3fd6


Release Notes:

- Changed agent panel to copy text with cmd/ctrl-c, as markdown preview
does. `markdown::CopyAsMarkdown` action is available still and can be
bound if needed.
2026-09-08 11:21:20 +00:00
Kirill Bulatovandzed-zippy[bot] 20fa2fa809 Reduce LLVM IR bloat one last time (#63882)
I think this is the final attempt of mine to do anything about the
binary size, as those fixes become relatively intricate and I like them
less and less.

Each commit has its own improvement stats and mainly reduce generic-code
duplication through shared non-generic helpers and `#[inline(never)]`
boundaries.

Total reduction stats:

With sccache disabled, `cargo clean` and `cargo build --release -p zed`:
Before: zed binary 396716472 bytes
After: zed binary 359416504 bytes (-9.40%, -37.29MB)

Release Notes:

- N/A

---------

Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-09-07 15:18:49 +00:00
Kirill Bulatovandzed-zippy[bot] 5a9b9558db Use proper editions (#63733)
Release Notes:

- N/A

---------

Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-09-04 22:54:09 +00:00
Kirill Bulatov 22e9216896 Allow concurrent peer LSP requests via collab (#63736)
Before this change, two different guests requesting the same kind of
request would cancel each other's requests and only the latest one would
have arrived to the latest to query that.

Release Notes:

- Fixed collab LSP requests cancelling each other sometimes
2026-09-04 22:54:06 +00:00
Kirill Bulatov 5313741ffa Fix projects leaking via agents panel (#63765)
When working with multiple windows, one agent worked in the external
hard drive's directory.
After finishing working on that external dir, I've closed the entire
window (the other one, unrelated, remained) only to discover I cannot
unmount the external hard drive.

Investigated, and seems that that manual `ref_count` is buggy — replaced
that with `WeakEntry` for both agent and ACP parts.
Also added leaked project logging into reliability.

Release Notes:

- Fixed projects leaking via agents panel
2026-09-04 18:14:56 +00:00
Kirill Bulatov 620efaa5c7 terminal_view: Do not treat AltGr character input as a meta sequence on Windows (#63707)
Follow-up to https://github.com/zed-industries/zed/pull/62891
Fixes #63703


https://github.com/user-attachments/assets/5eb198ef-2958-4a43-a2fb-fb0d3a96f642

Release Notes:

- Fixed AltGr / diacritic input being swallowed by the integrated
terminal on Windows.
2026-09-04 12:54:18 +00:00
Kirill Bulatov 3569541038 Stop canonicalizing LSP locations before worktree lookup (#63754)
Closes
https://github.com/zed-industries/zed/pull/61392#issuecomment-5538772188
Follow-up to https://github.com/zed-industries/zed/pull/61392



https://github.com/user-attachments/assets/6c745474-6b6e-4cfa-b1b6-87e9631973bf


Not every language server wants to deal with the canonicalized paths,
some (e.g. gopls) can resolve them themselves, and keep sending
symlinked paths over the LSP — canonicalizing them means we will break
out of the current worktree and open odd singleton files instead.

Release Notes:

- Fixed goToDefinition opening out-of-worktree entries
2026-09-04 12:15:49 +00:00
Kirill Bulatov 8a4bd132a6 Strip local symbols from macOS and Linux release bundles (#63429)
Not sure if this PR is 100% good, since it removes symbols from local
traces, leaving addresses only — but this what Windows seem to do
already, and we have those symbols on Sentry to restore from, which were
needed to normally read Linux perf traces already (see `perf.zip` in
https://github.com/zed-industries/zed/issues/59689#issuecomment-5452720248)

On the upside, uncompressed binaries' are now ~100MB less, which is a
lot — hence decided to open the PR for the review

-------------------

Strips debug info and local symbols from shipped macOS and Linux
binaries, matching what Windows already does with PDBs: `bundle-mac` now
always runs `dsymutil` before a new `strip -x` step, and `bundle-linux`
adds `--discard-all` plus `zed.dbg`/`remote_server.dbg` extraction via
`--only-keep-debug`.

Sentry uploads are unchanged and precede stripping.

The macOS binary UUID and the GNU build id survive stripping, so
user-provided traces stay recoverable without rebuilding at the
reporter's commit: `sample` output resolves via `atos` against the
archived `zed.dwarf`, and `perf.data` via `perf buildid-cache` against
the Sentry-archived binary.

zed binary:
macOS (2026-08-29 nightly): 420478976 -> 316503984 bytes (-24.7%,
-104.0MB)
Linux (v1.17.2 aarch64): 439417448 -> 336967256 bytes (-23.3%, -102.5MB)
Downloads shrink far less, symbols compress ~7:1: the macOS DMG loses
only ~15MB.

Release Notes:

- Improved installed size on macOS and Linux by stripping debug symbols
from release binaries (roughly -25%)
2026-09-02 19:38:12 +00:00
Kirill Bulatov ab7d21d444 Fix workspace diagnostics polling (#63336)
Closes https://github.com/zed-industries/zed/issues/62391

Workspace diagnostics were polled incorrectly:

* Workspace pulls were cancelled and re-sent every 120s.
Pyright-family servers hold the request open forever and re-analyze the
whole workspace on every new one, so the retry loop leaked memory; the
request is now kept open (long-poll), as the spec recommends.

* No re-trigger after a server closed a workspace pull.
ty closes the request when diagnostics change and expects the client to
re-pull
 
* `ServerCancelled` / `retriggerRequest` was ignored.
The spec defaults cancellation data to `{ retriggerRequest: true }`, so
these errors now retrigger workspace pulls and retry document pulls
instead of failing them.

* LSP error codes were erased with `anyhow!(message)`
Errors now carry a typed `lsp::ResponseError` through the chain,
replacing four copies of `ends_with(...)` matching against
rust-analyzer's literal message texts.

* Workspace partial results were not tied to their request.
Stale or numeric-token `$/progress` reports were applied as current data
and could poison `previousResultIds` until a server restart; reports are
now matched against the exact in-flight token.

* `interFileDependencies` was never read.
Every edit re-pulled all other open buffers even for servers declaring
no inter-file dependencies (e.g. ruff); cross-buffer pulls are now gated
on that capability.

* Cross-buffer pulls were unpaced.
All open buffers were pulled back-to-back after each edit debounce; they
are now paced at one document per 500ms.

* The failure valve killed workspace pulls permanently.
51 hard errors over a server's lifetime silently stopped its workspace
pulls until restart

* Concurrent refresh waiters could be dropped instantly.
The capacity-1 refresh channel resolved a second concurrent waiter to
`false` immediately, and request errors dropped queued refreshes;
waiters now queue and carry over to the retried pull.

Release Notes:

- Fixed basedpyright memory leak caused by incorrect workspace
diagnostics polling
2026-09-02 19:12:35 +00:00
Kirill Bulatov 6b5e15ed46 Bump more dependencies (#63379)
* 1st commit fixes bumps `quinn-proto` and `serde_with` to fix the
dependabot alerts

* 2nd commit deduplicates more dependencies

`cargo tree -d` listing: 194 -> 187 top-level entries on the host
target, 298 -> 287 unique duplicated crate-versions across all targets.

<details>
<summary>Deduplicated list</summary>

```
accesskit_consumer (v0.35.0, v0.37.0 -> v0.38.0)
bindgen (v0.71.1, v0.72.1 -> v0.72.1)
nix (v0.28.0, v0.29.0, v0.30.1 -> v0.28.0, v0.30.1)
ordered-float (v2.10.1, v4.6.0 -> v5.5.0)
quick-xml (v0.30.0, v0.37.5, v0.38.3, v0.39.3, v0.41.0 -> v0.30.0, v0.37.5, v0.39.3, v0.41.0)
sysinfo (v0.31.4, v0.37.2 -> v0.31.4, v0.39.6)
wasm-encoder (v0.252.0, v0.254.0 -> v0.254.0)
wasmparser (v0.252.0, v0.254.0 -> v0.254.0)
windows-registry (v0.4.0, v0.5.3, v0.6.1 -> v0.4.0, v0.6.1)
```

`ordered-float v4.6.0` remains in the lockfile only as an inactive
optional dependency of `sea-query`; the compiled graph is fully
deduplicated to v5.5.0.

</details>

Release Notes:

- N/A
2026-09-02 18:21:25 +00:00
Kirill Bulatov 769d0befa7 Support Emmet's wrap with abbreviation (#63383)
Closes https://github.com/zed-industries/zed/issues/15588


https://github.com/user-attachments/assets/2813d235-6dac-4fe6-9ae0-2783e16270ac

Release Notes:

- Added Emmet's wrap with abbreviation support
2026-09-02 18:21:02 +00:00
Kirill Bulatov 239d0aa158 Download wasi-sdk before cleaning the target directory (#63579)
Fix flacks like
https://github.com/zed-industries/zed/actions/runs/33546906778/job/99987145940?pr=63573

`test_extension_store_with_test_extension` gives the extension builder
`target` as its cache at
`crates/extension_host/src/extension_store_test.rs:801`.
`install_dev_extension` performs a real extension and grammar build at
`crates/extension_host/src/extension_host.rs:1139`.
When `target/wasi-sdk` is absent (e.g. after `target/` cleanup), the
builder downloads and extracts it at
`crates/extension/src/extension_builder.rs:511`.

In the failed run, downloading and extracting the SDK consumed 59
seconds, grammar compilation began at 60 seconds, and the timeout fired
immediately.

Release Notes:

- N/A
2026-09-01 21:20:46 +00:00
Kirill Bulatov adc72a5a49 Support CSV preview in project-less set-ups (#63350)
Closes https://github.com/zed-industries/zed/issues/63265

Release Notes:

- Fixed CSV preview not showing in project-less set-ups
2026-08-31 12:04:06 +00:00
Kirill Bulatov 24254879b7 Stop re-resolving editorconfig sections on every language settings lookup (#63323)
Closes https://github.com/zed-industries/zed/issues/59689

Symbolicating the reporter's profile (21s of typing, Windows) showed
`Window::draw` taking 63% of the main thread at ~62 redraws/s (p95 draw
= 40ms), and 30.9% of the *entire* main thread inside
`EditorconfigStore::properties()`:
every `LanguageSettings` lookup — several per frame via
`DisplayMap::tab_size`, `MultiBuffer::language_settings`, indent guides,
and `LspStore::supports_range_formatting` — re-ran the full editorconfig
resolution (ancestor walk plus `ec4rs::Section::apply_to` over every key
of every section) and then cloned the whole `LanguageSettings` struct.
Real-world `.editorconfig` files carry hundreds of irrelevant keys
(`dotnet_*`, `ij_*`, ...), so the per-call map assembly dominated:
`RtlAllocateHeap` 7.3%, `memcmp` 7.0%, `memcpy` 6.6%,
`Properties::find_idx` 5.9% self time.

## Commit 1: resolve only the editorconfig properties Zed reads

- `EditorconfigStore::properties()` now applies only the 7 keys Zed
consumes (`indent_style`, `indent_size`, `tab_width`, `end_of_line`,
`max_line_length`, `insert_final_newline`, `trim_trailing_whitespace`)
instead of materializing every key of every matching section.
- Worktrees with no editorconfig at all now return `None` early instead
of allocating an empty `Properties` and forcing a `LanguageSettings`
clone on every lookup.
- Adds an `editor_render_with_editorconfig` benchmark: maximized window,
file-backed buffer at `src/app/components/editor_pane.ts`, a root
`.editorconfig` shaped after [the second
report](https://github.com/zed-industries/zed/issues/59689#issuecomment-5475124891)
(no `root = true`, a `[*]` section with ~3200 keys, 25 sections with
large `{...}` alternation lists) plus a 4-level nested chain, and a
typing workload (insert/delete + cursor moves).

```
main (770aac345c):      time: [37.905 ms 38.005 ms 38.107 ms]
                        time: [38.069 ms 38.157 ms 38.248 ms]
this commit:            time: [2.8547 ms 2.8618 ms 2.8702 ms]
                        time: [2.8372 ms 2.8435 ms 2.8510 ms]
```

The candidate is ~13x faster.
GPUI frame report over the same workload: window draw p50 12.71 ms →
0.76 ms, p99 23.38 ms → 1.22 ms; frame budget overruns 556 → 0.

## Commit 2: cache resolved `LanguageSettings` per buffer

- `Buffer` and `BufferSnapshot` now hold `resolved_settings:
Arc<LanguageSettings>`, recomputed by a `SettingsStore` global observer.
- Global methods for retrieving the settings are still there, but buffer
only uses them for multi buffer's `language_settings_at` with an
injected language different from the buffer's primary; cold scopes such
as extension API, LSP workspace configuration, server startup still use
the global resolution

Same benchmark, same method, on top of commit 1 (alternated runs, quiet
machine):

```
commit 1:               time: [2.8547 ms 2.8618 ms 2.8702 ms]
                        time: [2.8372 ms 2.8435 ms 2.8510 ms]
this commit:            time: [1.6256 ms 1.6325 ms 1.6403 ms]
                        change: [-42.685% -42.270% -41.854%] (p = 0.00 < 0.05)
                        time: [1.6221 ms 1.6284 ms 1.6352 ms]
```

Window draw p50 0.76 ms → 0.47 ms, p99 1.22 ms → 0.69 ms, max 1.02 ms;
zero frame-budget overruns on both sides.
Combined, the benchmark's per-keystroke cost drops ~23x vs `main`
(37.9–38.2 ms → 1.62–1.64 ms).


Release Notes:

- Improved typing and rendering performance in projects that use
`.editorconfig` files.
2026-08-31 11:58:50 +00:00
Kirill Bulatov ded896cc91 Keep first match selecting during type on search (#63375)
Follow-up to https://github.com/zed-industries/zed/pull/62506

Before:


https://github.com/user-attachments/assets/19f6f0df-c5e3-417e-a351-13a09ccb726b

After:


https://github.com/user-attachments/assets/0b302ed7-a98d-4db4-81bc-d67f5cc7db87


* Fixes type on search not selecting the very first result as the
regular search does.
* Unifies the flicker freezing state better in the editor

Release Notes:

- N/A
2026-08-31 11:41:34 +00:00
Kirill Bulatov 6840b8d2fc Fix repo docs (#63486)
* ensures The Rule cannot be accidentall removed
* fixes the perf command example to capture call graphs, to avoid
round-trips like
https://github.com/zed-industries/zed/issues/59689#issuecomment-5453623044
(samples without call graphs are not quite usable for investigating bugs
like these)


Release Notes:

- N/A
2026-08-31 11:00:40 +00:00
Kirill Bulatov 68b6504506 Enable share-generics in release bundle builds (#63432)
Cargo joins `build.rustflags` across config sources, so the base
`symbol-mangling-version=v0` and `tokio_unstable` flags still apply
after the newly added config.

With sccache disabled, `cargo build --release -p zed` on macOS: 
Before: zed binary 420677880 bytes
After: zed binary 375109048 bytes (-10.8%, -45.6MB)

After `strip -x` of both
(https://github.com/zed-industries/zed/pull/63429):
313879024 -> 307727432 bytes (-2.0%, -6.2MB)
The rest of the delta is the smaller symbol table. `drop_glue`
instantiations: 101778 -> 65041.

Release Notes:

- N/A
2026-08-31 05:42:11 +00:00
Kirill Bulatov 399258feea Reduce LLVM IR bloat in closure funnels (#63426)
Follow-up to https://github.com/zed-industries/zed/pull/63232

Cuts closure monomorphization in settings and editor: settings file
updates now share one boxed write-pipeline instantiation instead of
inlining the `SettingsContent` clone, both `serde_json::to_value` calls,
and the JSON diff at every call site; `Editor::register_action` and the
settings enum dropdown get the same treatment. Behavior and public
signatures are unchanged; thin generic shims remain.

Symbol table of the release binary:
Before: `update_settings_file_inner` 229 instantiations, inlined
`serde_json` `SerializeMap` machinery 6547 copies
After: 3 instantiations, 673 copies (-89.7%); `render_dropdown` is no
longer instantiated at all

With sccache disabled, `cargo clean` and `cargo build --release -p zed`:
Before: zed binary 420677880 bytes
After: zed binary 396999464 bytes (-5.6%, -23.7MB)

Release Notes:

- N/A
2026-08-29 22:51:20 +00:00