3e8565a
Initialize zlog default filters on init rather than waiting for settings load (#32209)
Click to expand commit body
Now immediately initializes the zlog filter even when there isn't an env
config. Before this change the default filters were applied after
settings load - I was seeing some `zbus` logs on init.
Also defaults to allowing warnings and errors from the suppressed log
sources. If these turn out to be chatty (they don't seem to be so far),
can bring back more suppression.
Release Notes:
- N/A
Michael Sloan
created
d801b7b
Fix `bindings_for_action` handling of shadowed key bindings (#32220)
Click to expand commit body
Fixes two things:
* ~3 months ago [in PR
#26420](https://github.com/zed-industries/zed/pull/26420/files#diff-33b58aa2da03d791c2c4761af6012851b7400e348922d64babe5fd48ac2a8e60)
`bindings_for_action` was changed to return bindings even when they are
shadowed (when the keystrokes would actually do something else).
* For edit prediction keybindings there was some odd behavior where
bindings for `edit_prediction_conflict` were taking precedence over
bindings for `edit_prediction` even when the `edit_prediction_conflict`
predicate didn't match. The workaround for this was #24812. The way it
worked was:
- List all bindings for the action
- For each binding, get the highest precedence binding with the same
input sequence
- If the highest precedence binding has the same action, include this
binding. This was the bug - this meant that if a binding in the keymap
has the same keystrokes and action it can incorrectly take display
precedence even if its context predicate does not pass.
- Fix is to check that the highest precedence binding is a full match.
To do this efficiently, it's based on an index within the keymap
bindings.
Also adds `highest_precedence_binding_*` variants which avoid the
inefficiency of building lists of bindings just to use the last.
Release Notes:
- Fixed display of keybindings to skip bindings that are shadowed by a
binding that uses the same keystrokes.
- Fixed display of `editor::AcceptEditPrediction` bindings to use the
normal precedence that prioritizes user bindings.
Michael Sloan
created
37fa42d
windows: Fix a typo in function name (#32223)
Click to expand commit body
Release Notes:
- N/A
张小白
created
5c9b8e8
Move workspace::toast_layer::RunAction to zed_actions::toast::RunAction (#32222)
Click to expand commit body
Cleaner to have references to this be `toast::RunAction` matching how it
appears in the keymap, instead of `workspace::RunAction`.
Release Notes:
- N/A
e37c78b
Refactor some logic in `handle_tab_drop` (#32213)
Click to expand commit body
Tiny little clean up PR after #32184
Release Notes:
- N/A
Joseph T. Lyons
created
920ca68
Display subtle-mode prediction preview when partial accept modifiers held (#32212)
Click to expand commit body
Closes #27567
Release notes covered by the notes for #32193
Release Notes:
- N/A
Michael Sloan
created
f62d761
Fix matching braces in jsx/tsx tags (#32196)
Click to expand commit body
Closes #27998
Also fixed an issue where jumping back from closing to opening tags
didn't work in javascript due to missing brackets in our tree-sitter
query.
Release Notes:
- N/A
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Julia Ryan
and
Conrad Irwin
created
6a8fdbf
editor: Add multi cursor support for `AddSelectionAbove`/`AddSelectionBelow` (#32204)
Click to expand commit body
Closes #31648
This PR adds support for:
- Expanding multiple cursors above/below
- Expanding multiple selections above/below
- Adding new cursors/selections when expansion has already been done.
Existing expansions preserve their state and expand/shrink according to
the action, while new cursors/selections act like freshly created ones.
Tests for both cursor and selections:
- below/above cases
- undo/redo cases
- adding new cursors/selections with existing expansion
Before/After:
https://github.com/user-attachments/assets/d2fd556b-8972-4719-bd86-e633d42a1aa3
Release Notes:
- Improved `AddSelectionAbove` and `AddSelectionBelow` to extend
multiple cursors/selections.
Smit Barmase
created
711a9e5
x11: Remove logs for mac-os specific `set_edited` and `show_character_palette` (#32203)
Click to expand commit body
Release Notes:
- N/A
Michael Sloan
created
6de5d29
Fix caching of Node.js runtime paths and improve error messages (#32198)
Click to expand commit body
* `state.last_options` was never being updated, so the caching wasn't
working.
* If node on the PATH was too old it was logging errors on every
invocation even though managed node is being used.
Release Notes:
- Fixed caching of Node.js runtime paths and improved error messages.
Michael Sloan
created
d7015e5
Fix bugs around tab state loss when moving pinned tabs across panes (#32184)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/32181,
https://github.com/zed-industries/zed/issues/32179
In the screenshots: left = nightly, right = dev
Fix 1: A pinned tab dragged into a new split should remain pinned
https://github.com/user-attachments/assets/608a7e10-4ccb-4219-ba81-624298c960b0
Fix 2: Moving a pinned tab from one pane to another should not cause
other pinned tabs to be unpinned
https://github.com/user-attachments/assets/ccc05913-591d-4a43-85bb-3a7164a4d6a8
I also added tests for moving both pinned tabs and unpinned tabs into
existing panes, both into the "pinned" region and the "unpinned" region.
Release Notes:
- Fixed a bug where dragging a pinned tab into a new split would lose
its pinned tab state.
- Fixed a bug where pinned tabs in one pane could be lost when moving
one of the pinned tabs to another pane.
Joseph T. Lyons
created
ddf70b3
Add mismatched tag threshold parameter to eval function (#32190)
Click to expand commit body
Replace hardcoded 0.10 threshold with configurable parameter and set
0.05 default for most tests, with 0.2 for from_pixels_constructor
eval that produces more mismatched tags.
Release Notes:
- N/A
Ben Brandt
created
8bd8435
Fix default keybindings for `AcceptPartialEditPrediction` to work in subtle mode (#32193)
Click to expand commit body
Closes #27567
Release Notes:
- Fixed default keybindings for `editor::AcceptPartialEditPrediction` to
work with subtle mode.
Co-authored-by: Richard <richard@zed.dev>
Release Notes:
- Fixed a few rare panics that could happen when a multibuffer excerpt
started with expanded deleted content.
Conrad Irwin
created
7aa70a4
lsp: Implement support for the `textDocument/diagnostic` command (#19230)
Click to expand commit body
Closes [#13107](https://github.com/zed-industries/zed/issues/13107)
Enabled pull diagnostics by default, for the language servers that
declare support in the corresponding capabilities.
```
"diagnostics": {
"lsp_pull_diagnostics_debounce_ms": null
}
```
settings can be used to disable the pulling.
Release Notes:
- Added support for the LSP `textDocument/diagnostic` command.
# Brief
This is draft PR that implements the LSP `textDocument/diagnostic`
command. The goal is to receive your feedback and establish further
steps towards fully implementing this command. I tried to re-use
existing method and structures to ensure:
1. The existing functionality works as before
2. There is no interference between the diagnostics sent by a server and
the diagnostics requested by a client.
The current implementation is done via a new LSP command
`GetDocumentDiagnostics` that is sent when a buffer is saved and when a
buffer is edited. There is a new method called `pull_diagnostic` that is
called for such events. It has debounce to ensure we don't spam a server
with commands every time the buffer is edited. Probably, we don't need
the debounce when the buffer is saved.
All in all, the goal is basically to get your feedback and ensure I am
on the right track. Thanks!
## References
1.
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_pullDiagnostics
## In action
You can clone any Ruby repo since the `ruby-lsp` supports the pull
diagnostics only.
Steps to reproduce:
1. Clone this repo https://github.com/vitallium/stimulus-lsp-error-zed
2. Install Ruby (via `asdf` or `mise).
4. Install Ruby gems via `bundle install`
5. Install Ruby LSP with `gem install ruby-lsp`
6. Check out this PR and build Zed
7. Open any file and start editing to see diagnostics in realtime.
https://github.com/user-attachments/assets/0ef6ec41-e4fa-4539-8f2c-6be0d8be4129
---------
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Vitaly Slobodin
,
Kirill Bulatov
, and
Kirill Bulatov
created
04cd3fc
google: Add latest versions of Gemini 2.5 Pro and Flash Preview (#32183)
Click to expand commit body
Release Notes:
- Added the latest versions of Gemini 2.5 Pro and Flash Preview
I'm not sure when snippet tabstop choices broke, I checked the parent of
#31872 and they also don't work before that.
Release Notes:
- N/A
Michael Sloan
created
ccc173e
Fix "j" key latency in vim mode with "j k" keymap (#31163)
Click to expand commit body
Problem:
Initial keymap has "j k" keymap, which if uncommented will add +-1s
delay to every "j" key press
This workaround was taken from
https://github.com/zed-industries/zed/discussions/6661
Release Notes:
- N/A *or* Added/Fixed/Improved ...
---------
Co-authored-by: Michael Sloan <michael@zed.dev>
VladKopylets
and
Michael Sloan
created
03a030f
Add default method for `CompletionProvider::resolve_completions` (#32045)
I spotted this while working on something else. Very quick fix!
Release Notes:
- N/A
Richard Feldman
created
f36143a
debugger: Run locators on LSP tasks for the new process modal (#32097)
Click to expand commit body
- [x] pass LSP tasks into list_debug_scenarios
- [x] load LSP tasks only once for both modals
- [x] align ordering
- [x] improve appearance of LSP debug task icons
- [ ] reconsider how `add_current_language_tasks` works
- [ ] add a test
Release Notes:
- Debugger Beta: Added debuggable LSP tasks to the "Debug" tab of the
new process modal.
---------
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Cole Miller
and
Anthony Eid
created
8730d31
themes: Swap ANSI white with ANSI black (#32175)
Click to expand commit body
Here’s how it looks after the fix:
.
White is white and black is black, as intended.
In some cases, dimmed colors were poorly defined, so I took
`text.dimmed` values.
Note that white is defined exactly as the background color for light
themes. Similarly, black is the exact background color for dark themes.
I didn’t change this, but many themes intentionally make white and black
slightly different from the background color. This prevents issues where
programs assume, say, a dark background and set the foreground to white,
making text invisible. I'm not sure if we want to adjust these themes to
address this; just noting it here.
Closes #29379
Release Notes:
- Fixed ANSI black and ANSI white colors in built-in themes
Oleksiy Syvokon
created
783b33b
git: Rewrap commit messages just before committing instead of interactively (#32114)
28da99c
anthropic: Fix error when attaching multiple images (#32092)
Click to expand commit body
Closes #31438
Release Notes:
- agent: Fixed an edge case were the request would fail when using
Claude and multiple images were attached
---------
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
Bennet Bo Fenner
and
Richard Feldman
created
d2c265c
debugger: Change some text in the launch tab (#32170)
Click to expand commit body
I think using `Debugger Program` and `~/bin/debugger` here makes it seem
like that field is for specifying the path to the debugger itself, and
not the program being debugged.
Release Notes:
- N/A
Cole Miller
created
bbd431a
Build `zed-remote-server` on FreeBSD (#29561)
Click to expand commit body
Builds freebsd-remote-server under qemu working on linux runners.
Release Notes:
- Initial support for ssh remotes running FreeBSD x86_64
Peter Tripp
created
5b9d3ea
windows: Only call `TranslateMessage` when we can't handle the event (#32166)
Click to expand commit body
This PR improves key handling on Windows by moving the
`TranslateMessage` call from the message loop to after we handled
`WM_KEYDOWN`. This brings Windows behavior more in line with macOS and
gives us finer control over key events. As a result, Vim keybindings now
work properly even when an IME is active. The trade-off is that it might
introduce a slight delay in text input.
Release Notes:
- N/A
张小白
created
738cfdf
gpui: Simplify u8 to u32 conversion (#32099)
Click to expand commit body
Removes an allocation when converting four u8 into a u32.
Makes some functions const compatible.
Release Notes:
- N/A
tidely
created
32d5a2c
debugger: Fix wrong variant of new process modal deployed (#32168)
Click to expand commit body
I think this was added back when the `Launch` variant meant what we now
call `Debug`
Release Notes:
- N/A
Cole Miller
created
dda6140
eval: Add eval unit tests as a CI job (#32152)
Click to expand commit body
We run the unit evals once a day in the middle of the night, and trigger
a Slack post if it fails.
Release Notes:
- N/A
---------
Co-authored-by: Oleksiy Syvokon <oleksiy.syvokon@gmail.com>
The commit #31073 had introduced `zed-main.rs`, which replaced the
previous `main.rs` to be the "true" entry of the whole program. But as
the macro `#![cfg_attr(not(debug_assertions), windows_subsystem =
"windows")]` only works in the "true" entry, the release build will also
arise the console window if this macro doesn't move to the new entry
(the `zed-main.rs` here).
Release Notes:
- N/A
InfyniteHeap
created
3884de9
assistant: Partial fix for HTML entities in tools params (#32148)
Click to expand commit body
This problem seems to be specific to Opus 4. Eval shows improvement from
89% to 97%.
Closes: https://github.com/zed-industries/zed/issues/32060
Release Notes:
- N/A
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Oleksiy Syvokon
and
Ben Brandt
created
8af984a
Have tools respect private and excluded file settings (#32036)
Click to expand commit body
Based on a Slack conversation with @notpeter - this prevents secrets in
private/excluded files from being sent by the agent to third parties for
tools that don't require confirmation.
Of course, the agent can still use the terminal tool or MCP to access
these, but those require confirmation before they run (unlike these
tools).
This change doesn't seem to cause any trouble for evals:
<img width="730" alt="Screenshot 2025-06-03 at 8 48 33 PM"
src="https://github.com/user-attachments/assets/d90221be-f946-4af2-b57b-4aa047e86853"
/>
Release Notes:
- N/A
Richard Feldman
created
9d533f9
Allow to reuse windows in open remote projects dialogue (#32138)
Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/26276
Same as other "open window" actions like "open recent", add a
`"create_new_window": false` (default `false`) argument into the
`projects::OpenRemote` action.
Make all menus to use this default; allow users to change this in the
keybindings.
Same as with other actions, `cmd`/`ctrl` inverts the parameter value.
<img width="554" alt="default"
src="https://github.com/user-attachments/assets/156d50f0-6511-47b3-b650-7a5133ae9541"
/>
<img width="552" alt="override"
src="https://github.com/user-attachments/assets/cf7d963b-86a3-4925-afec-fdb5414418e1"
/>
Release Notes:
- Allowed to reuse windows in open remote projects dialogue
Kirill Bulatov
created
274a40b
docs: Fix missing comma in MCP code snippet (#32126)
Click to expand commit body
the docs now contain valid json
Closes #ISSUE
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Ben Swift
created
9c7b1d1
Fix a panic in merge conflict parsing (#32119)
Click to expand commit body
Release Notes:
- Fixed a panic that could occur when editing files containing merge
conflicts.
Cole Miller
created
3d98811
Reapply support for pasting images on x11 (#32121)
Click to expand commit body
This brings back [linux(x11): Add support for pasting images from
clipboard · Pull Request
#29387](https://github.com/zed-industries/zed/pull/29387) while fixing
#30523 (which caused it to be reverted).
Commit message from that PR:
> Closes:
https://github.com/zed-industries/zed/pull/29177#issuecomment-2823359242
>
> Removes dependency on
[quininer/x11-clipboard](https://github.com/quininer/x11-clipboard) as
it is in [maintenance
mode](https://github.com/quininer/x11-clipboard/issues/19).
>
> X11 clipboard functionality is now built-in to GPUI which was
accomplished by stripping the non-x11-related code/abstractions from
[1Password/arboard](https://github.com/1Password/arboard) and extending
it to support all image formats already supported by GPUI on wayland and
macos.
>
> A benefit of switching over to the `arboard` implementation, is that
we now make an attempt to have an X11 "clipboard manager" (if available
- something the user has to setup themselves) save the contents of
clipboard (if the last copy operation was within Zed) so that the copied
contents can still be pasted once Zed has completely stopped.
Before the fix for reapply, it was iterating through the formats and
requesting conversion to each. Some clipboard providers just respond
with a different format rather than saying the format is unsupported.
The fix is to use this response if it matches a supported format. It
also now typically avoids this iteration by requesting the `TARGETS` and
taking the highest precedence supported target.
Closes #30523
Release Notes:
- Linux (X11): Restored the ability to paste images.
---------
Co-authored-by: Ben <ben@zed.dev>
Michael Sloan
and
Ben
created
a2e98e9
Fix potential race-condition in DisplayLink::drop on macOS (#32116)
Click to expand commit body
Fix a segfault in CVDisplayLink
We see 1-2 crashes a day on macOS on the `CVDisplayLink` thread.
```
Segmentation fault: 11 on thread 9325960 (CVDisplayLink)
CoreVideo CVHWTime::reset()
CoreVideo CVXTime::reset()
CoreVideo CVDisplayLink::runIOThread()
libsystem_pthread.dylib _pthread_start
libsystem_pthread.dylib thread_start
```
With the help of the Zed AI, I dove into the crash report, which looks
like this:
```
Crashed Thread: 49 CVDisplayLink
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000000001f6
Exception Codes: 0x0000000000000001, 0x00000000000001f6
Thread 49 Crashed:: CVDisplayLink
0 CoreVideo 0x18c1ed994 CVHWTime::reset() + 64
1 CoreVideo 0x18c1ee474 CVXTime::reset() + 52
2 CoreVideo 0x18c1ee198 CVDisplayLink::runIOThread() + 176
3 libsystem_pthread.dylib 0x18285ac0c _pthread_start + 136
4 libsystem_pthread.dylib 0x182855b80 thread_start + 8
Thread 49 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000000 x1: 0x000000018c206e08 x2: 0x0000002c00001513 x3: 0x0001d4630002a433
x4: 0x00000e2100000000 x5: 0x0001d46300000000 x6: 0x000000000000002c x7: 0x0000000000000000
x8: 0x000000000000002e x9: 0x000000004d555458 x10: 0x0000000000000000 x11: 0x0000000000000000
x12: 0x0000000000000000 x13: 0x0000000000000000 x14: 0x0000000000000000 x15: 0x0000000000000000
x16: 0x0000000182856a9c x17: 0x00000001f19bc540 x18: 0x0000000000000000 x19: 0x0000600003c56ed8
x20: 0x000000000002a433 x21: 0x0000000000000000 x22: 0x0000000000000000 x23: 0x0000000000000000
x24: 0x0000000000000000 x25: 0x0000000000000000 x26: 0x0000000000000000 x27: 0x0000000000000000
x28: 0x0000000000000000 fp: 0x000000016b02ade0 lr: 0x000000018c1ed984
sp: 0x000000016b02adc0 pc: 0x000000018c1ed994 cpsr: 0x80001000
far: 0x00000000000001f6 esr: 0x92000006 (Data Abort) byte read Translation fault
Binary Images:
0x1828c9000 - 0x182e07fff com.apple.CoreFoundation (6.9) <df489a59-b4f6-32b8-9bb4-9b832960aa52> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
```
Using lldb to disassemble `CVHWTime::reset()` (and the AI to interpret
it), the crash is caused by dereferencing the pointer at the start of
the CVHWTime struct + 0x1c8. In this case the pointer has (the clearly
nonsense) value 0x2e (and 0x2e + 0x1c8 = 0x1f6, the failing address).
As to how this could happen...
Looking at the implementation of `CVDisplayLinkRelease`, it calls
straight into `CFRelease` on the main thread; and so it is not safe to
call `CVDisplayLinkRelease` concurrently with other threads that access
the CVDisplayLink. While we already stopped the display link, it turns
out that `CVDisplayLinkStop` just sets a flag on the struct to instruct
the io-thread to exit "soon", and returns immediately. That means we
don't know when the other thread will actually exit, and so we can't
safely call `CVDisplayLinkRelease`.
So, for now, we just leak these objects. They should be created
relatively infrequently (when the app is foregrounded/backgrounded), so
I don't think this is a huge problem.
Release Notes:
- Fix a rare crash on macOS when putting the app in the background.
Conrad Irwin
created
7c64737
project_panel: Fix drop highlight is not being removed when `esc` is pressed (#32115)
Click to expand commit body
Release Notes:
- Fixed the issue where pressing `esc` would cancel the drag-and-drop
operation but wouldn’t clear the drop highlight on directories.
Smit Barmase
created
8191a53
Make `editor::Rewrap` respect paragraphs (#32046)
Click to expand commit body
Closes #32021
Release Notes:
- Changed the behavior of `editor::Rewrap` to not join paragraphs
together.
Adds a validation step to docs preprocessing so that actions referenced
in docs are checked against the list of all registered actions in GPUI.
In order for this to work properly, all of the crates that register
actions had to be importable by the `docs_preprocessor` crate and
actually used (see [this
comment](https://github.com/zed-industries/zed/commit/ec16e70336552255adf99671ca4d3c4e3d1b5c5d#diff-2674caf14ae6d70752ea60c7061232393d84e7f61a52915ace089c30a797a1c3)
for why this is challenging).
In order to accomplish this I have moved the entry point of zed into a
separate stub file named `zed_main.rs` so that `main.rs` is importable
by the `docs_preprocessor` crate, this is kind of gross, but ensures
that all actions that are registered in the application are registered
when checking them in `docs_preprocessor`. An alternative solution
suggested by @mikayla-maki was to separate out all our `::init()`
functions into a lib entry point in the `zed` crate that can be imported
instead, however, this turned out to be a far bigger refactor and is in
my opinion better to do in a follow up PR with significant testing to
ensure no regressions in behavior occur.
Release Notes:
- N/A
Ben Kunkle
created
52770cd
docs: Fix the database path on Linux (and BSD) (#32072)
Click to expand commit body
Updated to reflect the logic in
https://github.com/zed-industries/zed/blob/main/crates/paths/src/paths.rs.
Release Notes:
- N/A
Martin Pool
created
4ac67ac
Automatically keep edits if they are included in a commit (#32093)
Click to expand commit body
Release Notes:
- Improved the review experience in the agent panel. Now, when you
commit changes (generated by the AI agent) using Git, Zed will
automatically dismiss the agent’s review UI for those changes. This
means you won’t have to manually “keep” or approve changes twice—just
commit, and you’re done.
Antonio Scandurra
created
8c1b549
workspace: Add setting to make dock resize apply to all panels (#30551)
Click to expand commit body
Re: #19015
Close #12667
When dragging a dock’s resize handle, only the active panel grows or
shrinks. This patch introduces an opt-in behaviour that lets users
resize every panel hosted by that dock at once.
Release Notes:
- Added new `resize_all_panels_in_dock` setting to optionally resize
every panel in a dock together.
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
Aaron Ruan
and
Mikayla Maki
created
ff6ac60
Allow running certain Zed actions when headless (#32095)