Commit Graph
100 Commits
Author SHA1 Message Date
Kirill Bulatov 5a1c0e3da0 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 a596e1b294 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 d1f71d8cd0 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 f2e3359972 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 1753d7f52b 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 (bec63dee23): 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 87d3b5fdfd 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: `e0590874fd`, measured after `strip -x`.
- Linux: `b664a4004269`, 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 b664a40042 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 be1e2facfa Check remote server on each commit (#64283)
Release Notes:

- N/A
2026-09-16 17:01:52 +00:00
Kirill Bulatovandzed-zippy[bot] 2433f1d15d 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 b84803f56f 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 e0590874fd Share generics better and strip rodio audio features (#64260)
* Preserve bundle compiler flags commit commit is a follow-up to
https://github.com/zed-industries/zed/pull/63432

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

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

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

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

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

Release Notes:

- N/A
2026-09-16 16:03:18 +00:00
Kirill Bulatov 8b9a2df705 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 (bec63dee23): 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 5e04c64b52 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 c20a43eb7b 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 a5be476362 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 bec63dee23 Revert "Implement inspector flag (#62920)" (#64248)
This reverts commit bf2d51bcfd.

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 7b2ccdffc6 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 0446ad2294 Refine recent commands' UX (#64181)
Follow-up to https://github.com/zed-industries/zed/pull/63388 


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

Release Notes:

- Improved recent commands' UX
2026-09-15 09:58:45 +00:00
Kirill Bulatov 3c9e435c30 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 ec0dc11b43 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 4e693c3b6b 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 b02587f47b 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 4d88c159f7 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 7265ff479a 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 ed192bf4f1 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` (`ee2366a395`):**

```
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 3af83d6d0b 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 66a1d8d7cb 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 5697636cd5 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 a6b3c5b33d 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 2e9b4fe596 Unify copy actions for agent panel and markdown (#63884)
Before, it was not possible at all to copy the text from the agent
panel, only its markdown.
The PR breaks the existing ctrl/cmd-c binding there by using the same
approach markdown preview does: copy as text by default, allow to copy
as markdown via the context menu.

Before:


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

After:


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


Release Notes:

- Changed agent panel to copy text with cmd/ctrl-c, as markdown preview
does. `markdown::CopyAsMarkdown` action is available still and can be
bound if needed.
2026-09-08 11:21:20 +00:00
Kirill Bulatovandzed-zippy[bot] 84148a0f73 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] d2b09224b3 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 baf8bde0b0 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 3f5abf5084 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 f659fcc000 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 5d1147a6e4 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 9be65a8dfe Strip local symbols from macOS and Linux release bundles (#63429)
Not sure if this PR is 100% good, since it removes symbols from local
traces, leaving addresses only — but this what Windows seem to do
already, and we have those symbols on Sentry to restore from, which were
needed to normally read Linux perf traces already (see `perf.zip` in
https://github.com/zed-industries/zed/issues/59689#issuecomment-5452720248)

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

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

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

Sentry uploads are unchanged and precede stripping.

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

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

Release Notes:

- Improved installed size on macOS and Linux by stripping debug symbols
from release binaries (roughly -25%)
2026-09-02 19:38:12 +00:00
Kirill Bulatov 8b32975a05 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 b80f016f89 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 74f3fa1454 Support Emmet's wrap with abbreviation (#63383)
Closes https://github.com/zed-industries/zed/issues/15588


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

Release Notes:

- Added Emmet's wrap with abbreviation support
2026-09-02 18:21:02 +00:00
Kirill Bulatov 91c7b84774 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 7ea8eb3f2e 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 b6490c5fbd 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 (f034409b6a):      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 77d716d5ce 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 c99db2149e Fix repo docs (#63486)
* ensures The Rule cannot be accidentall removed
* fixes the perf command example to capture call graphs, to avoid
round-trips like
https://github.com/zed-industries/zed/issues/59689#issuecomment-5453623044
(samples without call graphs are not quite usable for investigating bugs
like these)


Release Notes:

- N/A
2026-08-31 11:00:40 +00:00
Kirill Bulatov c032dcc3bc 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 6dc2206180 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
Kirill Bulatov 88483df921 Show last recently used commands on top of the picker's list (#63388)
Closes #8106
Closes #8107


https://github.com/user-attachments/assets/2aba378a-657d-4de9-a45a-6106325281e5

Release Notes:

- Improved command palette ordering: commands are sorted by recency of
use, and previously used commands rank above unused ones while
filtering.
2026-08-28 22:35:33 +00:00
Kirill Bulatov 036af28f9d Restore the rule (#63384)
Release Notes:

- N/A
2026-08-28 20:04:24 +00:00
Kirill Bulatov 8a54abc4b9 Improve outline fonts and colors (#63325)
Closes https://github.com/zed-industries/zed/issues/58580

* Outline modal and panel now use buffer fonts for the contents:

<img width="1728" height="1117" alt="modal"
src="https://github.com/user-attachments/assets/5e0ef6e3-be39-4949-bc32-7087a51a02ec"
/>
<img width="1728" height="1092" alt="panel"
src="https://github.com/user-attachments/assets/5cf9edbf-5ff3-402d-a2ca-bc915bd10e8e"
/>

* Gutter colors are now fall-backed to tree-sitter better, if no
semantic tokens could be retrieved due to multi buffer shenanigans:

<img width="1728" height="426" alt="gutter"
src="https://github.com/user-attachments/assets/a175b2c8-843e-4632-b030-3edfbd350982"
/>

Release Notes:

- Improved outline fonts and colors
2026-08-28 03:28:04 +00:00
Kirill Bulatov 5b8e551dc0 Reduce LLVM IR bloat (#63232)
Cuts serde monomorphization in settings_content: both parse entry points
now share one deserializer instantiation, and the flatten-heavy settings
structs deserialize through a small manual routing macro instead of
serde's Content buffering.
Parsed values seem to be unchanged; JSON schema and serialization
derives are untouched.

`cargo llvm-lines -p settings_content`:
Before (a90d3772f8): 2716889 lines, 92801 copies
After: 1203744 lines (-55.7%), 47122 copies (-49.2%)

With sccache disabled, `cargo clean` and `cargo build -p zed`:
Before: 132.8s wall, 1440.6s CPU, zed binary 1241791992 bytes
After: 128.8s wall (-3.0%), 1400.0s CPU (-2.8%), zed binary 1204044312
bytes (-3.0%, -37.7MB)

Release Notes:

- N/A
2026-08-26 14:33:14 +00:00
Kirill Bulatov f36284a155 Bump dependencies to dedupe the crate graph (#63231)
Deduplicates crates with different versions from the graph, drops unused
features.

`cargo tree -d duplicate` listing: 160 -> 112 lines.

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

```
base64 (v0.22.1, v0.21.7 -> v0.22.1)
convert_case (v0.11.0, v0.10.0, v0.8.0 -> v0.11.0, v0.10.0)
core-foundation (v0.10.0, v0.9.4 -> v0.10.0)
cssparser (v0.36.0, v0.35.0 -> v0.37.0, v0.36.0)
fancy-regex (v0.18.0, v0.16.2 -> v0.19.0)
fixedbitset (v0.5.7, v0.4.2 -> v0.5.7)
h2 (v0.4.12, v0.3.27 -> v0.4.12)
heck (v0.5.0, v0.4.1, v0.3.3 -> v0.5.0, v0.4.1)
html5ever (v0.39.0, v0.35.0 -> v0.39.0)
hyper (v1.7.0, v0.14.32 -> v1.7.0)
hyper-rustls (v0.27.9, v0.24.2 -> v0.27.9)
mach2 (v0.6.0, v0.5.0, v0.4.3 -> v0.6.0, v0.5.0)
markup5ever (v0.39.0, v0.35.0 -> v0.39.0)
phf (v0.13.1, v0.12.1, v0.11.3 -> v0.13.1, v0.11.3)
phf_codegen (v0.13.1, v0.11.3 -> v0.13.1)
phf_generator (v0.13.1, v0.12.1, v0.11.3 -> v0.13.1, v0.11.3)
phf_macros (v0.13.1, v0.12.1, v0.11.3 -> v0.13.1, v0.11.3)
phf_shared (v0.13.1, v0.12.1, v0.11.3 -> v0.13.1, v0.11.3)
prost (v0.12.6, v0.9.0 -> v0.14.4)
prost-build (v0.12.6, v0.9.0 -> v0.14.4)
prost-derive (v0.12.6, v0.9.0 -> v0.14.4)
prost-types (v0.12.6, v0.9.0 -> v0.14.4)
rustix (v1.1.4, v0.38.44 -> v1.1.4)
rustls (v0.23.40, v0.21.12 -> v0.23.40)
rustls-native-certs (v0.8.3, v0.6.3 -> v0.8.3)
rustls-pemfile (v2.2.0, v1.0.4 -> v2.2.0)
rustls-webpki (v0.103.13, v0.101.7 -> v0.103.13)
security-framework (v3.5.1, v2.11.1 -> v3.5.1)
socket2 (v0.6.3, v0.5.10 -> v0.6.3)
string_cache (v0.9.0, v0.8.9 -> v0.9.0)
string_cache_codegen (v0.6.1, v0.5.4 -> v0.6.1)
strum (v0.28.0, v0.27.2 -> v0.28.0)
strum_macros (v0.28.0, v0.27.2 -> v0.28.0)
tendril (v0.5.1, v0.4.3 -> v0.5.1)
tokio-rustls (v0.26.4, v0.24.1 -> v0.26.4)
tungstenite (v0.28.0, v0.27.0 -> v0.28.0)
web_atoms (v0.2.6, v0.1.3 -> v0.2.6)
which (v6.0.3, v4.4.2 -> v8.0.5)
```

</details>


Release Notes:

- N/A
2026-08-26 14:33:13 +00:00
Kirill BulatovandKostia R 677e8174b5 Flush all persistence threads for the rest for various shutdown cases (#63213)
Follow-up to https://github.com/zed-industries/zed/pull/60477
Closes #25022

We have more places that need a similar synchronization before quitting
the app: restarts on update, reloading the workspace.

On top of it, two more findings:

* `on_app_will_quit` was redundant: the global `on_app_quit` hook
flushes a strict superset of the same tasks and runs before windows are
cleared, while the entity hook held only a weak handle and could never
flush the `Window`-dependent workspace state anyway.

* previously, shutdown was run as `cx.spawn`, yet main threads got
parked on app shutdown: now using `cx.background_spawn` instead

Release Notes:

- Improved data persistence during various app shutdown cases

---------

Co-authored-by: Kostia R <k-bx@k-bx.com>
2026-08-26 14:33:10 +00:00
Kirill BulatovandBennet Bo Fenner 6c6673e4a5 Fix shallow diffs causing a lot of computations (#63024)
For repositories with shallow mode enabled, before, Zed instantly loaded
diff changes which could be very large and CPU-demanding:


https://github.com/user-attachments/assets/5577730a-efef-424f-b749-501394a8b51f

Now, we show the following state instead of loading:

<img width="1728" height="1084" alt="after"
src="https://github.com/user-attachments/assets/03cc47fe-7074-4e8b-ba12-2fefa101377d"
/>

(the button allows to move on and do the load nonetheless)


Release Notes:

- Fixed shallow diffs causing a lot of computations

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2026-08-26 14:33:08 +00:00
Kirill Bulatov 28c7f0cd8e Enable project search on type by default (#62506)
Closes https://github.com/zed-industries/zed/issues/9318

Most of the diff is tests.

Notable behavior changes during this mode, compared to current mode:

* unsaved changes in multi buffer won't spawn any "save or not" pop-ups
during typing — submitting the query still does it, as before.
Unsaved files will stay so after being sorted out on typing: we cannot
save them by default as file-less buffers need a save modal; Zed should
already be able to persist and restore such changes on restart.

* gutter may jump during search, if new excerpts with large line numbers
appear during query input — yet it would not shrink back to avoid
excessive flickering and rewraps

Release Notes:

- Enabled project search on type by default (use `{ "search": {
"search_on_type": false } }` to restore the previous behavior)
2026-08-26 14:33:03 +00:00
Kirill Bulatov ee2366a395 editor: Truncate oversized LSP hover contents before display (#63022)
Closes https://github.com/zed-industries/zed/issues/45728

Similar to VSCode, trims the hovers down to 100KB of text.

Release Notes:

- Fixed overly large LSP hovers causing performance issues
2026-08-24 08:56:20 +00:00
Kirill Bulatov a86d40eda5 Do not show useless toasts during recursive blaming (#63111)
Follow-up to https://github.com/zed-industries/zed/pull/62614

<img width="1728" height="1084" alt="bad"
src="https://github.com/user-attachments/assets/5fafb9cb-38be-44ba-b8a3-a33dc10106da"
/>

Properly disable actions instead of showing odd toasts and do nothing
when invoked without the prerequisites.

Release Notes:

- N/A
2026-08-23 19:29:43 +00:00
Kirill Bulatov f7f3b90dca Register terminal panel before restoring serialized terminals (#62712)
Closes https://github.com/zed-industries/zed/issues/62435
Part of https://github.com/zed-industries/zed/issues/60548

Before:


https://github.com/user-attachments/assets/6b5147da-44cb-40c7-9da5-c50145e2ab4e

After:


https://github.com/user-attachments/assets/c58423cc-ea99-40d9-ad18-23b31dfb8e5d


Previously, `TerminalPanel::load` awaited full deserialization of
serialized
terminals (each awaiting directory environment capture via a login
shell)
before the panel was registered in the dock. 

Until then, `terminal_panel::Toggle{Focus}` was a silent no-op: the
workspace finds no
panel in any dock, the keystroke is eaten, and nothing happens.

When it got eventually restored, it would close whatever panel in the
dock was open manually instead, wrecking the workflow.

Repro:
1. Add `case "$ZSH_EXECUTION_STRING" in *--printenv*) sleep 10;; esac`
to `~/.zshrc`.
2. Open a project, open at least one terminal in the panel, quit Zed
(Cmd+Q).
3. Relaunch via Dock/Spotlight (not the `zed` CLI, which skips env
capture via
   `cli_environment`).
4. Press the terminal shortcut within 10s: nothing happens; after ~10s
the
   panel appears and the shortcut works.

* `Register terminal panel before restoring serialized terminals` — the
panel
  is now created and registered immediately, and restoration runs in
  panel-owned tasks (cancelled on panel drop, nothing detached).
  Terminal-adding paths were initially queued behind restoration (later
  replaced by grafting, see below); the default shell spawns only if the
  panel ends up active and empty after restore.

* `Stop replaying serialized dock state over manual panel changes` —
fixes a
related race: `Dock::add_panel` replayed the serialized dock state
(active
panel, visibility, zoom) on every panel insertion, so a late-loading
panel
would re-activate the serialized panel over one the user had switched to
in
the meantime (e.g. the terminal panel yanking the dock away from the
agent
  panel), or re-open a dock the user had closed. Serialized state is now
applied at most once and is discarded as soon as the user changes the
dock
state manually. The new tests fail without this change and pass with it.

* `Show restoration progress in the terminal panel and allow spawning
terminals during it` — while terminals restore, the panel shows a
spinner
with "Restoring terminals…" instead of a blank pane, and logs the
restored
count and elapsed time. Supersedes the queuing from the first commit:
new
terminals spawn immediately, and any that land mid-restore are grafted
into
the restored layout instead of being lost. Serialization is paused
during
restoration, so quitting mid-restore can no longer persist a partial tab
  list and silently drop terminals.


Release Notes:

- Fixed the terminal panel not opening at all under certain
circumstances, made panels no longer switching back to the serialized
one when opened during startup.
2026-08-21 17:26:29 +00:00
Kirill Bulatov 7dcda48fdf markdown: Restore fallback language highlighting for untagged code blocks (#63023)
Restores fallback highlights lost in
https://github.com/zed-industries/zed/pull/28217

Release Notes:

- N/A
2026-08-21 16:00:50 +00:00
Kirill Bulatov ff54ece5b8 Update .rules to prompt for self-review before submitting PR (#62945)
Release Notes:

- N/A
2026-08-21 10:32:14 +00:00
Kirill Bulatov b4993eb89c Properly deduplicate overlapping range formatting results (#62935)
Fixes https://github.com/zed-industries/zed/issues/62780

When formatting changed-only regions, we have received formatting
changes that are larger than the regions submitted.
Previous code merged only adjacent hunks in a single response, without
merging anything else, e.g. multiple responses' ranges that overlapped.

Release Notes:

- Fixed overlapping range format results duplicating the text
2026-08-20 12:15:06 +00:00
Kirill BulatovandMrSubidubi aad8ae4b34 Fix overflowing highlights in the markdown blocks (#62714)
Before:
<img width="1728" height="1084" alt="before"
src="https://github.com/user-attachments/assets/68a33e27-7ee7-42cc-9f1b-53e541ef8d2f"
/>


After:
<img width="1728" height="1084" alt="after"
src="https://github.com/user-attachments/assets/b51df462-6457-44fd-ba83-f13c6129125d"
/>


Release Notes:

- Fixed overflowing highlights in the markdown blocks

---------

Co-authored-by: MrSubidubi <finn@zed.dev>
2026-08-17 19:07:31 +00:00
Kirill Bulatov 4f3ea0998f Reuse char-scan invisibles detection in highlight_invisibles (#62715)
Follow-up to
https://github.com/zed-industries/zed/pull/62478#discussion_r3769810809

New bench results:

| corpus | old | new | speedup |
|---|---|---|---|
| ascii, no invisibles | 83 MB/s | 580 MB/s | **7.0x** |
| unicode, no invisibles | 88 MB/s | 442 MB/s | **5.0x** |
| sparse invisibles | 63 MB/s | 431 MB/s | **6.9x** |
| dense invisibles | 82 MB/s | 109 MB/s | 1.3x |


Release Notes:

- N/A
2026-08-17 09:45:39 +00:00
Kirill Bulatov 468837a78d Merge array settings from extension contributions instead of overwriting (#62686)
Closes https://github.com/zed-industries/zed/issues/62572

Reworks https://github.com/zed-industries/zed/pull/54950 — instead of
unconditionally replacing the array with a different one, now does the
replacement only when the user settings are set.
The rest now merges into the array.


Release Notes:

- Fixed array merging for extensions case
2026-08-16 21:10:59 +00:00
Kirill Bulatov 3a21e04379 Fixed the zoomed agent panel closing unexpectedly on rewind (#62711)
`ThreadView::regenerate` does `thread.rewind()` which de-focused the
message editor mid-flight causing the zoomed panel to disappear.

* workspace: Keep zoomed panels open when window focus is lost

Commit adds a test + tweaks a default, generic, fallback to be more
lenient: instead of focusing the workspace (and hiding all panels right
away), try to fall back to whatever panel open

* gpui: Restore focus to nearest surviving ancestor when focus is lost

Commit tries to push it down to a library level and add a way to fall
back to closest ancestor that's still visible with the focus instead.


Release Notes:

- Fixed the zoomed agent panel closing unexpectedly on rewind
2026-08-16 14:42:24 +00:00
Kirill Bulatov 20a95914df Remove the problematic data field from the snapshot (#62685)
Follow-up to https://github.com/zed-industries/zed/pull/62658

The problematic field is not needed at all in the snapshot, as can be
constructed before starting the scanner — moreover, the field had
accumulated more and more paths between rescans, leaking memory.

Now, we spend more time traversing the entire tree between rescans, but
that happens for rescans only which should be relatively rare?

Release Notes:

- N/A
2026-08-15 19:31:04 +00:00
Kirill Bulatov c1dab7a0d3 Support blaming parent revisions (#62614)
Closes https://github.com/zed-industries/zed/discussions/42583

Adds more tooltip entries and `editor::BlameRevision`,
`editor::BlamePreviousRevision` actions to use.
Started to highlight gutter blame entries that belong to currently
annotated commit.


https://github.com/user-attachments/assets/ba754e0b-6431-407c-8d79-2f8b0324fde1


Release Notes:

- Supported blaming parent revisions
2026-08-14 20:24:13 +00:00
Kirill Bulatov 10190eed88 Properly measure invisible character replacement (#62478)
Another discovery during search-on-type work.

Follow-up to https://github.com/zed-industries/zed/pull/19298 and
https://github.com/zed-industries/zed/pull/19846

With the `"soft_wrap": "editor_width"`, I should have no text contents
overflowing the editor width.

Before (scrollbar shown incorrectly):
<img width="2032" height="1162" alt="before"
src="https://github.com/user-attachments/assets/8b89ba6d-f98b-4ea0-89f2-8a22e968c438"
/>

After:
<img width="2032" height="1162" alt="after"
src="https://github.com/user-attachments/assets/93f62c2b-4981-48ae-aebd-8b0021348787"
/>


Release Notes:

- Fixed invisible symbol replacement width calculation
2026-08-14 09:35:59 +00:00
Kirill Bulatov 851bf3d499 Make file scanner less eager in non-git-tracked directory trees (#62583)
Fixes https://github.com/zed-industries/zed/issues/35780
Collab schema migration PR:
https://github.com/zed-industries/cloud/pull/3422
The corresponding database schema migration has been created in the
Cloud repo and applied to the production database.

Before, Zed scanned each and every entry in the tree down from the
directory it was opened in, except gitignored files and scan exclusions.
The approach is unchanged, if Zed detects it was open inside a git
repository: e.g. the directory open in Zed contains `.git` directory.

For the rest of the projects, 2 optimizations are made:

* Limit the depth of file scan traversal.
Now, `file_scan_depth` (default `5`) restricts Zed from traversing any
directory that has same number or more segments in its file path.


Such directories behave similar to gitignored directories: their
contents is not available in file finder, project search and project
panel, but can be lazily traversed when the directory is expanded (e.g.
project panel expands it or a nested file is open by path via terminal,
etc.)

To indicate that to the users, a status entry is shown firs time the
limitation is hit in the project:

<img width="858" height="133" alt="image"
src="https://github.com/user-attachments/assets/7da6cfbb-98b4-4cc3-bf2a-8902a9597a15"
/>

* During the scan, any git repositories that are not direct children of
the directory open in Zed (depth >= 2), are traversed and indexed
normally, but their git metadata is never fetched eagerly.

Only when Zed opens a buffer from that repo the git metadata is fetched
and applied.

All that combined now uses a way more moderate amount of CPU and RAM
when opening `~`:

<img width="1717" height="368" alt="Screenshot 2026-08-13 at 17 43 53"
src="https://github.com/user-attachments/assets/ec83e2a9-f7cc-452b-8eb7-af158284ca4e"
/>

File scan inclusions and exclusions are considered still for such
projects.
Set `file_scan_depth` to `0` to enable old behavior.
The setting is supported in the project settings, so custom values can
be set based on the project's structure.

---

Release Notes:

- Fixed Zed using a lot of memory and CPU in large, non-git-tracked,
directory trees
2026-08-13 17:07:06 +00:00
Kirill Bulatov fc58ad2226 Unify non-Unicode file detection code (#62581)
Closes https://github.com/zed-industries/zed/issues/62464
Closes https://github.com/zed-industries/zed/issues/62212

As a bonus, fixes the project search not working in BOM'd UTF-16 files.

Release Notes:

- Fixed project search not working in some non-Unicode files
2026-08-13 16:49:32 +00:00
Kirill Bulatov 14bc768e44 Adjust language docs (#62551)
Closes https://github.com/zed-industries/zed/issues/62548

Puts
https://github.com/zed-industries/zed/issues/61908#issuecomment-5142104901
into docs.

Release Notes:

- N/A
2026-08-13 10:22:47 +00:00
Kirill Bulatov 04bc77c004 Shrink agent terminals on clear (#62504)
Makes agent panel a bit more ergonomic: on terminal reset, user clear
(demonstrated on videos), etc. shrink its size down.

Before:


https://github.com/user-attachments/assets/ce722f39-0ac7-4b86-9ff6-ecd8e327cc43

After:


https://github.com/user-attachments/assets/f1825c9c-e52e-4d08-ac95-1403a6b0b1ea


Release Notes:

- Improved terminal behavior in agent panel on clear
2026-08-12 07:11:15 +00:00
Kirill Bulatov c452dd02d0 Bump stacksafe (#62468)
Spotted
```
The package `block v0.1.6` currently triggers the following future incompatibility lints:
> warning: static of uninhabited type
>   --> .../block-0.1.6/src/lib.rs:64:5
>    |
> 64 |     static _NSConcreteStackBlock: Class;
>    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>    |
>    = note: uninhabited statics cannot be initialized, and any access would be an immediate error
>    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
>    = note: for more information, see issue #74840 <https://github.com/rust-lang/rust/issues/74840>

The package `proc-macro-error2 v2.0.1` currently triggers the following future incompatibility lints:
> warning[E0365]: extern crate `proc_macro` is private and cannot be re-exported
>    --> .../proc-macro-error2-2.0.1/src/lib.rs:494:13
>     |
> 494 |     pub use proc_macro;
>     |             ^^^^^^^^^^
>     |
>     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
>     = note: for more information, see issue #127909 <https://github.com/rust-lang/rust/issues/127909>
> help: consider making the `extern crate` item publicly accessible
>     |
> 277 | pub extern crate proc_macro;
>     | +++
```
warnings recently.

The former is impossible to fix quickly as needs a migration to `objc2`,
but the latter is easily fixed by a version bump, ergo this PR.

Release Notes:

- N/A
2026-08-11 09:54:53 +00:00
Kirill Bulatov 589739b816 Fix the syntax layer panic (#62366)
While working on the project search on type PR and testing it, uncovered
this bug and split off into a separate commit

Release Notes:

- N/A
2026-08-10 16:58:49 +00:00
Kirill Bulatov 7d6722f9f4 Show error toast on startup for malformed tasks (#62387)
Closes https://github.com/zed-industries/zed/issues/61208

Before, Zed showed no toasts on startup when tasks.json contained
malformed entries, also if there were two top-level arrays, the last one
was silently discarded without any toasts too.

The PR fixes both.

Release Notes:

- Fixed error toast not showing for malformed tasks.json
2026-08-10 16:42:30 +00:00
Kirill Bulatov 3692029a80 Bump rustc to 1.97 (#62395)
Release Notes:

- N/A
2026-08-09 22:29:52 +00:00
Kirill Bulatov 8d7256608b Properly deserialize workspace/diagnostic/refresh empty parameters (#62281)
Closes https://github.com/zed-industries/zed/issues/62187

Treats `()` as `null` for incoming requests.

Release Notes:

- N/A
2026-08-07 12:11:38 +00:00
Kirill Bulatov db73efafe4 Fix the display point out of range panic due to wrong coordinate space used (#62055)
Closes ZED-AKV
Closes ZED-ANB

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

The original PR mixed up the coordinate spaces, and the newly added
methods used buffer rows (as the existing code did before that PR), but
the new code uses `FoldMap` which expects a tab row instead of the
buffer one.

Release Notes:

- Fixed a panic when selections are added by tab-expanded column
2026-08-01 21:34:47 +00:00
Kirill Bulatov 01961bef59 Speed up cargo build -p zed compilation (#62059)
Splits the crate graph.
Before, the compilation graph: `editor → picker_preview → search →
project_panel → open_path_prompt → recent_projects → title_bar →
collab_ui → zed`
After, the compilation graph: `editor → picker_preview → search →
agent_ui → sidebar → zed`

With sccache disabled and project fully built, `touch
crates/editor/src/editor.rs` and `cargo build -p zed` took time
Before (0500fd9ee9): 13.19s
After: 11.85s (-10.2% speed up)

Each commit contains a separate compilation instructions, and a test in
the final commit.
The main approach is to split coupled crates and replace them with
`zed_actions` and move some shared functionality into `git_ui_core` new,
shared module.

I've also tried to add a test to prevent common pitfalls, but not sure
I'm happy with the end result — can remove it if it looks too synthetic.

Release Notes:

- N/A
2026-08-01 19:42:37 +00:00
Kirill Bulatov 4d27124882 Fix parameter colors for gruvbox themes (#61983)
Left before, right after:
<img width="1728" height="370" alt="image"
src="https://github.com/user-attachments/assets/3229ba26-18e6-415e-8df3-25fa5fea43aa"
/>

Closes https://github.com/zed-industries/zed/issues/61976

https://github.com/zed-industries/zed/pull/61134 picked a wrong color
for `variable.parameter` that exactly matched `variable.special` and
caused visual conflicts.
Instead, use `variable` for such colors.


Release Notes:

- Fixed Gruvbox parameter colors
2026-07-31 10:27:51 +00:00
Kirill Bulatov 5d4a11358d Do not drop other servers' data on semantic token refresh (#61795)
Closes https://github.com/zed-industries/zed/issues/60825

Release Notes:

- Fixed semantic tokens overly invalidated on
`workspace/semanticTokens/refresh`
2026-07-30 08:36:31 +00:00
Kirill BulatovandFinn Evers a76b5fee01 Fix mouse multi cursor placement for wrapped lines (#61590)
Closes https://github.com/zed-industries/zed/issues/25237


https://github.com/user-attachments/assets/0f1d54a0-c8f1-4b49-8327-73375a2e1f4e


Release Notes:

- Fixed mouse multi cursor placement for wrapped lines

---------

Co-authored-by: Finn Evers <finn@zed.dev>
2026-07-28 12:49:43 +00:00
Kirill Bulatov a59eeb8436 Instantly acknowledge workspace/diagnostic/refresh (#61772)
Closes https://github.com/zed-industries/zed/issues/61692

Makes no sense to wait for anything at all when receiving such requests,
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#diagnostic_refresh
does not imply anything either.

Release Notes:

- Fixed diagnostics refresh deadlocking certain language servers
2026-07-28 12:32:28 +00:00
Kirill Bulatov 0cc6d59389 Properly replace hints per each chunk (#61562)
Follow-up to hints part of
https://github.com/zed-industries/zed/pull/61523

Instead of appending to the chunk data, we have to replace as we always
get all hints for the entire chunk.
Given that we order and invalidate the requests by `Version`, this can
only happen when a racy requests from e.g. same file split or /refresh
and edit etc. happens.

Release Notes:

- N/A
2026-07-24 09:48:03 +00:00
Kirill Bulatov b5e07a42c3 Use proper rules for merging language server settings (#61546)
Closes https://github.com/zed-industries/zed/issues/61524

https://github.com/zed-industries/zed/issues/60763 was a bogus issue:
the semantic of root `language_settings` is the **default settings for
all languages**, not a "magic string that gets applied when an `!x`
exclusion is mentioned there".

Thus, reverts https://github.com/zed-industries/zed/pull/60984 and
redoes https://github.com/zed-industries/zed/pull/60000 in a correct
way: more custom settings replace less custom ones, same applies to the
language server settings.
Instead of doing some odd `!x` manipulations, the right fix is to remove
the old state as

```diff
 impl merge_from::MergeFrom for AllLanguageSettingsContent {
     fn merge_from(&mut self, other: &Self) {
         ...
         self.defaults.merge_from(&other.defaults);
         for language_settings in self.languages.0.values_mut() {
+            let language_servers = language_settings.language_servers.take();
             language_settings.merge_from(&other.defaults);
+            language_settings.language_servers = language_servers;
         }

         for (language_name, user_language_settings) in &other.languages.0 {
             if let Some(existing) = self.languages.0.get_mut(language_name) {
                 existing.merge_from(&user_language_settings);
             } else {
                 let mut new_settings = self.defaults.clone();
+                new_settings.language_servers = None;
                 new_settings.merge_from(&user_language_settings);
```

After the final override is determined, `...` is expanded and `!x`
entries are removed from the final list.

Project settings override user settings, so it's possible that a certain
language server is disabled by the user and re-enabled in the project:
worktree trust mechanism is supposed to mitigate the security issues.

More tests were added to cover all the cases.

Release Notes:

- Fixed project settings not re-enabling language servers
2026-07-24 08:32:03 +00:00
Kirill Bulatov f18ea2c94c Split VSCode and Zed keymap files (#61532)
Currently, Zed's "VSCode" keymap has certain discrepancies that are not
changed for compatibility reasons, e.g. opening inline assistant is
different in each editor.

To simplify the transition, extract VSCode bindings its own keymap so in
the future it's simpler to accept changes to each keymap separately.

Caveat: people who had ever changed the keymap, will have VSCode keymap
in their settings which will change their bindings slightly after this
commit is released.

I had to introduce more logic to `null` handling as had to somehow
disable `ctrl-enter` on mac from spawning the inline assistant block for
VSCode keymap (it's cmd-i there).

Release Notes:

- Split VSCode and Zed keymap files
2026-07-24 07:54:03 +00:00
Kirill BulatovandFinn Evers aa1fd6bff0 Calculate buffer chunks lazily (#61523)
<img width="1728" height="1084" alt="image"
src="https://github.com/user-attachments/assets/a560b10a-6e26-43ff-b830-c528e2dc6798"
/>

Before, each edit in a 50 MB plaintext file would trigger a lot of
anchor calculations (as chunk is 50 lines only) done on main thread +
did extra work when no language grammar or brackets were available.

The PR now moves all anchor calculations into `computed_chunks:
Mutex<HashMap<usize, RowChunk>>,` cache miss.
`TreeSitterData` is wrapped in `Arc` and shared as a part of the
snapshot, hence the need for `Mutex` and internal mutability here.

Trace after the changes:

<img width="1728" height="1084" alt="image"
src="https://github.com/user-attachments/assets/cb258980-8461-4559-b725-aef63c835e60"
/>


Release Notes:

- Improved input performance in large files

---------

Co-authored-by: Finn Evers <finn@zed.dev>
2026-07-23 13:36:40 +00:00
Kirill Bulatov 336679c8e1 Fall back to file names in breadcumbs with LSP symbols (#61511)
Closes https://github.com/zed-industries/zed/issues/60905

Also makes the breadcrumbs to update on settings change — before, one
needed to focus them.

Release Notes:

- Improved breadcrumbs for `"document_symbols": "on"` case when no LSP
data is sent
2026-07-23 11:35:26 +00:00
Kirill Bulatov 4ee16d3650 Fix the macOS tests that hang locally (#61407)
See also https://github.com/zed-industries/notify/pull/9

<img width="2088" height="266" alt="image"
src="https://github.com/user-attachments/assets/f4bc0b5c-76a9-424a-9abc-abde6e56b9db"
/>

Release Notes:

- N/A
2026-07-21 16:52:46 +00:00
Kirill Bulatov 8b8c03e3fb Improve bogus brackets filtering (#60364)
Closes https://github.com/zed-industries/zed/issues/59298

Left — before, right — after:

<img width="1604" height="1001" alt="Screenshot 2026-07-03 at 19 45 45"
src="https://github.com/user-attachments/assets/cc43b639-8fbe-4951-9da8-4b1e9482ca39"
/>

Release Notes:

- Fixed incorrect rainbow brackets highlights in certain cases
2026-07-21 11:54:00 +00:00
Kirill Bulatov 28ed883b99 Bump taffy (#61183)
Follow-up to https://github.com/zed-industries/zed/pull/60721

Release Notes:

- N/A
2026-07-17 09:45:16 +00:00
Kirill Bulatov 84430455ad Mimic macOS bundling behavior for Windows builds (#61180)
Rei-mplements the logic from
https://github.com/zed-industries/zed/blob/cf028dbd3ef1edf1d09027458d208821be7e8976/script/bundle-mac#L120-L123
for Windows bundling so that `run-bundling` label in CI can build
unsigned Windows binaries properly.

Release Notes:

- N/A
2026-07-17 09:01:06 +00:00
Kirill Bulatov 307b8a706c Render nested tabstops correctly (#61130)
Closes https://github.com/zed-industries/zed/issues/61112

Now behaves similar to VSCode: 

<img width="857" height="552" alt="1"
src="https://github.com/user-attachments/assets/bed95600-c75c-4b1d-a750-17b9eb35db92"
/>

<img width="601" height="243" alt="2"
src="https://github.com/user-attachments/assets/b2e839a5-6ca3-4e3a-8e5f-bc8b3e9a565f"
/>

Release Notes:

- Fixed rust-analyzer's macro with nested tabstops causing panics when
completed
2026-07-17 07:42:28 +00:00
Kirill Bulatov 35c1a49c33 Add more parameter colors to the theme (#61134)
Follow-up to https://github.com/zed-industries/zed/pull/60949 based on
https://github.com/zed-industries/zed/pull/60949#issuecomment-4994719726


`basedpyright` sends the token we lack the theme element for

<img width="1141" height="599" alt="before"
src="https://github.com/user-attachments/assets/47fd6375-507d-4419-810b-04e69251fe90"
/>

supports that in theme definitions:

<img width="385" height="244" alt="after"
src="https://github.com/user-attachments/assets/edfe3866-4bdb-480d-9bbd-b76c1366d311"
/>


---

Release Notes:

- Added `variable.parameter` theme color
2026-07-17 07:41:28 +00:00
Kirill Bulatov e6efd6fddc Fix post-taffy-bump layouting issues (#61107)
Follow-up to https://github.com/zed-industries/zed/pull/60721

Before:
<img width="564" height="470" alt="before"
src="https://github.com/user-attachments/assets/d825464d-f8d9-4fa1-bee3-42b5f615d4ba"
/>

<img width="745" height="221" alt="image"
src="https://github.com/user-attachments/assets/18139bec-6778-491a-9aa5-0112bd121723"
/>


After:
<img width="576" height="472" alt="after"
src="https://github.com/user-attachments/assets/4c3c37cf-12c4-421e-98e9-cc6e40aa099d"
/>

<img width="812" height="275" alt="image"
src="https://github.com/user-attachments/assets/407e06b4-101f-4984-8d5b-4e33895b5ae9"
/>


### Bug 1 — constraint-blind text layout cache (the collapse)

`TextLayout`'s measure closure is stateful (each call overwrites the
shared element state used for painting), and its cache check served
cached sizes to unconstrained probes regardless of the constraints they
were computed under:

1. `uniform_list::measure_item` lays an item out at `(MinContent,
MinContent)`; the row's `min_w_0` lets it shrink to ~0, so labels get
truncated at a tiny width — and that tiny size lands in the element
state.
2. The real layout probes the label's flex base size with
`available_space.width = MaxContent` (taffy maps Definite → MaxContent).
Truncated labels are `whitespace_nowrap`, so both `wrap_width` and
`truncate_width` were `None` → the cache check passed → the poisoned
tiny size became the flex basis → labels rendered at ~5 chars.

**Fix**: record `truncate_width` in `TextLayoutInner` and never serve a
cached layout that was computed *with* truncation to an unconstrained
probe; the honest intrinsic size is recomputed instead, and the final
`PerformLayout` call re-truncates against the real resolved width.

### Bug 2 — truncation width math disagrees with shaping (the ~2-char
loss)

After fix 1, rows got their full width, but exact-fit strings like
`Cargo.toml` still lost ~2 chars:

- Sizing measures via `shape_text` (real shaping with kerning); the
element gets exactly `ceil(shaped_width)`.
- The truncation decision (`LineWrapper::should_truncate_line_middle`
etc.) sums **per-character advances** — no kerning — with zero
tolerance, overestimating width for some glyph sequences. Text sitting
in a box of exactly its own measured width got truncated, losing ~2
chars to fit the `…`. String-dependent (kerning pairs), hence
`Cargo.toml` broke while `Cargo.lock` didn't.
- Previously masked because taffy 0.10 usually skipped the final measure
invocation, so the truncation path rarely ran with an exact-fit width.

**Fix**: before truncating (nowrap case, `wrap_width.is_none()`), shape
the untruncated text and skip truncation if the *shaped* width fits —
matching CSS `text-overflow`, which only activates on actual overflow.
Cheap: the shaping result is a `line_layout_cache` hit from the earlier
untruncated sizing probe.

### Bug 3 — `MinContent` used instead of `MaxContent` that caused over
truncation of certain labels

Release Notes:

- N/A
2026-07-16 17:23:49 +00:00
Kirill Bulatov fc9f012d2b Remove the 3rd party section (#61087)
See
https://github.com/zed-industries/zed/pull/60909#issuecomment-4987200706
and
https://github.com/ghostty-org/website/commit/d840266a668149495b41322d22f1f8d8f7747690

Release Notes:

- N/A
2026-07-16 07:51:58 +00:00
Kirill Bulatov 1063107f5e Show download percentage in download button's tooltip (#60990)
Closes https://github.com/zed-industries/zed/discussions/60944

<img width="568" height="143" alt="downloads"
src="https://github.com/user-attachments/assets/e5643106-a0c9-496c-bff2-300faad38839"
/>



Release Notes:

- Started to show download percentage in download button's tooltip
2026-07-15 07:39:33 +00:00
Kirill Bulatov 89f41661ff Properly notify on inline diagnostics toggle (#60978)
Closes https://github.com/zed-industries/zed/issues/60959

Release Notes:

- Fixed inline diagnostics not instantly [dis]appearing after toggling
2026-07-14 16:57:03 +00:00
Kirill Bulatov 5cc3fbcb12 Fix project panel follow focus issues (#60974)
Closes https://github.com/zed-industries/zed/issues/60939
Closes https://github.com/zed-industries/zed/issues/60940

Release Notes:

- Fixed focus follows mouse in project panel's blank space
2026-07-14 15:10:32 +00:00
Kirill Bulatov 2adb49ea16 Disable all spinners in Zed (#60614)
Closes https://github.com/zed-industries/zed/pull/48577
Part of https://github.com/zed-industries/zed/issues/8043
See
https://zed-industries.slack.com/archives/C07NUKHLVUZ/p1783335475957139
for context.

Release Notes:

- Allow to reduce animations with `"reduce_motion": "on"` settings
2026-07-14 14:49:06 +00:00