Commit Graph
4670 Commits
Author SHA1 Message Date
Mayank VermaandLukas Wirth 0c29a0933f editor: Fix soft wrap premature wrapping with certain fonts (#45206)
Closes #45107

Release Notes:

- Fixed soft wrap prematurely wrapping with certain fonts

---------

Co-authored-by: Lukas Wirth <lukas@zed.dev>
2026-02-13 10:49:50 +00:00
Kirill Bulatov 69a2ea3fff Fix document highlight data issues (#49079)
Follow-up of https://github.com/zed-industries/zed/pull/48780

Fixes incorrect multi byte characters treatment in the symbol range when
highlighting:
<img width="1728" height="507" alt="image"
src="https://github.com/user-attachments/assets/c6639220-f08a-4ea8-bf99-926566e356ae"
/>

Fixes multiple language servers' duplicate data display:
<img width="1726" height="925" alt="image"
src="https://github.com/user-attachments/assets/ca98ee29-732e-4c8e-adf4-21a9523a5a9c"
/>


Release Notes:

- N/A
2026-02-13 00:55:26 +00:00
aa4e1b47dc Separate accepted edit predictions in edit history (#49056)
Release Notes:

- N/A

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2026-02-13 00:15:59 +00:00
Kirill Bulatov 44015e0379 Fix semantic highlights not cleared when disabled in settings (#49066)
Closes https://github.com/zed-industries/zed/issues/49060

Release Notes:

- Fixed semantic highlights not cleared when disabled in settings
2026-02-12 20:52:46 +00:00
Lukas WirthandZed Zippy 213de2ec9b editor: Do not include inlays in word diff highlights (#49007)
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>
2026-02-12 09:26:06 +00:00
Kirill Bulatov c6cd08e37a Use document symbols' ranges to derive their outline labels (#48978) 2026-02-12 09:36:48 +02:00
ee3f40fe25 Re-add MultiWorkspace (#48800)
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>
2026-02-12 01:06:23 +00:00
Mikayla Maki 83de8a25e0 Revert PRs for landing in main (#48969)
We're going to re-apply these after landing the multiworkspace branch.

Release Notes:

- N/A
2026-02-12 00:28:17 +00:00
Cole Miller b53ff3b893 git: Disable some more expensive things for the split diff's left-hand side (#48953)
- Conflict UI
- LSP data
- Runnables

Release Notes:

- Improved performance when opening the split diff view.
2026-02-11 21:58:55 +00:00
Kirill Bulatov 56504fdd0f Support LSP document symbols in breadcrumbs and outline UI (#48780) 2026-02-11 21:30:03 +02:00
Katie GeerandZed Zippy f233ae4c29 Add telemetry for user-facing notifications (#48558)
## Summary

Adds a "Notification Shown" telemetry event that fires whenever a
user-facing notification is displayed in Zed. This helps the team
understand error patterns, notification frequency, and which parts of
the application generate the most notifications.

## Event Schema

| Property | Type | Description |
|----------|------|-------------|
| `notification_type` | `string` | `"error"` or `"notification"` |
| `source` | `string` | Origin category (e.g., `lsp`, `git`, `settings`,
`editor`) |
| `lsp_name` | `string?` | Language server name (only for LSP
notifications) |
| `level` | `string?` | Severity: `"critical"`, `"warning"`, or `"info"`
|
| `has_actions` | `bool` | Whether the notification has action buttons |
| `notification_id` | `string` | Debug string of the NotificationId |
| `is_auto_dismissing` | `bool` | Whether the notification
auto-dismisses |

## NotificationSource Categories

A new `NotificationSource` enum categorizes notifications by origin:

- `lsp` - Language server notifications
- `settings` - Settings/keymap parse errors
- `update` - App updates, release notes
- `extension` - Extension suggestions/errors
- `git` - Git operations, commit errors
- `project` - Project-level issues
- `collab` - Collaboration notifications
- `remote` - SSH/remote project errors
- `file` - File access errors
- `editor` - Editor operations (search, encoding)
- `agent` - AI assistant notifications
- `cli` - CLI installation
- `system` - Generic fallback

## Privacy

**Message content is intentionally not included** in telemetry because:
- LSP messages come from external servers and may contain file paths or
error chains
- Error messages may contain sensitive paths or API-related information
- The metadata alone provides sufficient insight for error tracking

## Implementation

Updated function signatures to include `NotificationSource`:
- `show_notification(id, source, cx, build_fn)`
- `show_toast(toast, source, cx)`
- `show_error(err, source, cx)`
- `show_app_notification(id, source, cx, build_fn)`
- `notify_err(workspace, source, cx)`
- `notify_async_err(source, cx)`
- `notify_app_err(source, cx)`
- `detach_and_notify_err(source, window, cx)`

Release Notes

- N/A (internal telemetry change)

---------

Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-02-11 10:21:37 -08:00
Cole Miller 40b468e69e git: Fix another WrapPointCursor panic in spacer_blocks (#48932)
Closes ZED-4ZH

Release Notes:

- N/A
2026-02-11 12:55:51 +00:00
Cole Miller f7314976bd git: Enable the split diff for everyone (#48912)
Release Notes:

- Added support for viewing diffs in split ("side by side") mode
2026-02-11 06:28:55 +00:00
Cole Miller 05e99dad54 git: Standardize nomenclature for side-by-side diff (#48910)
"Unified" for the old view, and "split" for the new one.

Release Notes:

- N/A
2026-02-11 05:33:03 +00:00
Cole Miller 74419f6a0d git: Correct logic for updating companion excerpt IDs mapping (#48906)
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
2026-02-11 04:02:02 +00:00
c8054cacbd git: Fix searching in the split diff (#48894)
- 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>
2026-02-10 23:29:51 +00:00
Marco Mihai CondracheandSmit Barmase de7f2f0186 Improve performance when detecting JSX auto close (#48622)
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>
2026-02-10 20:46:28 +05:30
Cole Miller 4177be4479 git: Optimize patch_for_range functions (#48852)
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
2026-02-10 01:19:01 -05:00
d7129634ee git: Fix missing excerpts panic with side-by-side diff (#48755)
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>
2026-02-09 17:16:11 -05:00
Cameron McloughlinandCole Miller 7a18c4126a git: Side-by-side diff UX improvements (#48821)
- 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>
2026-02-09 21:55:47 +00:00
Cole Miller 7390b449f9 git: Fix panic when folding ranges (#48809)
Restore a call to `BlockMap::read` that went missing in #48747 

Release Notes:

- N/A
2026-02-09 13:39:48 -05:00
Cole Miller 8582ca68a5 git: Fix a panic in spacer_blocks (#48753)
Closes ZED-4X5

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-02-09 10:34:55 -05:00
Finn Evers 165b404460 Revert "New multi workspace (#47795)" (#48776)
Preparing this just in case.

Release Notes:

- N/A
2026-02-09 15:37:16 +01:00
Finn Evers bdff8bf47c Ensure proper workspace is used for various actions (#48767)
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
2026-02-09 10:33:36 +00:00
1c21718587 New multi workspace (#47795)
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>
2026-02-08 17:46:51 -08:00
Cole Miller 930f484fe4 git: Follow-up fixes for custom blocks in the side-by-side diff (#48747)
- 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
2026-02-08 20:10:52 -05:00
Kirill Bulatov 809d54524e Properly handle multi-char folds (#48721)
Follow-up of https://github.com/zed-industries/zed/pull/48611

Release Notes:

- N/A
2026-02-08 08:56:22 +00:00
Cole Miller 35160555da git: Fix a potential misalignment in the side-by-side diff (#48690)
Release Notes:

- N/A
2026-02-07 18:07:23 +00:00
Cole Miller 869919160b git: Add a setting for the default view mode of SplittableEditor (#48440)
Release Notes:

- N/A
2026-02-07 17:26:02 +00:00
xdBronch 10c3c088fe editor: Propagate buffer_font_features to signatureHelp popover (#48653)
Closes #48596

Release Notes:

- N/A
2026-02-07 02:36:46 +02:00
db53a65ab6 Add configurable LSP timeout setting (#44745)
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>
2026-02-07 00:36:37 +00:00
xdBronch 52cddaae37 editor: Use buffer_font for folds and change foreground color (#48652)
re: https://github.com/zed-industries/zed/pull/48624
using the UI font could cause a visual bug when the cursor was over the
folded text
before:
<img width="191" height="48" alt="image"
src="https://github.com/user-attachments/assets/def0be7d-6fb3-4890-be47-cafee67558a3"
/>
after:
<img width="194" height="47" alt="image"
src="https://github.com/user-attachments/assets/a9b6fb8b-5646-4bd5-9108-b6f792f4571e"
/>

changing the color is of course just opinionated but i think it looks
better and makes more sense as a placeholder

Release Notes:

- N/A
2026-02-07 00:20:03 +00:00
Kirill Bulatov 52099b45e7 Fix panic with LSP folds on disappearing excerpts (#48649)
Follow-up of https://github.com/zed-industries/zed/pull/48611

Release Notes:

- N/A
2026-02-06 23:22:28 +00:00
Kirill Bulatov 30ec2ca370 Support custom fold text for LSP folds (#48624)
Follow-up of https://github.com/zed-industries/zed/pull/48611

Release Notes:

- N/A
2026-02-06 22:24:38 +02:00
Piotr Osiewicz a8ae51cb97 build: Tear up crate graph (move terminal closer to editor) (#48602)
- **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
2026-02-06 20:14:35 +01:00
Kirill Bulatov 6c253a7d68 Add textDocument/foldingRange LSP support (#48611)
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
2026-02-06 18:06:01 +00:00
Kirill Bulatov 980479fb7c Refactor LSP-related logic (#48604)
* 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
2026-02-06 16:58:18 +00:00
Cole Miller 8e56667625 git: Implement OpenExcerpts for the left side of the side-by-side diff (#48438)
By opening the corresponding positions in the corresponding main
buffers.

Release Notes:

- N/A
2026-02-06 15:46:23 +00:00
Jakub Konka 4167f170de SplittableEditor: Sync custom blocks between RHS and LHS editors (#48575)
Release Notes:

- Added handling of custom blocks in the RHS editor by creating matching
dummy custom blocks rendered as spacer blocks in the LHS editor when in
split view.
2026-02-06 15:15:57 +01:00
Conrad IrwinandCole Miller 2cecdab47d Don't watch parent directory of global gitexcludes file (#48408)
Closes: #48560

Release Notes:

- Fixed an issue where Zed would try to open all edited files in ~ if
your git config had a globalexludes in ~ that did not exist.

---------

Co-authored-by: Cole Miller <cole@zed.dev>
2026-02-06 07:02:06 +00:00
Cameron Mcloughlin 8d730846eb git: Side-by-side search matches panic (#48544)
Fixes a panic when using a search anchor from one side of a side-by-side
in the
other.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-02-06 00:57:31 +00:00
Cameron Mcloughlin eb9103e667 git: Side-by-side diff searching (#48539)
Searching (and related vim stuff like `*`/`n`/`N`) now work in the LHS
of a
split diff.

Also fixes the bug with indent guides being visible through the spacer
checkerboard pattern.

Release Notes:

- N/A
2026-02-05 23:45:01 +00:00
Lukas WirthandCole Miller 74746aa974 multi_buffer: Optimize a bunch of things (#48519)
Release Notes:

- N/A *or* Added/Fixed/Improved ...

---------

Co-authored-by: Cole Miller <cole@zed.dev>
2026-02-05 20:10:02 +00:00
Kirill Bulatov 8bb69dcb14 Properly discard tokens on language server stop (#48490)
Follow-up of https://github.com/zed-industries/zed/pull/46356

Release Notes:

- N/A
2026-02-05 16:07:16 +00:00
Kirill Bulatov 4389ebb6f4 Follow-up semantic token fixes (#48485)
Follow-up of https://github.com/zed-industries/zed/pull/46356

* better selection in highlights panel to show the color of the active
item
* no `DiffbaselessAnchor` entity to cause flickering and highlighting
issues
* react on theme and theme settings change and refresh semantic tokens
* do not eagerly flicker when refreshing the tokens
* do not show semantic tokens in the editor menu for non-applicable
buffers

Release Notes:

- N/A
2026-02-05 15:06:02 +00:00
Xiaobo LiuandAnthony Eid 92f8ae8635 debugger: Wrap TaskContext in Arc to reduce cloning overhead (#47087)
Release Notes:

- N/A

---------

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Co-authored-by: Anthony Eid <anthony@zed.dev>
2026-02-05 10:37:39 +00:00
Iago BermúdezandAnthony Eid 1fe80040b1 debugger: Fix breakpoint color only updating when mouse moves (#46427)
The other day I was testing the debugging feature and I noticed a
**very** small visual bug. When you click on the breakpoint circle to
set a breakpoint, the breakpoint color remains in the wrong state until
the mouse moves.

After debugging for a while, I noticed that the issue was that the
PhantomVariableIndicator variable attribute
`collides_with_existing_breakpoint` was not being updated until the
mouse moved. With the following change, the attribute is updated when
the user clicks the breakpoint, toggleling tha attribute.

### Prior behaviour:

https://github.com/user-attachments/assets/3dfa8e25-e970-49a3-8e87-0ecadabb3a3c

As you can see in the video, prior to this change, the breakpoint would
only change to the correct color when the mouse moved.
 
### New behaviour

https://github.com/user-attachments/assets/356e84dc-42e5-4440-afab-0fbc4b3a1f0a

With this new change, the breakpoint updates right after the user
clicks, no need to move the mouse.

### Disclaimers

- I'm new to this codebase, so any feedback is extremely welcomed! If
you know of a better place where this could be handled, let me know and
I'll explore further.


https://github.com/user-attachments/assets/12d4b9df-e5d7-4955-b58d-dd63563c5c1b

Release Notes:

- N/A

---------

Co-authored-by: Anthony Eid <anthony@zed.dev>
2026-02-05 09:59:03 +00:00
Lukas Wirth 9cd2343432 editor: Put more syntax walking features on the background (#48450)
Currently we always compute breadcrumbs and sticky headers on every
editor paint which is not cheap to do especially in bigger files, moving
this off to be computed on event handling where they change and then
caching them can save serveral milliseconds per render in bigger files.

This also puts matching brackets refreshing and document highlights on a
background task, as this tends to block the main task for prolonged time
as well.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-02-05 09:31:11 +00:00
Matthew ChisolmandAnthony Eid 053a8fed22 Handle soft wrap modes when computing wrap width (#46422)
Partially closes #44748 

Release Notes:

- Fixed the git side panel to respect soft wrap settings

---------

Co-authored-by: Anthony Eid <anthony@zed.dev>
2026-02-05 08:22:43 +00:00
Cole Miller 0dd09b6097 git: Render hunk gutter highlights for the side-by-side diff (#48433)
Relanding #48321 

Release Notes:

- N/A
2026-02-05 03:08:26 +00:00