This PR fixes the language model selector.
I tried to piece together the state prior to #25697 (the state it was in
at 11838cf89e0b96531f90f22432b3df6859587871) while retaining unrelated
changes that happened since then.
Release Notes:
- Fixed an issue where language models would not be authenticated until
after the model selector was opened (Preview only).
Marshall Bowers
created
ad9c508
Fix performance regression in multibuffer diff syncing (#26137)
Click to expand commit body
This fixes a performance problem introduced in #25906 and caused by
calling `BufferDiff::snapshot` too frequently.
Release Notes:
- Fixed a performance regression related to buffer diffs
Co-authored-by: Conrad <conrad@zed.dev>
Cole Miller
and
Conrad
created
aaa506c
Bump Tree-sitter to 0.25.3 for error recovery fixes (#26092)
Click to expand commit body
For https://github.com/tree-sitter/tree-sitter/pull/4257
Release Notes:
- Fixed a hang that could occur when editing certain Zig files.
Max Brunsfeld
created
a602c50
assistant2: Allow adding directories as context that contain non-UTF8 files (#26135)
Click to expand commit body
We would previously return an error if there was at least one non-UTF8
file. Now we just ignore them and only add text files. If no text files
are found we show an error.
Release Notes:
- N/A
https://github.com/zed-industries/zed/pull/25663#issuecomment-2686095807
Renamed the `vim::Backspace` and `vim::Space` actions to
`vim::WrappingLeft` and `vim::WrappingRight` respectively. The old names
are still available, but they are marked as deprecated and users are
advised to use the new names.
Also added a paragraph to the docs describing how to enable wrapping
cursor navigation.
- Closes: https://github.com/zed-industries/zed/issues/21005
Nushell does not support `uname -sm`
So invoke `sh -c "uname -sm"` instead which will also work under nushell.
See https://github.com/nushell/nushell/issues/12570 for the choice quote: "being posix/bash compliant is a non-goal"
Release Notes:
- Fixed ssh remotes running Nushell
Peter Tripp
created
e600e71
vim: Fix tab title when using `!!` and disable rerun button for terminal tasks (#26122)
Click to expand commit body
These changes tackle two issues with running terminal commands via vim
mode:
- When using `!!` the tab's title was set to `!!` instead of the
previous command that was run and these changes fix that in order to
always display the previous command in the tab's title when re-running
the command with `!!`
- For a terminal command, pressing the rerun button would actually bring
up the task palette, so this has been updated in order to disable the
rerun button when the terminal tab was spawned via a vim command
Closes #25800
Release Notes:
- Fixed the terminal tab title when using `!!` to rerun the last command
- Improved the terminal tab for when command is run via vim mode, in
order to disable the rerun button, seeing as Zed does not support it
Dino
created
82d85fd
deno: Extract to zed-extensions/deno repository (#26129)
Click to expand commit body
This PR extracts the Deno extension to the
[zed-extensions/deno](https://github.com/zed-extensions/deno)
repository.
Release Notes:
- N/A
Marshall Bowers
created
e061ebb
editor: Fix cmd + click on a URL not working sometimes (#26128)
Click to expand commit body
Closes #25647
This PR fixes two issues related to cmd + click on URL:
1. Normally cmd + click on URL, it opens browser. Now, alt + tab back to
Zed. If you cmd + click on link again it won't work, until you normal
click some where else in buffer. It won't even show underline.
2. Again, cmd + click on URL, it opens browser. Now, alt + tab back to
Zed. If you cmd + click, some where else in buffer like just normal
text, and now try to hover on URL it won't show up underline and cmd +
click on it won't work. Unless again, if you plain click somewhere else.
Problem:
Issue is when clicking we set pending anchor (for selection), and when
we mouse up we clear those. This works for normal case without pressing
any modifier.
But, in case of cmd modifier, we set pending anchor (set when
`SelectPhase::Begin`), but we don't clear it once we use that data.
Fix:
Once we end up using selection, anchor, etc data to figure out where to
navigate either URL/defination etc, we clear selection just like how we
do it in normal click. This doesn't require to happen after navigate
task, so we do it right after our usage of it.
Before:
https://github.com/user-attachments/assets/b33d93fc-f490-4fa4-ae22-1da1fd6b77a9
After:
https://github.com/user-attachments/assets/028f039a-cd13-4651-b461-3ba52f2526de
Release Notes:
- Fixed an issue where cmd + click on a URL was not working sometimes.
smit
created
387ee46
project: Fix issue where Cmd+Click on an import opens the wrong file (#26120)
Click to expand commit body
Closes #21974
`resolve_path_in_worktrees` function looks for provided path in each
worktree until valid file is found.
In this PR we priortize current buffer worktree before other worktrees,
because of edge case where, file with same name might exists in other
worktrees.
Updated tests to handle this case.
Release Notes:
- Fixed an issue where the wrong file from a different worktree would
open when using `Cmd + Click` on a file import.
smit
created
89d89b8
docs: Update MSYS2 section to add information about CLI (#25882)
Click to expand commit body
MSYS2 now provides CLI along with editor in Zed package:
https://packages.msys2.org/packages/mingw-w64-ucrt-x86_64-zed
Closes #ISSUE
Release Notes:
- N/A
Closes #18157
Release Notes:
- vim: Added `:reg[isters]` to show the current values of registers
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
AidanV
and
Conrad Irwin
created
ff0bb1f
vim: Fix `insert before` in visual modes (#25603)
Click to expand commit body
Closes #22536
Changes:
- Visual and visual block: Cursor at start of selection.
- Visual line: Cursor at start on line.
- Uses different handling since the selection does not actually change
in vline.
Release Notes:
- vim: Fixed insert before (`shift-i`) in visual modes.
old nixpkgs versions didn't have rust 1.85 and nix develop failed (1.85
is specified in rust-toolchain.toml).
ran `nix flake update` to bump the flake dependencies. it now works
Release Notes:
- N/A
maan2003
created
d7b90f4
Fix diff_hunk_before in a multibuffer (#26059)
Click to expand commit body
Also simplify it to avoid doing a bunch of unnecessary work.
Co-Authored-By: Cole <cole@zed.dev>
Closes #ISSUE
Release Notes:
- git: Fix jumping to the previous diff hunk
---------
Co-authored-by: Cole <cole@zed.dev>
Conrad Irwin
and
Cole
created
3e64f38
vim: Add support for toggling boolean values (#25997)
Click to expand commit body
Closes #10400
Closes https://github.com/zed-industries/zed/issues/17947
Changes:
- Let vim::increment find boolean values in the line and toggle them.
Release Notes:
- vim: Added support for toggling boolean values with `ctrl-a`/`ctrl-x`
brian tan
created
82338e2
vim: Fix clear exchange not working (#25804)
Click to expand commit body
Fixes two issues with the Vim exchange implementation:
1. The clear exchange implementation **didn't** clear the exchange. This
was due to us asking the editor to clear normal highlights instead of
background highlights.
2. Calling clear exchange also wouldn't cause the operator to be
cleared, so you would be left in operator = "cx".
I've added tests for both of these cases.
Partially closes #25750. It doesn't address the problem with dot repeat
not working for my custom bindings, but I don't know what would cause
that. I'd love to hear some thoughts on why that is. That might be a
problem on my part or it might be something with the code. Input would
be appreciated.
Release Notes:
- Fixed: Vim exchange's "clear exchange" function didn't clear the
exchange and kept you in operator pending mode.
Thomas Heartman
created
229e853
Make buffer search aware of search direction (#24974)
Click to expand commit body
This solves a couple of issues with Vim search by making the search
buffer and `SearchableItem` aware of the direction of the search. If
`SearchOptions::BACKWARDS` is set, all operations will be reversed. By
making `SearchableItem` aware of the direction, the correct active match
can be selected when searching backward.
Fixes #22506. This PR does not fix the last problem in that issue, but
that one is also tracked in #8049.
Release Notes:
- Fixes incorrect behavior of backward search in Vim mode
Nico Lehmann
created
ed13e05
project search: Fix text cutoff in options help text (#26098)
This fixes a major performance issue in the current git beta.
This PR also removes the PopoverButton component, which was easy to
misuse.
Release Notes:
- Git Beta: Fix frame drops caused by opening the git panel
---------
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Conrad Irwin
and
Mikayla Maki
created
fe18c73
Fix lag when large diff hunk intersects the viewport (#26088)
Click to expand commit body
We were iterating over the row range of a hunk, and inserting into a
hash map for every row.
Release Notes:
- Fixed a performance problem when a large diff hunk was displayed in an
editor.
Fine-tuning the visuals (namely, reducing font and keybinding size) and
passing `on_click` handlers to the Cancel & Regenerate actions.
Release Notes:
- N/A
Danilo Leal
created
67f9b2b
markdown: Only change the copy code icon to a check temporarily (#26079)
Click to expand commit body
This PR makes it so the copy code icon only changes to a check
temporarily.
It will now revert to the "copy" icon after 2 seconds.
https://github.com/user-attachments/assets/e8983268-9710-4519-97a0-b28dc237b109
Release Notes:
- N/A
Just a basic implementation so we can start trying it out.
Release Notes:
- N/A
---------
Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Michael <michael@zed.dev>
Richard Feldman
,
Marshall
, and
Michael
created
886d8c1
markdown: Ensure code block copy button stays in the right spot (#26074)
Click to expand commit body
This PR makes it so the copy button on Markdown code blocks stays
absolutely positioned even when scrolled:
<img width="1297" alt="Screenshot 2025-03-04 at 5 28 48 PM"
src="https://github.com/user-attachments/assets/b0d0fae9-ccd6-43c1-bef3-44d8d3c3e669"
/>
We achieve this by inserting a new parent element around both the copy
button and the code block itself so we can position the copy button
absolutely within that element.
Release Notes:
- N/A
Marshall Bowers
created
ebc5c21
Synchronize modal commit editor with panel editor (#26068)
Click to expand commit body
Release Notes:
- Git Beta: Synchronized selections between the modal editor and the
panel editor
- Git Beta: Allow opening the commit modal even if we're unable to
commit.
Mikayla Maki
created
0a2d938
Do not include recent issues in issue response script (#26064)
Click to expand commit body
Do not report issues that were created yesterday or today.
Release Notes:
- N/A
Joseph T. Lyons
created
fc01f49
Fix font sizes not reacting on settings change (#26060)
Click to expand commit body
Proper version of https://github.com/zed-industries/zed/pull/25425
When https://github.com/zed-industries/zed/pull/24857 returned font
updates on settings changes, settings values, not in-memory ones should
be compared.
This PR returns back the logic finally, and changes it to explicitly
track the settings values, not the in-memory ones.
Also adds the same tracking for UI font changes, which had never been
tracked before.
Release Notes:
- Fixed font sizes not reacting on settings change
Kirill Bulatov
created
db28b9b
Add typescript-language-server and vtsls to list of available language servers (#26046)
Click to expand commit body
Add the typescript language severs as lsp adapters.
This would allow language extensions to use them.
For example using on vue files to be able to run the vue-language-server
in
[hybridMode](https://github.com/vuejs/language-tools?tab=readme-ov-file#hybrid-mode-configuration-requires-vuelanguage-server-version-200).
Release Notes:
- Added `vtsls` and `typescript-language-server` to the list of
available language servers.
Isac Ljung
created
0453cb2
git: Improvements to fetch/push/pull (#26041)
Click to expand commit body
- Add global handlers so these actions can be invoked from the command
palette, etc.
- Tweak spinner to not show itself until a remote has been selected
Release Notes:
- N/A
ad94642
markdown: Fix code block wrapping when horizontal scrolling is disabled (#26048)
Click to expand commit body
This PR fixes an issue where code block wrapping was broken when not
using horizontal scrolling after
https://github.com/zed-industries/zed/pull/25956.
Release Notes:
- N/A
Marshall Bowers
created
f4899d9
assistant2: Add support for editing the last message sent by the user (#26037)
Closes #12887
Release Notes:
- Fixed `x g ctrl-a` step
0x2CA
created
161f8a1
Fix "Open a file or project to get started" placeholder text not always shown (#26044)
Click to expand commit body
Check that there are no `visible_worktrees` rather than checking
`worktrees` when deciding whether to display the "Open a file or project
to get started" text
Closes #25395
Release Notes:
- Fixed the "Open a file or project to get started" message not always
showing after all buffers have been closed
This PR adds the `git.hunk_style` setting, allowing setting an alternate
style for hunks – specifically the rendering of unstaged hunks.
It has 2 options:
- `transparent` (unstaged hunks are more transparent/less opaque than
staged hunks)
- `pattern (unstaged hunks are indicated by a visual pattern)
We'll possibly explore a VSCode-style "don't show staged hunks", but the
complexity it adds is a bit out of scope for now.
Transparent:

Pattern:

Release Notes:
- Git Beta: Added `git.hunk_style` setting to allow toggling between git
hunk visual styles.
Nate Butler
created
0ec15d6
Fix soft_wrap setting not applying to buffers starting with a different language (#25880)
Click to expand commit body
Closes #22999
# Problem
Currently, the default soft wrap mode of an editor is determined by
reading the language-specific settings of the language _at offset zero_
in the editor's (multi)buffer. While this provides a way to pick a
single soft wrap mode for a multi-language multibuffer, it's a bad
choice for a single-buffer multibuffer that begins with a different
embedded language. For example, Markdown with frontmatter:
```markdown
---
my_front_matter
---
# Hello World
```
Setting this in config:
```json
"languages": {
"Markdown": { "soft_wrap": "bounded" }
},
```
Will not soft wrap the Markdown file as the language at offset zero is
YAML.
# Solution
Instead of using the language at offset zero, use the language of the
first buffer in the multibuffer (the buffer at offset zero). This gives
better behavior for single-buffer editors, and a similar default for
multi-language multibuffers as before.
# Testing
All existing `editor` crate tests pass, but I would appreciate any
guidance for where best to add additional testing.
Release Notes:
- Fixed soft_wrap setting not applying to buffers starting with a
different language
---------
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Alex Ozer
and
Kirill Bulatov
created
909de2c
assistant2: Use `cmd-n` to create a new prompt editor when already in a prompt editor (#25935)
Click to expand commit body
This flips the keybindings that are used to create a new thread/prompt
editor (only when you're already in a prompt editor)
Release Notes:
- N/A
Bennet Bo Fenner
created
f31749c
edit predictions: Improve UX when there's no keybinding for accepting predictions (#25815)
Click to expand commit body
If the user already binds `tab`/`alt-tab`/`alt-l` to a different action
in a conflicting context and hasn't assigned a different keybinding for
`editor::AcceptEditPrediction`, we would show broken popovers with no
bindings:

Instead, they will now see an error-variant of every popover which
includes a tooltip with a short description and buttons to open the
keymap, and open a new docs section explaining the issue in detail and
how to fix it.

Note: I included the docs change in this PR because it's ok to deploy
before the release, as it also applies to existing versions.
Release Notes:
- edit predictions: Improve UX when there's no keybinding for accepting
predictions
---------
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Danilo <danilo@zed.dev>
Agus Zubiaga
,
Danilo Leal
, and
Danilo
created
76a8160
Reuse existing logic used to generate commit messages to disable commit buttons (#26034)
Click to expand commit body
Also
- Recomputes `suggested_commit_message` and no longer stores it, to
ensure things are always up to date
- Reduces indentation in `render_footer`
Release Notes:
- N/A
Joseph T. Lyons
created
7d22059
migration: Add for `editor::GoToHunk` and `editor::GoToPrevHunk` actions (#26017)
Click to expand commit body
We modified few actions in
https://github.com/zed-industries/zed/pull/25846, which are:
`"editor::GoToHunk" -> ["editor::GoToHunk", { "center_cursor": true }]`
`"editor::GoToPrevHunk" -> ["editor::GoToPrevHunk", { "center_cursor":
true }]`
Also, recently we changed and added migration for:
`["editor::GoToPrevHunk", { "center_cursor": true }] ->
["editor::GoToPreviousHunk", { "center_cursor": true }] `
This means:
1. User that might still have `editor::GoToHunk` won't be automatically
migrated to `["editor::GoToHunk", { "center_cursor": true }]`. Note
value of `center_cursor` is false, in first case (default), and true in
second case.
2. User that might still have `editor::GoToPrevHunk` won't be
automatically migrated to `["editor::GoToPreviousHunk", {
"center_cursor": true }]`. Note, `editor::GoToPrevHunk` is renamed
since, it is now invalid action.
This PR adds those migrations.
cc: @marcospb19
Release Notes:
- N/A
smit
created
6b16a55
Fix lost focus when navigating back in project search result (#22483)
Click to expand commit body
Closes #22447
When navigate forward/back, the focus moves from the ProjectSearchView's
result editor to the Pane, and then move to the ProjectSearchView, but
the event `on_focus_in` not triggered for ProjectSearchView, causing the
result editor to lose focus eventually.
https://github.com/zed-industries/zed/blob/f6dabadaf79bd29c89c8d55a1e9f1d33236f736e/crates/workspace/src/workspace.rs#L1372
https://github.com/zed-industries/zed/blob/f6dabadaf79bd29c89c8d55a1e9f1d33236f736e/crates/workspace/src/workspace.rs#L1385
Considering that the navigation might be triggered again in the next
frame, so use `on_next_frame` in `on_focus` event to move focus to
result editor.
Next frame:
- the blur event triggered for result editor.
- focus move from ProjectSearchView to result editor in `on_focus` event
for ProjectSearchView
- navigate again, focus moves from result editor to Pane then move back
to ProjectSearchView
- the focus not change during this frame, so no focus event happened for
ProjectSearchView.

Release Notes:
- Fix lost focus when navigate back in project search result
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
feeiyu
and
Kirill Bulatov
created
7ba2b25
Fix a panic on Linux theme appearance change (#26019)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/26009
https://github.com/zed-industries/zed/blob/21484a2e9d07b6285f112ba49ca413cdb8e360e4/crates/gpui/src/platform/linux/platform.rs#L517-L519
`with_common` panicked at `borrow_mut` which is the way it's implemented
for X11, Wayland and Headless Linux counterparts.
https://github.com/zed-industries/zed/blob/21484a2e9d07b6285f112ba49ca413cdb8e360e4/crates/gpui/src/platform/linux/wayland/client.rs#L722-L724
By accessing the appearance global instead of a `RefCell` with it, the
panic goes away with one notable side-effect, on Linux only: the first
global's value on `Dark` appearance would be `Light`: it becomes normal
instantly, thanks to
https://github.com/zed-industries/zed/blob/21484a2e9d07b6285f112ba49ca413cdb8e360e4/crates/workspace/src/workspace.rs#L1083-L1090
Things work without flickering:
[linux_theme_toggle.webm](https://github.com/user-attachments/assets/0e39ddc0-b4ff-4475-93ff-7b2bd7233628)
Release Notes:
- Fixed a panic on Linux theme appearance change
Kirill Bulatov
created
cbb535f
Fix completion details on new clangd versions (#25405)
Click to expand commit body
Fixes #16057
In newer versions of clangd, the switch labelDetailsSupport in the json
passed to the language server modifies the format of the returned json.
Zed handles well the old format, but misses the function parameters in
the new one. For example:
The old format looks like this:
```json
...
"label": " Window(int width, int height, const char *name, bool vsync, bool resizable)",
...
```
and with labelDetailsSupport = true:
```json
...
"label": " Window",
"labelDetails": {
"detail": "(int width, int height, const char *name, bool vsync, bool resizable)"
},
...
```
A simple solution is to just to not tell the language server that label
details are supported and force it to use the old format. This is a
dirty fix, but makes the completions behave like in the old versions of
clangd.
I do not know if this will break another language server. From what I've
found out most lsp-s do not depend on that setting and provide all
completion data either way. If not, this switch will need to be exposed
in a config or be at least lsp-dependant.
Lastly, I do not know Rust, maybe will need help to make a better fix
for the issue.
Release Notes:
- Fixed broken C++ completion suggestions
Boris Vassilev
created
20fc753
editor: Ensure correct tab icon is shown for files outside of the current project (#25933)
Click to expand commit body
Closes #25885
This PR improves the matching for file icons to tabs.
Previously, the tab icon would be resolved based upon the relative path
in the current project. However, this caused the default file icon being
assigned to all files outside of the project, as the relative path for
these files would be empty.
Instead, `path_for_buffer` is now used which always returns a proper
file name even for paths outside the current project (as also stated [in
this
comment](https://github.com/zed-industries/zed/blob/fee9c677078ad5beebe151e8350e1fc353230dc9/crates/editor/src/items.rs#L1689)).
As the file name is sufficient for matching icons to files, this fixes
the linked issue whilst not changing anything for previously properly
matched icons.
| `main` | This PR |
| --- | --- |
| <img width="296" alt="main"
src="https://github.com/user-attachments/assets/e72b8b5d-aa1c-4a8e-903f-14239f5b8764"
/> | <img width="296" alt="PR"
src="https://github.com/user-attachments/assets/a736974a-ce41-4861-be3f-95448cc7ffd0"
/> |
Release Notes:
- Fixed wrong file icons being shown for files outside of the current
project.