This change improves performance of project diff in that:
* scrolling in split view for very large diffs (think chromium repo with
`git reset HEAD~1000`) is now very smooth on macOS and fairly smooth on
Linux
* switching from split to unified is very smooth on macOS, and fairly
smooth on Linux
There still remains the case of (severe) hangs when switching from
unified to split however, but it will be addressed in a follow-up PR.
Anyhow, here's the screenshot of the Instruments.app capture of opening
chromium repo in Zed in split view, scrolling a little, moving to
unified, scrolling some more, and moving back to split. Prior to this
change, split -> unified would cause a severe hang, whereas now it's a
hang and thus feels much smoother already (without Instruments profiling
is barely visible). Unified -> split severe hangs are still there but
don't last as long.
<img width="2301" height="374" alt="Screenshot 2026-02-16 at 5 46 23 PM"
src="https://github.com/user-attachments/assets/f687f8d4-cffd-47f1-ada1-f6c4d3ac3cd4"
/>
Release Notes:
- Improved project diff performance when opening very large
diffs/repositories.
Derive collapsed state from `Editor.has_any_buffer_folded` instead of
tracking it separately, removing redundant `ResultsCollapsedChanged` event
and stale `is_collapsed`/`results_collapsed` fields.
Closes#48734
Release Notes:
- Fixed collapse/expand all button in buffer search and project search
not syncing correctly when toggling individual file sections
---------
Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
Co-authored-by: dino <dinojoaocosta@gmail.com>
Lsp-based folding disables indentation-based folding. Even though
indentation-based folding is non-functional, the crease icon is still
displayed in the gutter. This PR fixes this mismatch.
Before:
<img width="651" height="199" alt="before"
src="https://github.com/user-attachments/assets/ebd202e8-9eda-43c9-adbd-767e9802e590"
/>
After:
<img width="666" height="197" alt="after"
src="https://github.com/user-attachments/assets/b498e325-cd06-4c51-afdb-fcda4f1a25e6"
/>
Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
Release Notes:
- Removed non-functional folding creases from the gutter.
Co-authored-by: ozacod <ozacod@users.noreply.github.com>
Reverts the whole "project search on type" set of PRs until we figure
out better ways to deal with flickering between search results
appearing.
Release Notes:
- N/A
Closes#47854
Move `disable_ai` from root settings to `ProjectSettingsContent` to
enable per-project AI configuration via `.zed/settings.json`.
- Update settings UI to allow viewing/editing at both user and project
level
- Update editor to check project-level settings for edit predictions and
context menus
- Prevent MCP servers from starting when AI is disabled at project level
Note: SaturatingBool ensures that if user globally disables AI, projects
cannot re-enable it. Projects can only further restrict AI, not grant
it.
Release Notes:
- added support for disabling AI in project settings
---------
Co-authored-by: Ben Kunkle <ben.kunkle@gmail.com>
LSP servers may return symbol names containing newlines. Since outline
panel, breadcrumbs, and project search modal all expect single-line
items, collapse newlines before display.
- Document symbols: collapse newlines to spaces in name
- Workspace symbols: collapse newlines with `↵ ` separator for name and
container_name, preserving visual hint of original structure
Closes #ISSUE
Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
Release Notes:
- N/A
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
We had a call to `BlockMap::unfold_intersecting` that ended up
recomputing the entire block map for the RHS _without_ spacers, only to
throw it away in favor of the version with spacers a few lines down. Now
we only sync each block map once in `set_companion`.
Release Notes:
- Improved performance when toggling from the unified diff to the split
diff.
Co-authored-by: Jakub <jakub@zed.dev>
Co-authored-by: Cameron McLoughlin <cameron.studdstreet@gmail.com>
- [x] Tests or screenshots needed?
- [ ] Code Reviewed
- [x] Manual QA
Release Notes:
- Fixed misalignment of lines in the split diff when using inlay hints.
Release Notes:
- Fixed inlay hints being rendered as new inserted words in word based
diff highlighting
---------
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
Release Notes:
- Added agent panel restoration. Now restarting your editor won't cause
your thread to be forgotten.
---------
Co-authored-by: Anthony Eid <56899983+Anthony-Eid@users.noreply.github.com>
Co-authored-by: Eric Holk <eric@zed.dev>
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Co-authored-by: Anthony Eid <anthony@zed.dev>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Co-authored-by: Cameron Mcloughlin <cameron.studdstreet@gmail.com>
We try to remove old excerpt IDs from the companion when mutating
excerpts for a path, but we were incorrectly doing this using the
excerpt IDs for the right-hand side multibuffer _after_ any excerpt
mutations had occurred, causing stale excerpt IDs to accumulate.
Release Notes:
- N/A
- Fix panics caused by reusing cached matches for the wrong side
- Highlight matches on the side that was searched only
- Clear matches in non-searched editor when initiating a new search
Release Notes:
- N/A
---------
Co-authored-by: Eric <eric@zed.dev>
Co-authored-by: Jakub <jakub@zed.dev>
Helps #48601
<img width="1649" height="1071" alt="image"
src="https://github.com/user-attachments/assets/ff3dfee0-cc65-430f-a5fa-b4b4c36e8183"
/>
`syntax_layers` does some offset conversion that might require getting
some chunks from the rope, which is quite expensive. For detecting
autoclose, we only use the language from those syntax layers, so having
a short path that skips all the conversion should skip some sum_tree
traversals.
I'm pretty sure other places would benefit from this as well, but I
haven't searched them yet.
Release Notes:
- N/A
---------
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
These are heavily used by the side-by-side diff. Previously, we were
iterating over all hunks for each call. Now we skip hunks that can't
affect the provided range.
Release Notes:
- N/A
When we update excerpts, pull the changes to the `Companion` excerpt
mappings into the multibuffer's update block, so that buffer
subscriptions don't get the chance to run and observe an invalid state
while attempting to snapshot the editor
Release Notes:
- N/A
---------
Co-authored-by: cameron <cameron.studdstreet@gmail.com>
Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
- No more "locked mode", it's on by default
- Only `ToggleDiffView` action
- Re-enable code actions on the RHS
Release Notes:
- N/A *or* Added/Fixed/Improved ...
---------
Co-authored-by: Cole Miller <cole@zed.dev>
The multi workspace refactor **completely** broke the Vim mode, saving
is not possible, and various other actions. This PR fixes this
- [X] Code Reviewed
- [X] Manual QA
Release Notes:
- N/A
It's happeningggggg
Release Notes:
- Changed the Agent Panel so that the Active Thread is restored on
restart.
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Anthony Eid <anthony@zed.dev>
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Co-authored-by: Richard Feldman <richard@zed.dev>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
- Ensure that both sides are passed the appropriate companion data to
preserve spacers when syncing
- Remove companion handling in codepaths related to range folding, since
this isn't supported in the side-by-side diff
- Move handling of buffer folding into the block map
- Rework `set_companion` to handle both `DisplayMap`s at once
- DRY some code around block map syncing in the `DisplayMap`
TODO:
- [x] diagnose and fix issue that causes balancing blocks not to render
properly when they are adjacent to spacers (e.g. merge conflict buttons)
- [x] clear balancing blocks when clearing companion
- [x] additional tests: interaction between spacers and balancing
blocks, resizing
Release Notes:
- N/A
Fixes#36818
Release Notes:
- Added new `global_lsp_settings.request_timeout` setting to configure
the maximum timeout duration for LSP-related operations.
Code inspired by [prior
implementation](https://github.com/zed-industries/zed/pull/38443),
though with a few tweaks here & there (like using `serde:default` and
keeping the pre-defined constant in the LSP file).
---------
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
- **build: remove assistant_slash_commands dependency in
assistant_text_thread**
- **diagnostics: Do not depend on search**
- **Remove terminal_view's dependency on search**
- **sever breadcrumbs <-> editor dep (for the sake of terminal_view)**
Release Notes:
- N/A
Closes https://github.com/zed-industries/zed/issues/28091
Off in language settings by default: ` "lsp_folding_ranges": "off",`,
when enabled, disables tree-sitter indent-based folding and enables
fetching of LSP ones instead.
Falls back to tree-sitter if LSP-based one brings no results.
Release Notes:
- Added `textDocument/foldingRange` LSP support, use `
"lsp_folding_ranges": "on",` language settings to fetch and prefer the
LSP folds
* split more logic away into its own modules for document colors, code
lens and inlay hints
* remove unnecessary cache_version for document colors
Release Notes:
- N/A