Commit graph

34742 commits

Author SHA1 Message Date
Ben Kunkle
81c65414ca
Make mercury and sweep non experimental (#48227)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-02-02 21:13:32 -05:00
Ben Kunkle
8fd3b85699
Migrate features.edit_prediction_provider to edit_predictions.provider (#48224)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-02-02 20:53:48 -05:00
Finn Evers
64a0254204
ci: Generate publish_extension_cli with gh_workflow (#47890)
This moves the extension CLI job into xtask and also extends this a bit
- whenever we now run the job, it will open PRs against this repo and
`zed-industries/extensions` to also update the SHAs there. These PRs
will be assigned to the actor that initiated the bump so they can edit
the PR as needed.

Release Notes:

- N/A
2026-02-03 00:48:15 +00:00
KyleBarton
85d03d5122
Use remote user from devcontainer CLI and respect shell in passwd (#48230)
Closes #46252

Uses the `remoteUser` property returned from the devcontainer CLI so
that settings are respected. Additionally, checks for a default shell in
`passwd` if `$SHELL` is not set.

Release Notes:

- Fixed remote_user and shell inconsistencies from within dev containers
2026-02-02 16:43:51 -08:00
John Tur
7b9beb3678
Show memory used by language servers (#48226)
Closes https://github.com/zed-industries/zed/issues/32712

<img width="575" height="131" alt="image"
src="https://github.com/user-attachments/assets/aaad583c-277c-4a84-b2ce-a18b8b38bc0e"
/>

Release Notes:

- The language servers menu now shows the memory used by each language
server.
2026-02-02 18:45:28 -05:00
Jakub Konka
478ca3a762
block_map: Consolidate all companion-related refs into a single CompanionView (#48223)
Release Notes:

- N/A

--

I think it's possible to clean this up further but will withhold until
we land bits necessary to correctly align split view in presence of
custom blocks.
2026-02-03 00:24:42 +01:00
ChtiMacFly
68b2cb3e72
Fix capitalization of libX11 in FreeBSD dependencies (#48159)
This work :
> doas pkg install lib**X**11

Release Notes:

- N/A
2026-02-02 23:55:03 +01:00
Ben Kunkle
b96f1c4738
Add sweep_ai privacy mode setting (#48220)
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2026-02-02 17:33:14 -05:00
Richard Feldman
b62d73e4bc
Add tool security rules that can't be overridden by settings (#48209)
This change introduces hardcoded security rules for the terminal tool
that cannot be bypassed by any setting, including
`always_allow_tool_actions`.

## Currently Blocked Commands

- `rm -rf /` - Recursive deletion of root filesystem
- `rm -rf ~` - Recursive deletion of home directory

These rules are checked **before** the `always_allow_tool_actions`
global flag, ensuring they can never be bypassed. The rules also check
parsed sub-commands, so `ls && rm -rf /` is also blocked.

Release Notes:
- Certain known-bad tool uses are now automatically blocked, such as the
terminal tool attempting to run `rm -rf /` or `rm -rf ~`
2026-02-02 17:10:31 -05:00
Ben Kunkle
f0594e0990
settings_ui: Make it so settings links open sub pages (#48212)
Closes #ISSUE

Release Notes:

- Fixed an issue where opening a link to a settings item that involved a
sub page would not open the sub page
2026-02-02 16:48:24 -05:00
Josh Robson Chase
1ac0b77d02
toolchain: Include rust-src in the rust-toolchain components (#48210) 2026-02-02 21:07:42 +00:00
Max Brunsfeld
eae101f3c9
Revert "rust: Highlight enum variants as variant" (#48211)
Reverts zed-industries/zed#47918

Rationale:
https://github.com/zed-industries/zed/pull/47918#issuecomment-3837291864
2026-02-02 13:20:14 -07:00
Finn Evers
571ea7cf22
extension_api: Improve documentation for make_file_executable (#48198)
Extension authors frequently guard this method in their extensions
although this is not necessary.

Thus, this PR updates the documentation of `make_file_executable` with a
brief mention to indicate that this is not needed.

Release Notes:

- N/A
2026-02-02 20:27:41 +01:00
Piotr Osiewicz
9867f16c77
edit prediction: Drop project state after a project goes away (#48191)
Closes #48097

Release Notes:

- Fixed Copilot instances not being cleared up after their window is
closed.
- Copilot edit prediction provider now respects `disable_ai` setting.
2026-02-02 19:47:44 +01:00
Max Brunsfeld
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 Liu
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 Perez
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
lex00
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
Cameron Mcloughlin
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
versecafe
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 Molonosov
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