Commit graph

28294 commits

Author SHA1 Message Date
Anthony Eid
3ff62ef289
debugger beta: Update Javascript's DAP to allow passing in url instead of program (#31494)
Closes #31375

Release Notes:

- debugger beta: Allow passing in URL instead of program for Javascript
launch request
2025-05-27 11:02:16 +00:00
Danilo Leal
f8f36d0c17
docs: Improve agent's "get notified" section (#31496)
Quick docs refinement as a follow-up to
https://github.com/zed-industries/zed/pull/31472.

Release Notes:

- N/A
2025-05-27 08:00:37 -03:00
Raphael Lüthy
05763b2fe3
debugger beta: Fix install detection for Debugpy in venv (#31339)
Based on my report on discord when chatting with Anthony and Remco:
https://discord.com/channels/869392257814519848/1375129714645012530

Root Cause: Zed was incorrectly trying to execute a directory path
instead of properly invoking the debugpy module when debugpy was
installed via package managers (pip, conda, etc.) rather than downloaded
from GitHub releases.

Solution:

- Automatic Detection: Zed now automatically detects whether debugpy is
installed via pip/conda or downloaded from GitHub
- Correct Invocation: For pip-installed debugpy, Zed now uses python -m
debugpy.adapter instead of trying to execute file paths
- Added a `installed_in_venv` flag to differentiate the setup properly
- Backward Compatibility: GitHub-downloaded debugpy releases continue to
work as before
- Enhanced Logging: Added logging to show which debugpy installation
method is being used (I had to verify it somehow)

I verified with the following setups (can be confirmed with the debug
logs):
- `conda` with installed debugpy, went to installed instance
- `uv` with installed debugpy, went to installed instance
- `uv` without installed debugpy, went to github releases
- Homebrew global python install, went to github releases

Release Notes:

- Fix issue where debugpy from different environments won't load as
intended
2025-05-27 12:45:55 +03:00
Oleksiy Syvokon
7ec61ceec9
agent: Indiciate files and folders in list_directory (#31448)
Otherwise, the agent confuses directories with files in cases where dirs
are named like files (`TODO`, `task.js`, etc.)

Release Notes:

- N/A
2025-05-27 09:26:17 +00:00
Ben Brandt
119beb210a
Update default models to newer versions (#31415)
Follow up to: https://github.com/zed-industries/zed/pull/31209
Changes default models across multiple providers:
- Zed.dev Default Models in settings: claude-3-7-sonnet-latest →
claude-4-sonnet-latest
- Bedrock Default Model: Claude 3.5 Sonnet v2 → Claude Sonnet 4
- Google AI Default Fast Model: Gemini 1.5 Flash → Gemini 2.0 Flash

Release Notes:

- N/A
2025-05-27 10:54:42 +02:00
Michael Sloan
0d3fad7764
Fix some completion docs render delays (#31486)
Closes #31460

While this is now much better than it was, the documentation still
flickers when changing selection. Hoping to fix that, but it will be a
much more involved change. So leaving release notes as "N/A" for now, in
anticipation of the full fix.

Release Notes:

- N/A
2025-05-27 04:58:02 +00:00
Joseph T. Lyons
450a10facf
Revert to calling .update in eval fixture (#31483)
Looks like I accidentally touched a line of code in an eval fixture in
#31479, despite intentionally trying to avoid that code. Thanks
@cole-miller!

Release Notes:

- N/A
2025-05-27 03:59:44 +00:00
Joseph T. Lyons
c208532693
Use read-only access methods for read-only entity operations (#31479)
Another follow-up to #31254

Release Notes:

- N/A
2025-05-26 23:04:31 -04:00
Cole Miller
4a577fff4a
git: Fix hunk controls blocking scrolling (#31476)
Thanks @mgsloan for introducing `stop_mouse_events_except_scroll` which
is exactly what we want here!

Release Notes:

- Fixed being unable to scroll editors when the cursor is positioned on
diff hunk controls.
2025-05-27 01:35:00 +00:00
Cole Miller
03071a9152
debugger: Add an action to rerun the last session (#31442)
This works the same as selecting the first history match in the new
session modal.

Release Notes:

- Debugger Beta: Added the `debugger: rerun last session` action, bound
by default to `alt-f4`.
2025-05-26 21:21:11 -04:00
Cole Miller
092be31b2b
debugger: Add missing StepOut handler (#31463)
Closes #31317

Release Notes:

- Debugger Beta: Fixed a bug that prevented keybindings for the
`StepOut` action from working.
2025-05-26 21:19:07 -04:00
Cole Miller
62545b985f
debugger: Fix wrong port used for SSH debugging (#31474)
We were trying to connect on the user's machine to the port number used
by the debugger on the remote machine, instead of the randomly-assigned
local available port.

Release Notes:

- Debugger Beta: Fixed a bug that caused connecting to a debug adapter
over SSH to hang.
2025-05-26 21:18:10 -04:00
Smit Barmase
5e72c2a870
editor: Show hidden mouse cursor on window activation (#31475)
Closes #31349

Release Notes:

- Fixed issue where hidden mouse cursor would stay hidden even after
switching windows.
2025-05-27 06:40:22 +05:30
Smit Barmase
2a8242ac90
editor: Add Python auto-indent test for same row bracket pair (#31473)
We [recently](https://github.com/zed-industries/zed/pull/31260) added a
condition which fixes certain edge cases detecting indent ranges when a
bracket pair is on the same row for suggested indent languages. This PR
adds a test for that so we don't regress in the future. Ref:
https://github.com/zed-industries/zed/issues/31362


f9592c6b92/crates/language/src/buffer.rs (L2910)

Release Notes:

- N/A
2025-05-27 06:02:41 +05:30
Danilo Leal
d211f88d23
agent: Add sound notification when done generating (#31472)
This PR adds the ability to hear a sound notification when the agent is
done generating and/or needs user input. This setting is turned off by
default and can be used together with the visual notification. The
specific sound I'm using here comes from the [Material Design 2 Sound
Library](https://m2.material.io/design/sound/sound-resources.html#).

Release Notes:

- agent: Added the ability to have a sound notification when the agent
is done generating and/or needs user input.
2025-05-26 21:20:41 -03:00
Kirill Bulatov
fe0bcd14d2
Activate last item if item's number is greater than the last one's (#31471)
Release Notes:

- N/A
2025-05-26 23:24:53 +00:00
Kirill Bulatov
e84463648a
Highlight file finder entries according to their git status (#31469)
Configure this with the
```json5
"file_finder": {
  "git_status": true
}
```
settings value.

Before:
<img width="864" alt="before"
src="https://github.com/user-attachments/assets/5943e30f-1105-445e-9398-ea6dd35877c8"
/>

After:
<img width="864" alt="image"
src="https://github.com/user-attachments/assets/56b2fad6-8cdc-4f28-b238-920745231b1f"
/>

After with search matches:
<img width="577" alt="image"
src="https://github.com/user-attachments/assets/8c414575-7daf-43a8-89c2-98137d52b7a0"
/>

Release Notes:

- Start highlighting file finder entries according to their git status
2025-05-26 23:14:16 +00:00
Finn Evers
24809c4219
editor: Ensure minimap top offset is never NaN (#31466)
(Late) Follow-up to
https://github.com/zed-industries/zed/pull/26893#discussion_r2073427393

The mentioned issue of needed zero-division for scrollbars is now fixed
via #30189.
However, whilst the linked PR fixed the issue for the layouting of the
scrollbar thumb, I sadly did not address the (somewhat rare) case of
`document_lines == visible_editor_lines` within the calculation of the
minimap top offset.

This PR adds coverage for that case and ensures that the
`minimap_top_offset` never ends up being `NaN`.

Release Notes:

- N/A
2025-05-26 22:21:19 +00:00
Kirill Bulatov
f8365c5375
Move to splits more ergonomically (#31449)
Part of https://github.com/zed-industries/zed/discussions/24889

Release Notes:

- Made `workspace::MoveItemToPaneInDirection` and
`workspace::MoveItemToPane` to create non-existing panes
2025-05-27 00:59:47 +03:00
Finn Evers
2c8049270a
language_tools: Increase available space for language server logs (#30742)
This PR contains some small improvements for the language server log
editors. Due to the large gutter as well as the introduction of the
minimap, the horizontally available space was rather small. As these
editors soft wrap at the editor width, it resulted in the logs becoming
vertically larger and somewhat harder to read.

The improvement here is to disable all elements in the gutter that will
never appear or be used in the logs anyway. Furthermore, I opted to
disable the minimap altogether, since from my point of view it did not
contain any valuable information about the logs being shown.

First image is the current main, second is this branch. I put these
below each other so the difference is easier to spot.


![main](https://github.com/user-attachments/assets/b3796e5f-4fe3-48c8-95a4-d3b84c607963)

![PR](https://github.com/user-attachments/assets/bd8a4e6c-dbbb-4a9e-99aa-474fa073196f)


Release Notes:

- N/A
2025-05-27 00:57:45 +03:00
Kirill Bulatov
6840a4e5bc
Parse .//a//b/-prefixed paths more leniently in the file finder (#31459)
Closes https://github.com/zed-industries/zed/issues/15081
Closes https://github.com/zed-industries/zed/issues/31064

Release Notes:

- Parse `./`/`a/`/`b/`-prefixed paths more leniently in the file finder
2025-05-26 20:38:12 +00:00
Kirill Bulatov
5b320d6714
Be more lenient when looking up gitignored files in file finder (#31457)
The lookup was disabled due to concerns of being forced to traverse many
gitignored file entries. Since Zed does not index these eagerly, but
only contents of the directories that are parent to the gitignored file
entries, it might be not that bad — let's see how much improvement it
provides.

Closes https://github.com/zed-industries/zed/issues/31016

Release Notes:

- Improved file finder to include indexed gitignored files in its search
results
2025-05-26 23:24:32 +03:00
Joseph T. Lyons
534bb0620d
Use read() over read_with() to improve readability in simple cases (#31455)
Follow up to: #31263 

Release Notes:

- N/A
2025-05-26 16:14:07 -04:00
Alistair Smith
5bafb2b160
Add holding opt/alt for fast scrolling (#31056)
Fixes #14612

This was a feature I dearly missed from VSCode, so adding this helped me
migrate to Zed without disrupting my workflow. I found that `4.0` was a
nice goldilocks multiplier and felt close/the same as the speed in
VSCode.

Release Notes:

- Added faster scrolling in the editor while holding opt/alt
2025-05-26 19:42:20 +00:00
Cole Miller
ee415de45f
debugger: Add keyboard navigation for breakpoint list (#31221)
Release Notes:

- Debugger Beta: made it possible to navigate the breakpoint list using
menu keybindings.
2025-05-26 19:40:07 +00:00
Antonio Scandurra
4acb4730a5
Tolerate edits ending with </edits> instead of </new_text> (#31453)
Release Notes:

- Improve reliability of the agent when a model outputs malformed edits.
2025-05-26 19:36:58 +00:00
Kirill Bulatov
4567360fd9
Allow LSP adapters to decide, which diagnostics to underline (#31450)
Closes
https://github.com/zed-industries/zed/pull/31355#issuecomment-2910439798

<img width="1728" alt="image"
src="https://github.com/user-attachments/assets/2eaa8e9b-00bc-4e99-ac09-fceb2d932e41"
/>


Release Notes:

- N/A
2025-05-26 22:19:02 +03:00
Finn Evers
4c396bcc91
theme: Add colors for minimap thumb and border (#30785)
A user on Discord reported an issue where the minimap thumb was fully
opaque:

<img
src="https://github.com/user-attachments/assets/5049c6a3-f89a-4ceb-9d1b-ec06e7fe9151"
height="300">

This can happen because the scrollbar and its thumb might not
neccessarily be transparent at all.

Thus, this PR adds the`minimap.thumb.background` and
`minimap.thumb.border` colors to themes so theme authors can specify
custom colors for both here.
Furthermore, I ensured that the minimap thumb background fallback value
can never be entirely opaque. The values were arbitrarily chosen to
avoid the issue from occuring whilst keeping currently working setups
working. With the new properties added, authors (and users) should be
able to avoid running into this issue altogether so I would argue for
this special casing to be fine. However, open to change it should a
different approach be preferrred.

Release Notes:

- Added `minimap.thumb.background` and `minimap.thumb.border` to themes
to customize the thumb color and background of the minimap.
- Fixed an issue where the minimap thumb could be opaque if the theme
did not specify a color for the thumb.
2025-05-26 18:23:41 +00:00
Danilo Leal
8a24f9f280
agent: Refine naming for the panel default_view setting (#31446)
Follow up to https://github.com/zed-industries/zed/pull/31353. Just
ensuring we're walking toward a more consistent use of the multiple
terms we have floating around in the AI realm. In this case, `thread` is
the term for the now default view, the one that has agentic features;
`text_thread` is the term for the original view, the one where it's just
text. The settings now reflect this. Also took advantage of the
opportunity to add some docs, too.

Release Notes:

- N/A
2025-05-26 15:09:13 -03:00
claytonrcarter
f4b361f04d
language: Select language based on longest matching path extension (#29716)
Closes #8408  
Closes #10997

This is a reboot of [my original
PR](https://github.com/zed-industries/zed/pull/11697) from last year. I
believe that I've addressed all the comments raised in that original
review, but Zed has changed a lot in the past year, so I'm sure there
will be some new stuff to consider too.

- updates the language matching and lookup to consider not just "does
the suffix/glob match" but also "... and is it the longest such match"
- adds a new `LanguageCustomFileTypes` struct to pass user globs from
settings to the registry
- _minor/unrelated:_ updates a test for the JS extension that wasn't
actually testing what is intended to
- _minor/unrelated:_ removed 2 redundant path extensions from the JS
lang extension

**Languages that may use this**

- Laravel Blade templates use the `blade.php` compound extension
-
[apparently](https://github.com/zed-industries/zed/issues/10765#issuecomment-2091293304)
Angular uses `component.html`
  - see also https://github.com/zed-industries/extensions/issues/169
- _hypothetically_ someone could publish a "JS test" extension w/ custom
highlights and/or snippets; many JS tests use `test.js` or `spec.js`

**Verifying these changes**

I added a number of assertions for this new behavior, and I also
confirmed that the (recently patched) [Laravel Blade
extension](https://github.com/bajrangCoder/zed-laravel-blade) opens as
expected for `blade.php` files, whereas on `main` it does not.

cc @maxbrunsfeld (reviewed my original PR last year), @osiewicz and
@MrSubidubi (have recently been in this part of the code)

Release Notes:

- Added support for "compound" file extensions in language extensions,
such `blade.php` and `component.html`. Closes #8408 and #10997.
2025-05-26 11:00:05 -07:00
Michael Sloan
649072d140
Add a live Rust style editor to inspector to edit a sequence of no-argument style modifiers (#31443)
Editing JSON styles is not very helpful for bringing style changes back
to the actual code. This PR adds a buffer that pretends to be Rust,
applying any style attribute identifiers it finds. Also supports
completions with display of documentation. The effect of the currently
selected completion is previewed. Warning diagnostics appear on any
unrecognized identifier.


https://github.com/user-attachments/assets/af39ff0a-26a5-4835-a052-d8f642b2080c

Adds a `#[derive_inspector_reflection]` macro which allows these methods
to be enumerated and called by their name. The macro code changes were
95% generated by Zed Agent + Opus 4.

Release Notes:

* Added an element inspector for development. On debug builds,
`dev::ToggleInspector` will open a pane allowing inspecting of element
info and modifying styles.
2025-05-26 17:43:57 +00:00
Oleksiy Syvokon
6253b95f82
agent: Fix creating files with Gemini (#31439)
This change instructs models to wrap new file content in Markdown fences
and introduces a parser for this format. The reasons are:

1. This is the format we put a lot of effort into explaining in the
system prompt.
2. Gemini really prefers to do it.
3. It adds an option for a model to think before writing the content

The `eval_zode` pass rate for GEmini models goes from 0% to 100%. Other
models were already at 100%, this hasn't changed.


Release Notes:

- N/A
2025-05-26 16:36:21 +00:00
jvmncs
bffde7c6b4
nix: Make zeditor symlink in package output (#31354)
home-manager expects a `zeditor` binary to wrap (because the nixpkgs
derivation names the CLI `zeditor` instead of `zed`)

Release Notes:

- N/A
2025-05-26 08:59:52 -07:00
ADmad
7e87916642
Fix VS Code settings file location on Linux (#31242)
Refs #30117

Release Notes:

- N/A
2025-05-26 08:58:03 -07:00
Vinicius Akira
29f0762b6c
Add block_comment to JS, TSX, and TS (#31400)
This is the first step of ["Solution proposal for folding multiline
comments with no
indentation"](https://github.com/zed-industries/zed/discussions/31395):

> 1. Add block_comment in the config.toml for the languages javascript,
typescript, tsx. These are simple languages for this feature, and I am
already familiar with them.

The next step will be:

> 2. Modify the function `crease_for_buffer_row` in `DisplaySnapshot` to
handle multiline comments. `editor::fold` and `editor::fold_all` will
handle multiline comments after this change. To my knowledge,
`editor::unfold`, `editor::unfold_all`, and the **unfold** indicator in
the gutter will already work after folding, but there will be no
**fold** indicator.

Release Notes:

- N/A
2025-05-26 11:53:22 -04:00
Cole Miller
10af3c7e58
debugger: Fix misleading error logs (#31293)
Release Notes:

- N/A
2025-05-26 15:49:03 +00:00
Ben Kunkle
c0aa8f63fd
zlog: Replace usages of env_logger in tests with zlog (#31436)
Also fixes:
https://github.com/zed-industries/zed/pull/31400#issuecomment-2908165249

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-05-26 11:48:50 -04:00
Shardul Vaidya
0c27aaecb3
docs: Bedrock Configuration docs (#31043)
Release Notes:

- Added documentation for Amazon Bedrock

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-05-26 12:09:49 -03:00
Alvaro Parker
8e5d50b85b
agent: Add a setting choose the default view (#31353)
Related discussions #30240 #30596

Release Notes:

- Added an option on the settings file to choose either the `agent`
panel or the `thread` panel as the default assistant panel when you
first open it. On `settings.json`:
```json
{
  "agent": {
    "default_view": "thread", // default is agent
    }
}
```
2025-05-26 16:33:18 +02:00
Smit Barmase
625bf09830
editor: Inline Code Actions Indicator (#31432)
Follow up to https://github.com/zed-industries/zed/pull/30140 and
https://github.com/zed-industries/zed/pull/31236

This PR introduces an inline code action indicator that shows up at the
start of a buffer line when there's enough space. If space is tight, it
adjusts to lines above or below instead. It also adjusts when cursor is
near indicator.

The indicator won't appear if there's no space within about 8 rows in
either direction, and it also stays hidden for folded ranges. It also
won't show up in case there is not space in multi buffer excerpt. These
cases account for very little because practically all languages do have
indents.


https://github.com/user-attachments/assets/1363ee8a-3178-4665-89a7-c86c733f2885

This PR also sets the existing `toolbar.code_actions` setting to `false`
in favor of this.

Release Notes:

- Added code action indicator which shows up inline at the start of the
row. This can be disabled by setting `inline_code_actions` to `false`.
2025-05-26 19:41:19 +05:30
Ben Brandt
5a0a8ce30a
extension: Update to wasm32-wasip2 target (#30953)
Cleans things up now that wasm32-wasip2 is a supported target.

Before we merge, I will need to test against the current extensions to
make sure this is fine.

However, since our wit world isn't using any wasi package imports, this
shouldn't be a breaking change.

Release Notes:

- N/A
2025-05-26 16:06:38 +02:00
CharlesChen0823
d9a5dc2dfe
windows: Using ctrl+drag to copy in windows platform (#31433)
Closes #31328 

> There should be other places in Zed that were supposed to handle mouse
modifiers differently based on the platform, might worth checking for
them.
reference
[comments](https://github.com/zed-industries/zed/pull/29921#issuecomment-2908922764)

Release Notes:

- N/A
2025-05-26 13:45:19 +00:00
loczek
d4926626d8
snippets: Add icons and file names to snippet scope selector (#30212)
I added the language icons to the snippet scope selector so that it
matches the language selector.

The file names are displayed for each scope where there is a existing
snippets file since it wasn't clear if a scope had a file already or
not.

| Before | After |
| - | - |
|
![before](https://github.com/user-attachments/assets/89f62889-d4a9-4681-999a-00c00f7bec3b)|
![after](https://github.com/user-attachments/assets/2d64f04c-ef8f-40f5-aedd-eca239c960e9)
|


Release Notes:

- Added language icons and file names to snippet scope selector

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2025-05-26 13:44:09 +00:00
CharlesChen0823
2a973109d4
pane: Add functional clone on drop with control modifier (#29921)
Release Notes:

- Added a way to split and clone tab on with alt (macOS) / ctrl-mouse
drop
2025-05-26 13:40:19 +00:00
tidely
2e62f16149
gpui: Apply cfg at compile time (#31428)
- Use compile time `cfg` macro instead of a runtime check
- Use `Modifiers` instead of a bunch of `bool` when parsing a
`Keystroke`.

Release Notes:

- N/A
2025-05-26 13:34:04 +00:00
Cole Miller
f2601ce52c
Fix text wrapping in commit message editors (#31030)
Don't hard wrap interactively; instead, soft wrap in `Bounded` mode
(editor width or 72 chars, whichever is smaller), and then hard wrap
before sending the commit message to git.

This also makes the soft wrap mode and width for commit messages
configurable in language settings.

Previously we didn't support soft wrap modes other than `EditorWidth` in
auto-height editors; I tried to add support for this by analogy with
code that was already there, and it seems to work pretty well.

Closes #27508

Release Notes:

- Fixed confusing wrapping behavior in commit message editors.
2025-05-26 13:11:56 +00:00
Kirill Bulatov
a58c48f629
Fix a clippy issue (#31429)
A cherry-pick from `main`,
https://github.com/zed-industries/zed/pull/31425 , failed with a clippy
error:
https://github.com/zed-industries/zed/actions/runs/15253598167/job/42895919271

Release Notes:

- N/A
2025-05-26 12:59:20 +00:00
Danilo Leal
ddbcab2b5b
picker: Improve input padding (#31422)
This is a tiny PR to make the picker input padding match the list item
results horizontal spacing. They were previously misaligned and it was
getting to me. 😬

| Before | After |
|--------|--------|
| ![CleanShot 2025-05-26 at 8  03
59@2x](https://github.com/user-attachments/assets/e3d8c10a-7ded-4e40-bc69-dc9d35038785)
| ![CleanShot 2025-05-26 at 8  04
09@2x](https://github.com/user-attachments/assets/a8273174-edcb-45a8-809b-622ea18af37a)
|

Release Notes:

- N/A
2025-05-26 09:55:47 -03:00
Patrick Leibersperger
7497deff7a
agent: Add a whitespace after inserting @-mention to allow for continuous typing (#30381)
Release Notes:

- agent: Added a space after @-mentioning something in the message
editor to allow for continuous typing.

---------

Co-authored-by: Peter Tripp <peter@zed.dev>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2025-05-26 09:55:19 -03:00
Joseph T. Lyons
e78b726ed8
Remove the ability to book onboarding (#31404)
Closes: https://github.com/zed-industries/zed/issues/31394

Onboarding has been valuable, but we're moving into a new phase as our
user base grows, and our ability to chat with everyone who books a call
will not scale linearly. For now, we are removing the option to book a
call from the application.

Release Notes:

- N/A
2025-05-26 15:02:51 +03:00