Commit Graph
34728 Commits
Author SHA1 Message Date
Max BrunsfeldandZed Zippy 162f3efdd9 Fix issues with predicted cursor positions (#48205)
Release Notes:

- N/A

---------

Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-02-02 11:30:43 -07:00
Oleksiy Syvokon 64829e992f Add ep truncate-patch command to prepare commits evalset (#48204)
Release Notes:

- N/A
2026-02-02 20:06:15 +02:00
Ben Kunkle a5e15da0fd Add completions to rate prediction modal for common failure modes (#48199)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-02-02 13:00:38 -05:00
Marco Mihai Condrache c06847e48e language: Avoid cloning of the previous tree_sitter::Tree (#48197)
The parsing text function used the old tree only as a ref so it doesn't
make sense to clone it.

Release Notes:

- N/A
2026-02-02 17:05:11 +00:00
Joseph T. Lyons 174fc51152 Added support for dismissing the toolchain path selector via esc (#48201)
Release Notes:

- Added support for dismissing the toolchain path selector via `esc`.
2026-02-02 16:56:25 +00:00
Dino 324edc1883 git_ui: Fix indent guide rendering in tree view with collapsed folders (#48194)
The indent guide computation was using visible list indices directly to
access entries, instead of mapping through `logical_indices` first. This
caused incorrect depths to be read from hidden entries when a folder was
collapsed, resulting in stray vertical lines extending to unrelated folders.

Closes #48189 

Release Notes:

- Fixed a visual bug in the Git Panel where collapsing a folder in tree
view would cause indent guide lines to incorrectly extend to unrelated
folders below it.
2026-02-02 16:54:41 +00:00
localcc fa0db76811 Fix SSH reconnection message (#48190)
Closes #34531

Release Notes:

- N/A
2026-02-02 16:41:35 +00:00
Xiaobo Liu 70c47e96bd markdown: Fix markdown table selection hit testing (#47720)
Release Notes:

- Fixed markdown table selection hit testing

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
2026-02-02 16:37:58 +00:00
Ben Kunkle a1558bc5cf ep_cli: Integrate ep qa and ep repair into core ep loop (#47987)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-02-02 11:32:25 -05:00
Xiaobo LiuandKirill Bulatov f0c165ac41 vim: Refactor vim search settings test (#48165)
Release Notes:

- N/A

---------

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2026-02-02 16:24:37 +00:00
Piotr Osiewicz 45455dbd06 gpui: Reduce amount of monomorphizations taking place (#48014)
Re-lands #3266 after recent scheduler changes

Back-of-napkin calculation: editor tests (build) went from 32s to 17s.

Release Notes:

- N/A
2026-02-02 17:18:32 +01:00
Lukas Wirth 4c0e348588 keymaps: Fix accept edit predictions key binding collisions (#48184)
Release Notes:

- Fixed accepting next word and next line edit prediction keybindings
colliding cursor movement keybinds
2026-02-02 15:08:43 +00:00
Diego PerezandJakub Konka cfbf6ebe96 nix: Use flake-parts, partitions, and treefmt-nix (#45321)
Release Notes:

Refactored:
- Use [flake-parts](https://flake.parts/index.html) modules
- `nix/shell.nix` -> `nix/modules/devshells.nix`

Added:
- Use
[flake-parts.partitions](https://flake.parts/options/flake-parts-partitions.html)
to isolate dev dependencies so that flakes that use `zed-editor` don't
fetch dev-only inputs such as `treefmt-nix`
- [treefmt-nix](https://github.com/numtide/treefmt-nix)
  - nixfmt
  - rustfmt

Fixed:
- `shell.nix` and `default.nix` fetching `flake-compat` from
`flake.lock` which added an extra and unnecessary input/dependency to
`flake.nix`. Fixed by setting a fixed rev and sha256 instead.
- `nixfmt-rfc-style` is deprecated and is now `nixfmt`
- Fixes #45338 by using rust-overlay toolchain directly
  - Previously, the devShell included `rustup` which caused slow startup
times as Nix would build rustup from source (including running its test
suite). Additionally, rust tooling (cargo, rustfmt, clippy,
rust-analyzer) wasn't available in the dev shell.
- cargo, rustc, and rust-toolchain.toml components included in
`rustToolchain`

Chore:
- Update `flake.lock`
- Format Rust code with `rustfmt` via `treefmt-nix`

---------

Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
2026-02-02 14:26:42 +00:00
a4fe57d607 Fix vim method/comment navigation with expanded diff hunks (#47976)
Previously, `]m`/`[m` (method) and `]/`/`[/` (comment) motions would
navigate to incorrect positions when diff hunks were expanded. This was
caused by extracting raw `usize` values from `MultiBufferOffset` and
operating directly on the underlying buffer, which doesn't account for
expanded diff hunk content.

The fix properly uses `MultiBufferOffset` throughout and queries
`text_object_ranges` on the `MultiBufferSnapshot` instead of the
underlying buffer, ensuring correct coordinate mapping when diff content
is displayed inline.

Fixes #46612

Release Notes:

- Fixed vim method and comment navigation (`] m`, `[ m`, `] shift-m`, `[
shift-m`, `] /`, `[ /`) incorrectly positioning cursor when diff hunks
are expanded

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: dino <dinojoaocosta@gmail.com>
2026-02-02 13:49:28 +00:00
be8842b941 agent_ui: More refactors (#48186)
Release Notes:

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

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2026-02-02 13:14:45 +00:00
versecafeandDanilo Leal 9c3ae09896 Improve icon selection for edit prediction providers (#47911)
Release Notes:

- N/A

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2026-02-02 10:00:35 -03:00
Piotr Osiewicz e99c11dee6 build: Decouple git_ui from recent_projects (#48062)
- **git_ui: Decouple git_ui from the recent_projects crate**
- **Move git_ui closer to editor**

Release Notes:

- N/A
2026-02-02 13:30:07 +01:00
Xiaobo Liu e74ceba097 agent_ui: Disable "Copy Selection" when no text is selected (#47997)
Release Notes:

- Agent: Improved the "Copy Selection" right-click menu item by
disabling it when there are no selections.

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
2026-02-02 11:45:39 +00:00
Artem MolonosovandKunall Banerjee 33fbc7163a docs: Document visual mode bindings for multi-line insert/append (#48156)
Closes #44420 

Added instructions and example keybindings to enable multi-cursor insert
(`shift-i`) and append (`shift-a`) actions in visual mode, making it
easier for users to perform these actions on multiple lines
simultaneously.

Release Notes:

- N/A

---------

Co-authored-by: Kunall Banerjee <hey@kimchiii.space>
2026-02-02 11:38:00 +00:00
Dawid Harat 431c623eb7 workspace: Add copy button to ErrorMessagePrompt popup (#48107)
My own uncreated issue. Super simple QOL change.
Just needed to copy errors and the only other place I'm aware of is
console.

The text inside the error popup is not selectable (at least on macos)


before:
<img width="461" height="213" alt="image"
src="https://github.com/user-attachments/assets/f0cc4239-759c-4e1e-aae0-d2908a81cdc6"
/>

after:
<img width="482" height="233" alt="image"
src="https://github.com/user-attachments/assets/61d458cc-3c25-4c1c-8bd7-3d6b83a51d28"
/>

Release Notes:

- Added `CopyButton` to `ErrorMessagePrompt`
2026-02-02 08:25:18 -03:00
Smit Barmase 9ee0f08944 agent_ui: Fix panic when inserting context prefix with multi-byte characters (#48179)
Closes ZED-4R9

Introduced in https://github.com/zed-industries/zed/pull/47768

The `insert_context_prefix` function was using byte offsets to check if
the prefix already exists at the cursor. This caused a panic with
multi-byte characters like emojis. Now uses character counts instead.

Release Notes:

- Fixed a crash in the Agent Panel when inserting context mentions with
emojis in the message editor.
2026-02-02 16:21:52 +05:30
Ruben Fricke 6d772579e1 terminal_view: Add support for opening the terminal in the current file directory (#47739)
Closes #14863

Changes:
- Added `CurrentFileDirectory` variant to the `WorkingDirectory` enum.
- New terminals now open in the directory of the currently active file
when this option is set.
- Falls back to project directory, then first workspace directory if no
file is active.

Release Notes:

- Added `current_file_directory` option for terminal's
`working_directory` setting. Set `"working_directory":
current_file_directory"` to open new terminals in the directory of your
currently open file.

---

Still relatively new to Rust, so happy to receive any feedback! 😁
2026-02-02 09:49:09 +01:00
andreasp 782f91f320 Fix launching from WSL with fish as default shell (#48136)
Closes #46801

When connecting to WSL2 with fish as the default shell, Zed gets stuck
at "Starting proxy". The connection works fine when bash is the default
shell.

In `start_proxy()`, the WSL command was being invoked with:

```rust
let proxy_process = match wsl_command_impl(&self.connection_options, "env", &proxy_args, false)
```

Changing the last argument to true invokes the WSL command with `--exec`
flag which executes the command in the WSL environment without spawning
a new shell.

With above fix I can launch Zed from WSL (Arch) with fish.
2026-02-02 08:11:22 +00:00
Rocky Shi af0e45e046 terminal: Prevent terminal cursor stretching by always using cell width (#45545)
Closes https://github.com/zed-industries/zed/issues/8516

Release Notes:

- Prevent terminal cursor stretching by always using cell width.
2026-02-02 08:09:05 +00:00
Kunall Banerjee 9b1fca4967 docs: document right options for lsp_document_colors (#48170)
This probably should have been updated when
https://github.com/zed-industries/zed/pull/32816 landed.

Release Notes:

- N/A
2026-02-02 06:53:31 +00:00
Xiaobo Liu 0e118ac9ae project: Simplify file search logic (#47982)
Release Notes:

- N/A
2026-02-01 20:54:13 +01:00
Xiaobo Liu aafecf043a vim: Respect search settings in buffer search (#48127)
Closes https://github.com/zed-industries/zed/issues/48007

Release Notes:

- Fixed Vim search not respecting `"search"` default settings

---------

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
2026-02-01 17:17:19 +02:00
Oleksiy Syvokon b874a40549 ep: Add V0131GitMergeMarkersPrefix prompt format (#48145)
Release Notes:

- N/A
2026-02-01 16:11:20 +02:00
Lukas Wirth fb428b5a50 gpui: Rewrite Windows PlatformTextSystem for better performance (#48087)
The current setup is quite a mess, allocates a ton of unnecessary heap
data when rendering text or querying font info and not really caching
things well, this PR changes that.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-02-01 13:32:22 +01:00
Cole Miller 2570382f88 git: Disable vertical scrollbar for side-by-side diff LHS (#48129)
Also the minimap, although this is currently symbolic since the minimap
doesn't support multibuffers.

Release Notes:

- N/A
2026-02-01 05:49:18 +00:00
littleKitchen f7fe6181cd Implement extract_pull_request for GitLab provider (#47973)
Fixes #38709

## Summary
This implements the `extract_pull_request` method for GitLab's
`GitHostingProvider` trait, enabling merge request links to be shown in
the git blame hover popover.

## Implementation
The implementation parses GitLab MR references from commit messages
using a regex that matches two common patterns:

1. **Squash merge pattern**: `message (!123)` - When GitLab
squash-merges, it appends the MR number in parentheses
2. **Standard merge commit**: `See merge request group/project!123` -
The default merge commit message

## Tests Added
- `test_extract_merge_request_from_squash_commit` - Validates the
`(!123)` pattern
- `test_extract_merge_request_from_merge_commit` - Validates the `See
merge request` pattern
- `test_extract_merge_request_self_hosted` - Ensures it works with
self-hosted GitLab instances
- `test_extract_merge_request_no_match` - Confirms None is returned for
non-matching messages

## Related
This follows the same pattern as the GitHub provider implementation.

## Release Notes

- Added support for GitLab merge request links in git blame hover
popover
2026-01-31 21:56:34 +00:00
Marco Mihai Condrache 839b4f1e60 git: Fix stage/unstage failure with a large number of files (#47800)
Git commands can fail when staging or unstaging a very large number of
files because each file path is passed as a separate CLI argument. Once
the argument list grows beyond the OS limit, git errors with Argument
list too long (os error 7).

Since git 2.26, pathspecs can be read from stdin, which lets us avoid
passing thousands of paths as arguments and bypass this limitation.

I looked for existing issues related to this but couldn’t find any.

Repro:

- Clone rust-lang repo
- Delete root tests folder
- Try to stage or unstage (40,000+ files)
- Git fails with Argument list too long (os error 7)

Release Notes:

- Fixed an issue where stage/unstage could fail when operating on a very
large number of files
2026-01-31 21:55:31 +00:00
Cole Miller c2959a7f7e git: Disable folding in side-by-side diff (#48108)
At least for now this isn't supported by the alignment system.

Release Notes:

- N/A
2026-01-31 20:52:51 +00:00
feeiyu 48f712b49b Fix git panel not updating after commit (#47222)
Fixed git panel not update after commit or switch branch on Linux.

On macOS and Windows, the watcher implementation recursively watches
subdirectories.
On Linux, the watcher is non-recursive.

In Git worktree scenarios, only `<project>/.git` is watched, but the
actual worktree Git directory
`<project>/.git/worktrees/<worktree>`  is not.
Therefore, Git operations such as commits or branch switches inside a
worktree do not emit watcher events on Linux, causing the Git panel to
stay out of sync.

Release Notes:
- Fixed git panel not update after commit or switch branch on Linux with
git worktrees.
2026-01-31 19:15:59 +00:00
Marco Mihai Condrache d6eda52b32 Add Azure as a git provider (#47598)
Release Notes:

- Azure is now a supported Git provider
2026-01-31 19:15:28 +00:00
Xiaobo Liu a2dbf0439f git_ui: Open file on double-click in status list (#47989)
Release Notes:

- Improved open file on double-click in status list

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
2026-01-31 14:13:14 -05:00
prayansh_chhablani 2867ec4bc2 git: Fix force-added files always showing as ignored (#47057)
Closes #15231
changes the priority in the way files are color-labelled..making sure
forcely added files are highlighted appropriately.
Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-01-31 14:07:29 -05:00
Remco Smits 9101f0ffc9 git_ui: Fix visual optimistic staging bug for tree view (#48078)
Before this PR we would not show the placeholder for the parent folders
of a file entry inside the git tree view. This PR fixes that so it's
visually correct.

**Before**


https://github.com/user-attachments/assets/3d0988de-f43b-4b2d-8f90-c531316ab290

**After**


https://github.com/user-attachments/assets/e28f9eba-e301-4f9a-8647-7f1f2f12f87d

Release Notes:

- Git UI: Fix optimistic placeholder for folders in the three view
2026-01-31 18:54:18 +00:00
Cole Miller 608cc9953f git: Remove panes from SplittableEditor (#48102)
Vestigial from the old UI

Release Notes:

- N/A
2026-01-31 18:50:50 +00:00
Augustus Otu 36e35f7df1 git: Use CDN endpoint for GitHub avatars to avoid rate limiting (#47894)
GitHub's commit API endpoint is rate limited to 60 requests/hour for
unauthenticated users. This causes avatar loading to fail after toggling
blame a few times.

This PR uses GitHub's CDN avatar endpoint
`https://avatars.githubusercontent.com/u/e?email={email}&s=128` instead,
which doesn't count against API rate limits. The author email is already
available from local git data (blame output), so
  no API calls are needed.

- When author email is available, constructs the CDN URL directly (zero
API calls)
  - Falls back to existing API-based behavior when email is unavailable
  - Adds unit tests for URL construction

  Closes #47590

  ## Test plan
  - [x] `./script/clippy` passes
- [x] `cargo test -p git_hosting_providers` passes (89 tests including 3
new ones i added)
- [ ] Manual test: Open a file, toggle git blame, verify avatars load
without hitting rate limits

  Release Notes:

- Fixed GitHub avatar rate limiting in git blame by using CDN endpoint
instead of API calls (#47590)
2026-01-31 13:49:42 -05:00
8d18b7b927 git: Fix desynced scrolling between LHS and RHS of side-by-side diff (#47913)
- Remove old attempt to sync scrolling
- Share a `ScrollAnchor` between the two sides, and be sure to resolve
it against the correct snapshot
- Allow either side to initiate an autoscroll request, and make sure
that request is processed in the same frame by the other side

Release Notes:

- N/A

---------

Co-authored-by: cameron <cameron.studdstreet@gmail.com>
Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
Co-authored-by: Jakub <jakub@zed.dev>
2026-01-31 18:33:22 +00:00
Max Brunsfeld b642565526 Allow zeta2 to predict next cursor position along with edits (#47916)
* [x] capture and store teacher model's predicted cursor position
* [x] provide cursor position to student during distillation
* [x] eval cursor positions
* [x] parse and apply cursor position predictions at runtime

Release Notes:

- N/A
2026-01-31 16:16:32 +00:00
Austin Cummings 795eb34098 Fix open path prompt not showing hidden files (#46965)
Closes #39036 

The open path prompt will now show hidden files when "." is entered.
Also fixes an issue with "open this directory" showing twice when used
by the "toolchain: add toolchain" prompt.

With a tree of 
```
zed-industries
├── .hidden
├── .hidden-file
├── zed
├── zed-working
├── zeta
└── zeta-dataset
```
**Before:**
<img width="656" height="174" alt="image"
src="https://github.com/user-attachments/assets/abf30ce3-b1c2-4a14-a45d-c17b6c3aef6f"
/>

**After (current directory view without inputting "."):**
<img width="648" height="261" alt="image"
src="https://github.com/user-attachments/assets/00c65546-32c1-4c85-a05c-53152ab2f942"
/>

**After (when inputting "." to see hidden entries):**
<img width="618" height="156" alt="image"
src="https://github.com/user-attachments/assets/8453ae89-b1a7-44d4-9f7d-ed89e55a7020"
/>


Release Notes:
- Made Zed's built in file picker to show all hidden files by default
2026-01-31 09:57:31 +02:00
Michael Yang 03663b966d rust: Highlight enum variants as variant (#47918)
Improve #45546, by changing the capture to be variant instead of type.

Release Notes:

- Improved Rust enum variant highlighting as variant instead of type.

Before (note variants have the same style as `Foo`):
<img width="276" height="162" alt="image"
src="https://github.com/user-attachments/assets/fa0d8f48-a286-4a8d-b89d-269cb1657e55"
/>

After:
<img width="276" height="162" alt="image"
src="https://github.com/user-attachments/assets/c442494a-7550-481a-a8b9-f2d944a67868"
/>
2026-01-31 09:52:05 +02:00
ozacodandozacod 4dde88cfe5 languages: Support double quoted keys in YAML highlights (#48063)
Before:
<img width="520" height="74" alt="before"
src="https://github.com/user-attachments/assets/5c010819-a20e-438e-b7f6-218b9f241070"
/>

After:
<img width="532" height="81" alt="after"
src="https://github.com/user-attachments/assets/51528d3b-439f-4fcf-9a7c-b06dec6a7e81"
/>

Release Notes:

- Improved YAML highlights to support quoted keys

Co-authored-by: ozacod <ozacod@users.noreply.github.com>
2026-01-30 19:57:04 -07:00
Conrad Irwin a6ab1f1eb7 Fail windows bundle when cargo about fails (#48056)
Release Notes:

- N/A
2026-01-30 19:55:29 -07:00
Anthony Eid fe653a77ae settings_ui: Fix editable project settings not being updated when a new workspace is created (#47992)
The bug occurred because `cx.observe_new::<Workspace>` would pass a
mutable `Window` that was also the new workspace's window. Later,
`fetch_files` would fail to read the newly created workspace from
`WorkspaceStore` because its window already had a mutable reference to
it.

The fix always passes the Settings UI's window handle to the
`fetch_files` function, and uses a `settings_window_handle.defer`
callback to call `fetch_files` after the newly created workspace's
window no longer has any mutable references to it.

Release Notes:

- settings_ui: Fixed editable project settings not being updated when a
new workspace is created
2026-01-30 17:21:15 -05:00
lex00andClaude Opus 4.5 609e915b10 vim: Restore cursor position when dismissing buffer search (#47732)
Fixes #8048

## Summary

In vim mode, pressing Escape to dismiss the buffer search now correctly
restores the cursor to its original position, rather than leaving it at
the first match.

## Problem

When using vim's `/` command to search:
1. User positions cursor at line X
2. User presses `/` to open search, types a query
3. Matches are highlighted, cursor may visually jump to first match
4. User presses Escape to dismiss without navigating
5. **Bug:** Cursor ends up at first match instead of line X

This breaks vim parity where Escape should cancel the search and restore
cursor position.

## Solution

The fix leverages the `focused()` callback in `vim.rs`, which is called
when the editor regains focus after the search bar is dismissed.

**Key insight:** When search starts via `/`, the cursor position is
saved in `SearchState.prior_selections`. When search is *submitted* with
Enter, `search_submit()` drains these selections. But when search is
*dismissed* with Escape, they remain.

So in `focused()`, if:
- `prior_selections` is non-empty, AND
- The search bar's `is_dismissed()` returns true

...then we know the user dismissed the search (Escape) rather than
submitted it (Enter), and we restore the cursor.

## Why not handle `buffer_search::Dismiss` directly?

The initial approach tried to register a vim handler for the `Dismiss`
action. This didn't work because when Escape is pressed, the search bar
(which has focus) handles the `Cancel` action internally and calls its
`dismiss()` method directly—it doesn't dispatch `Dismiss` through the
action system. The vim handler registered on the editor was never
invoked.

## Test Plan

- Added `test_search_dismiss_restores_cursor` — verifies cursor
restoration when search is dismissed
- Added `test_search_dismiss_restores_cursor_no_matches` — verifies
behavior when query has no matches
- All 455 vim tests pass
- Manual testing confirms fix works with both `/` and `cmd-f`

## Release Notes

- Fixed vim mode: cursor now returns to original position when
dismissing buffer search with Escape (#8048)

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 14:59:38 -07:00
Joseph T. Lyons 72b151e3aa Revert "Allow always_allow patterns for Nushell, Elvish, and Rc shells" (#48050)
Reverts zed-industries/zed#47908

This PR inadvertently caused a regression:

- https://github.com/zed-industries/zed/issues/48047
2026-01-30 21:26:13 +00:00
Ben Kunkle cfd6144af8 ep_cli: Only check cursor excerpt for reversals (#48044)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-01-30 16:01:16 -05:00