a605b66
editor: Do not insert scrollbar hitboxes when scrollbars are disabled (#27467)
Click to expand commit body
This PR fixes an issue where a clickable scrollbar track was inserted in
the editor even when scrollbars were explicitly disabled via the user's
settings. If the user has
```json
"scrollbar": {
"show": "never"
}
```
in their settings, invisible and interactable scrollbar tracks will be
inserted in the editor if scrollbars would be required, as seen below:
https://github.com/user-attachments/assets/b0d915a9-7a7e-4518-84d8-96d9b15aab12
The bug occurs because we only set the scrollbar contents to be
invisible, which however does not affect the insertion of hitboxes for
the scrollbars.
This PR fixes this behaviour by preventing any scrollbar layouting from
happening when scrollbars are explicitly disabled via the settings:
https://github.com/user-attachments/assets/a3f5725b-aead-4fec-9fd8-e574cf269d45
All existing panels which have configurable scrollbars behave the same
way, see
https://github.com/zed-industries/zed/blob/fb2586a5533aff4e5a4b508e7b397d81dc6b9deb/crates/outline_panel/src/outline_panel.rs#L4362-L4373
for example. Following this check, neither a thumb nor a track is
inserted in any case when scrollbars are never to be shown.
Release Notes:
- Fixed invisible scrollbar tracks being inserted into the editor when
scrollbars are explicitly disabled via settings.
Finn Evers
created
7376c6f
Add support for Gemini 2.5 Pro Experimental model (#27468)
Click to expand commit body
Release Notes:
- Added support for Gemini 2.5 Pro Experimental model to Zed AI.
Co-authored-by: Wilhelm Klopp <wil.klopp@gmail.com>
Michael Sloan
and
Wilhelm Klopp
created
ee08776
markdown_preview: Fix code block highlight and indentation (#27463)
Click to expand commit body
Closes #23218
Before:
<img width="1463" alt="before"
src="https://github.com/user-attachments/assets/4f77a4e0-61b8-4516-91a4-366f73e24760"
/>
After:
<img width="1463" alt="after"
src="https://github.com/user-attachments/assets/61e2c69d-fa6b-4c52-b1eb-ad7a61e274e0"
/>
Release Notes:
- Fixed issue where code block highlight and indentation in markdown
preview was rendered incorrectly.
Smit Barmase
created
30f7e89
Add a way to control go to definition fallback (#27426)
Click to expand commit body
Follow-up of https://github.com/zed-industries/zed/pull/9243 and
https://github.com/zed-industries/zed/pull/16512
Release Notes:
- Added a way to control go to definition fallback
Kirill Bulatov
created
8c8f50d
Pull logic for clamping corner rounding radii out of `Corners::to_pixels` (#27460)
Click to expand commit body
This seems more correct as corners are not necessarily only for rounding
radii.
Also applies clamping after scaling in `paint_quad`, deduplicating that
logic. This also provides a more precise result by doing the clamping
after scaling, avoiding floating point rounding issues (probably a
non-issue).
Release Notes:
- N/A
Michael Sloan
created
76192ea
worktree: Don't open files >= 6GB in size (#27458)
Click to expand commit body
Temporary Workaround For: #27283
This PR can (and should!) be reverted once the underlying inefficiencies
are resolved
Release Notes:
- Files that are 6GB or larger will now not open. This is a temporary
workaround for inefficient handling of large files resulting in
extremely high memory usage, often resulting in system freezing,
requiring a restart of Zed or the entire system.
Ben Kunkle
created
fb2586a
assistant2: Add some padding top to the checkpoint element (#27456)
Click to expand commit body
Most minimal PR ever.
Release Notes:
- N/A
Danilo Leal
created
28e0bb5
ci: Run nix nightly on any mac runners (#27457)
Click to expand commit body
Nix nightly builds can now run on all macOS runners.
Follow-up to: https://github.com/zed-industries/zed/pull/27014
Release Notes:
- N/A
This PR is primarily an implementation of @osiewicz
[comment](https://github.com/zed-industries/zed/pull/19495#pullrequestreview-2488877957)
in an effort to increase maintainability after the horizontal editor
scrollbar was added in #19495 . I also want to build on these changes in
future PRs to adress some other small bugs.
This primarily does the following:
1. Uses `along` wherever possible
2. Fixes the amount of mouse event listeners attached to the editor when
scrollbars are displayed to 2 instead of 2-4 in case both scrollbars are
displayed.
This can be done since only one scrollbar can be dragged by the cursor
at any given time, so the event listeners now account for that. The
state reflecting the scrollbar dragging state was also updated
accordingly.
It does not change any functionality besides the aforementioned event
listener code as well as some minor bugs which where present after
#19495 , namely:
- One missing `cx.stop_propagation()` (see
[here](https://github.com/zed-industries/zed/blob/a8741dc3107a205ba5a28aa8c3e18747ceed2ba3/crates/editor/src/element.rs#L4684)
and
[here](https://github.com/zed-industries/zed/blob/a8741dc3107a205ba5a28aa8c3e18747ceed2ba3/crates/editor/src/element.rs#L4838)
respectively).
- The horizontal scrollbar thumb having a small border on the left side,
which seems to be unintended for the horizontal scrollbar whilst
intended for the vertical one. Since this is a minimal change, I figured
it could be already included in this PR.
This PR admittetly grew quite large over time, however, much of the diff
is just renames to account for the code now working for both axes as
well as moved code. The logic remains (or should at least be)
unaffected. If I should split this into two PRs or remove some of the
changes, please let me know.
Release Notes:
- N/A
Finn Evers
created
1574a3a
python: Add task for running modules (#26462)
Click to expand commit body
Closes #26460
I am new to contributing to Zed (and pretty new to Rust in general). I'm
not too familiar with code style, guidelines etc. so please feel free to
suggest changes/improvements.
This PR adds a run icon to Python files that have a "main" function:
```python
if __name__ == "__main__":
...
```
In addition to the gutter icon, there is now also an extra task in the
command palette "run module".
Release Notes:
- Added detection for runnable Python modules
- Added Python-specific task to run a Python file as a module from
inside the project's scope
---------
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Alex van de Griendt
and
Piotr Osiewicz
created
152432f
title bar: Adjust the onboarding banner component API (#27455)
Click to expand commit body
This PR encapsulates the layout building of the Onboarding Banner
component inside of it, allowing to, at the call site, just pass an
icon, title, and subtitle. The `subtitle` parameter, by default, uses
the `Introducing:` label, which I think will be the one we'll use most
of the time for this specific component.
Release Notes:
- N/A
Danilo Leal
created
5953c61
assistant2: Allow profiles to manage context server tools (#27452)
Click to expand commit body
This PR updates the agent profiles with support for managing context
server tools.
Release Notes:
- N/A
Marshall Bowers
created
aab02a4
Fix color swatch shrinking in the LSP completion menu (#27450)
Click to expand commit body
### Before
Note how in the second time I try to add a color property, the color
swatch is shrunk.
https://github.com/user-attachments/assets/677a37b2-8ae4-408d-8dea-d9cc4bc2e119
### After
https://github.com/user-attachments/assets/aa902573-1f44-48e1-a396-e22ad5703155
Release Notes:
- Fixed color swatches shrinking upon re-adding a color-related
property.
It doesn't make sense to have `Pixels: Mul<Pixels, Output = Pixels>` as
the output should be `Pixels^2` (area), so these impls are removed. All
code where these impls were used are improved by instead multiplying by
`f32` or `usize`.
Also adds math op impls that are present for `Pixels` but absent for
`ScaledPixels`. Adds missing `Mul<Pixels> for usize` to both.
Release Notes:
- N/A
Michael Sloan
created
581d673
Remove `ui` dependency from `assistant_tool` and `context_server` (#27449)
Click to expand commit body
This PR removes the dependency on the `ui` crate from the
`assistant_tool` and `context_server` crates.
These crates were only depending on it for `IconName`, which can now be
depended on from `icons` directly.
Release Notes:
- N/A
Marshall Bowers
created
4a30b96
language_model: Remove dependency on `ui` (#27448)
Click to expand commit body
This PR removes the dependency on the `ui` crate from the
`language_model` crate.
We were only depending on it to import `IconName`—which now lives in
`icons`—and some re-exported GPUI items.
Release Notes:
- N/A
This PR adds a new `icons` crate and moves the `IconName` into it.
We have a number of crates that are taking a dependency on `ui` just so
they can talk about icons, which is not ideal.
Release Notes:
- N/A
Marshall Bowers
created
46e86f0
assistant tools: Add `Tool::icon` method instead of matching on name (#27444)
Click to expand commit body
Release Notes:
- N/A
Agus Zubiaga
created
0339d65
zed: Make inline assist quick action dispatch an action (#27445)
Click to expand commit body
This PR makes the "Inline Assist" quick action in the quick action bar
work by dispatching the `InlineAssist` action.
This fixes an issue where the button was not working with Assistant 2.
Release Notes:
- N/A
Marshall Bowers
created
24d76a6
Reapply #27200 after bad conflict resolution (#27446)
Click to expand commit body
Release Notes:
- N/A
Agus Zubiaga
created
3ba6243
debugger ui: Make variable values muted by default (#27441)
Click to expand commit body
Closes #ISSUE
Release Notes:
- N/A
Piotr Osiewicz
created
31e3c13
Add `.github/copilot-instructions.md` to paths loaded for rules (#27442)
Click to expand commit body
Release Notes:
- N/A
Michael Sloan
created
0fec04a
assistant2: Disable "Add Server" button when the required fields are empty (#27440)
Click to expand commit body
This PR updates the add context server modal to disable the "Add Server"
button when the required fields are not filled out.
Release Notes:
- N/A
Marshall Bowers
created
bf25548
Add find-replace-file tool, use it by default over edit-files-tool (#27438)
Click to expand commit body
@agu-z and paired on trying out a "one tool call per edit" approach for
editing files. (The previous approach is still available, it's just
unchecked by default for now.)
Release Notes:
- N/A
---------
Co-authored-by: Agus <agus@zed.dev>
Richard Feldman
and
Agus
created
cd1e56d
Add support for dashed borders to GPUI (#27139)
Click to expand commit body
Features:
* Scales dash spacing with border width.
* Laying out dashes around rounded corners.
* Varying border widths with rounded corners - now uses an ellipse for the inner edge of the border.
* When there are no rounded corners, each straight border is laid out separately, so that the dashes to meet at the corners.
* All sides of each dash are antialiased.


Release Notes:
- N/A
---------
Co-authored-by: Michael Sloan <michael@zed.dev>
Co-authored-by: Ben <ben@zed.dev>
Nathan Sobo
,
Michael Sloan
, and
Ben
created
2fe2028
debugger: Fix typing in active buffer resulting a jump to an active debug line (#27439)
f9212a0
debugger: Make UI a bit more dense (#27429)
Click to expand commit body
Closes #ISSUE
Release Notes:
- N/A
Piotr Osiewicz
created
954a56c
Update stale issue bot to run on Wednesday (#27437)
Click to expand commit body
Release Notes:
- N/A
Joseph T. Lyons
created
275cecb
assistant2: Add modal for adding context servers (#27434)
Click to expand commit body
This PR adds a modal for adding context servers from the Assistant 2
configuration view:
<img width="1394" alt="Screenshot 2025-03-25 at 12 22 50 PM"
src="https://github.com/user-attachments/assets/52fe194f-7d88-4f3b-aee1-8c6385136e6b"
/>
Release Notes:
- N/A
Marshall Bowers
created
6b7167a
Gracefully handle models searching for empty glob (#27370)
Click to expand commit body
Sometimes we've seen models provide an empty string for the path search
glob. This assumes they meant "*" when that happens.
Separately, this also removes an unnecessary `clone` of a `String`.
Release Notes:
- N/A
Richard Feldman
created
430814c
ci: Hide harmless cargo about error from release output (#27433)
Click to expand commit body
Hide harmless errors like this from CI output.
<img width="834" alt="Screenshot 2025-03-25 at 12 07 36"
src="https://github.com/user-attachments/assets/55450812-000d-49a0-9926-cae0df8aa281"
/>
Release Notes:
- N/A
Closes https://github.com/rzukic/zed-latex/issues/70 where the language
server `texlab` is not used for code formatting when the "cspell"
extension is also installed, because it also provides a language server
for the LaTeX filetype but only for spell checking.
Release Notes:
- Fix conflict between LaTeX and cspell extensions affecting code formatting on save.
- Add instructions in description to read before editing
- Add instructions in edit prefix to explicitly ask for reads
- Fix `connection error: delay between messages too long` by processing
chunks off a channel
Release Notes:
- N/A
Agus Zubiaga
created
2414855
Gracefully handle bad LLM-generated paths in dir tool (#27202)
Click to expand commit body
Release Notes:
- N/A
Co-authored-by: Ben <ben@zed.dev>
Richard Feldman
and
Ben
created
e7f7ed3
assistant2: Add `create-file` and `copy-path` tools to the "Code Writer" profile (#27432)
Click to expand commit body
This PR adds the `create-file` and `copy-path` tools to the "Code
Writer" profile.
Release Notes:
- N/A
Marshall Bowers
created
e273de5
python: Fix incorrect indenting of `except`, `finally`, `else`, and `elif` control flow (#27428)
Click to expand commit body
Closes #10832
Note: This PR only fixes the issue where when entering one of `except`,
`finally`, `else`, and `elif` after another block like so:
```python
try:
for i in range(n):
pass
except:|
```
The `except` would be indented resulting in the following:
```python
try:
for i in range(n):
pass
except:|
```
This PR does not fix a separate issue in which the indentation is not
corrected from the second example to the first, i.e. if example 2 is
typed verbatim in Zed it will not auto-indent to look like example 1.
Handling of this case would likely require specific logic to handle, or
changes to the tree-sitter grammar for Python, as the current grammar
results in ERROR nodes that obscure the natural structure (cannot tie
the `except` to the `try`)
Release Notes:
- Fixed an issue where `except`, `finally`, `else`, and `elif` control
flow keywords in Python would be incorrectly indented when entered at
the correct level of indentation.
Follow-up of
https://github.com/zed-industries/zed/pull/27424/files#r2012188255
Release Notes:
- N/A
Kirill Bulatov
created
ffee218
Use newer cargo-bundle without the build error (#27424)
Click to expand commit body
Fixes Nightly builds for macOS.
Release Notes:
- N/A
Kirill Bulatov
created
d9dcc59
Merge clangd's `inactiveRegions` with existing diagnostics (#26737)
Click to expand commit body
Closes: https://github.com/zed-industries/zed/issues/13089
This PR attempts to resolve the issues discussed in my previous PR
#26146.
Release Notes:
- Fixed: `inactiveRegions` doesn't replace existing diagnostics anymore
Naim A.
created
8f10233
extension: Add support for `additional_workspace_configuration` and `additional_initialization_options` (#27407)
Click to expand commit body
Closes #22410
With this PR extensions can provide additional workspace configuration
for other LSP Adapters. This allows extensions like Astro, Svelte, Vue,
etc to provide plugins for vtsls typescript server, fixing issues like:
https://github.com/zed-industries/zed/issues/4577,
https://github.com/zed-industries/zed/issues/21697,
https://github.com/zed-industries/zed/issues/26901#issuecomment-2737485096
Todo:
- [x] Test case when extension is installed, does vtsls workspace config
refreshes?
Before:
<img width="450" alt="image"
src="https://github.com/user-attachments/assets/f242167c-5264-44ab-b5a7-8c90eb75c6a1"
/>
After:
<img width="450" alt="image"
src="https://github.com/user-attachments/assets/6a5f1afe-a0e1-4f64-8a95-919b0bf97614"
/>
Release Notes:
- N/A
Smit Barmase
created
9468b96
assistant2: Add icon for copy-path tool (#27421)
It turns out that on linux crane's `buildDepsOnly` was working fine, so
I'm re-enabling it and will worry about why it's failing on darwin
later.
This should significantly improve the amount of artifact-reuse for the
linux nix builds, which will hopefully bring build times low enough that
we're ok putting it in CI.
Release Notes:
- N/A
Julia Ryan
created
42f01cc
Set edit predictions to default to the Zed provider (#27394)
Click to expand commit body
Release Notes:
- Changed the default edit prediction provider from Copilot to Zed