Commit log

6a2bad4 Load env vars from login shell in remote server (#40148)

Click to expand commit body
Fixes a bug mentioned in
https://github.com/zed-industries/zed/issues/38891

Release Notes:

- Fixed a bug where environment variables like `NODE_EXTRA_CA_CERTS`
were not loaded from the user's shell initialization scripts in WSL or
SSH remote projects.

Co-authored-by: Cole Miller <cole@zed.dev>

Max Brunsfeld and Cole Miller created

ad4a53c agent: Fix review button not working while not focused in the message editor (#40144)

Click to expand commit body
This PR fixes a bug where the review icon button wouldn't properly open
the review tab if you weren't focused in the agent panel's message
editor. The solution was to register the action also at the workspace
level.

Release Notes:

- agent: Fixed a bug where the review icon button wouldn't work to open
the review tab if focus weren't in the panel's message editor.

Danilo Leal created

160fca0 settings_ui: Move LSP & tool settings from Editor to Language page (#40140)

Click to expand commit body
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...

Ben Kunkle created

6a16488 windows: Detect when `python3` is not usable and notify the user (#40070)

Click to expand commit body
Fixes #39998

Debugpy and pylsp are installed in a Zed-global venv with pip. We need a
Python interpreter to create this venv when it doesn't exist and one of
these tools needs to be installed, and sometimes we attempt to use
`python3` from `$PATH`. This can cause issues on Windows, where out of
the box `python3` is a sort of shim that opens the Microsoft Store app.

This PR changes the debugpy installation path to create the Zed-global
venv using the Python interpreter from a venv in the project, and only
use python3 from `$PATH` if that fails. That matches how pylsp
installation already works. It also tightens up how we search for a
global Python installation by doing a basic sanity check (`python3 -c
'print(1 + 2)`) before accepting it, which should catch the Windows
shim.

Release Notes:

- windows: improved the behavior of Zed in situations where no global
Python installation exists.

Cole Miller created

f0d097c settings_ui: Implement reset to default button (#40135)

Click to expand commit body
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...

Ben Kunkle created

a3bcf6f windows: Fix shader rotation order for pattern rendering (#39993)

Click to expand commit body
old

<img width="1076" height="1008" alt="image"
src="https://github.com/user-attachments/assets/e1cd8238-e869-4abb-98b4-4790467c59d1"
/>


new

<img width="989" height="1004" alt="image"
src="https://github.com/user-attachments/assets/42b7fd59-0038-4490-82a7-979983da5416"
/>


Release Notes:

- N/A

0x2CA created

ac8e2f0 Add `.ZedSans` as a possible fallback font (#40129)

Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/40121

Release Notes:

- Fixes a bug where users couldn't return the UI font family to the
default value through the UI.

Danilo Leal created

5c4649b workspace: Fix auto-reveal-in-project-panel for Images, Notebooks and.. Terminals? (#40128)

Click to expand commit body
This regressed in #39199

Release Notes:

- Fixed image files not getting auto-revealed in project panel.

Piotr Osiewicz created

bd13c90 settings_ui: Dynamic languages list (#40123)

Click to expand commit body
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...

Ben Kunkle created

997f6c6 settings: Make "auto" and "language_server" valid format steps (#40113)

Click to expand commit body
Follow up for: #39983 and
https://github.com/zed-industries/zed/pull/40040#issuecomment-3393902691

Previously it was possible to have formatting done using prettier or
language server using `"formatter": "auto"` and specify code actions to
apply on format using the `"code_actions_on_format"` setting. However,
post #39983 this is no longer possible due to the removal of the
`"code_actions_on_format"` setting. To rectify this regression, this PR
makes it so that the `"auto"` and `"language_server"` strings that were
previously only allowed as top level values on the `"formatter"` key,
are now allowed as format steps like so:
```json
{
      "formatter": ["auto", "language_server"]
}
```

Therefore to replicate the previous behavior using `"auto"` and
`"code_actions_on_format"` you can use the following configuration:

```json
{
      "formatter": [{"code_action": ...}, "auto"]
}
```

Release Notes:

- N/A *or* Added/Fixed/Improved ...

Ben Kunkle created

8dfbafd Fix inconsistent font size in toolbar code actions (#40120)

Click to expand commit body
Release Notes:

- N/A

<img width="695" height="254" alt="before"
src="https://github.com/user-attachments/assets/7b180fb8-a6d3-409a-a0ee-1def447e8235"
/>
<img width="695" height="254" alt="after"
src="https://github.com/user-attachments/assets/3a035be0-3b74-433b-b0e7-5766b67bfcc1"
/>

Abdelhakim Qbaich created

677d6ac Use `DwmFlush` unconditionally for Windows vsync (#39913)

Click to expand commit body
Closes #36934

I'm still experiencing bugs with the
`DCompositionWaitForCompositorClock` API. Let's back out the support for
now until the fixes are identified and widely available.

`DwmFlush` does various things that aren't just waiting for VSync, so
it's not ideal, but it's not bad enough that it's worth a bigger
refactor right now.

Release Notes:

- N/A

John Tur created

96add6c remote: Check if remote can --exec, fall back to spawning shell otherwise (#40112)

Click to expand commit body
Bonus: fix passing env vars to the proxy server in WSL setting.

Closes #39710
Supersedes #39893

Release Notes:

- N/A

Jakub Konka created

f76eecd terminal: Bump sysinfo crate (#39681)

Click to expand commit body
Release Notes:

- N/A *or* Added/Fixed/Improved ...

Co-authored-by: dino <dinojoaocosta@gmail.com>

Lukas Wirth and dino created

bec2bfe acp: Clear message editor after running /login (#40116)

Click to expand commit body
Release Notes:

- N/A

Bennet Fenner created

9edf1f8 Add a comment about the use of `shell_kind` in terminal.rs (#40114)

Click to expand commit body
Release Notes:

- N/A

Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>

Cole Miller and Jakub Konka created

23fe74e acp: Fix slash command hint showing up after sending message (#40109)

Click to expand commit body
Release Notes:

- N/A

Bennet Fenner created

46fff99 remove_server: Add function to delete wsl project (#40105)

Click to expand commit body
As title say, could delete wsl project in `open remote` delegate.

Release Notes:

- Added ability to delete wsl projects from remote picker

CharlesChen0823 created

e7b19ab settings_ui: Add some AI settings (#40111)

Click to expand commit body
There's a lot of AI settings that will require custom UI for them to be
part of the settings window, but many don't (simple booleans and
dropdown) and can be moved right away. In consequence, the whole
"General Settings" section in the agent panel's settings view can be
removed given all of those items are now part of the settings window.

Release Notes:

- N/A

Danilo Leal created

ce8d5e4 settings_ui: Make arrow keys up and down activate page content (#40106)

Click to expand commit body
Release Notes:

- settings ui: Navigating the settings navbar with arrow keys up and
down now also activates the page, allowing users to more quickly see the
content for a given page before moving focus to the page itself.

Danilo Leal created

dac5725 windows: Fix semantic merge conflict with `ShellKind::new` (#40107)

Click to expand commit body
Release Notes:

- N/A

Cole Miller created

f1db1f3 windows: Fix ascent/descent calculations (#40103)

Click to expand commit body
This applies the same fix as #39886 for Windows.

Previously we were using `GetLineMetrics` to determine the ascent and
descent values for each line. It seems like this has the same behavior
as `GetTypographicBounds` on macOS, which is to return the minimum
ascent and descent for the current state of the `TextLayout` object.
This causes the ascent/descent to be unstable when adding or removing an
emoji because a font fallback is triggered when an emoji is present on
the line.

The issue is fixed by switching to `font.GetMetrics` to get the ascent
and descent, which should always return stable values for the main font,
instead of changing when there's a fallback. This also should support
situations where we have multiple explicit fonts on the same line,
although that probably can't be triggered in Zed right now.

Release Notes:

- windows: Fixed a vertical shift in text layout when inserting or
removing an emoji.

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>

Cole Miller and Bennet Bo Fenner created

02bdba8 util: Fix shell kind in windows based on program path (#39696)

Click to expand commit body
Closes #39614

The `ShellKind` struct is built on Windows' side, meaning that when
connecting to remotes, we fall back to PowerShell construction, even if
the shell program we are spawning is a unix program.

This broke tasks creation since we are using the shell kind to construct
args:


https://github.com/zed-industries/zed/blob/d04ac864b8cb78ee888ce03323e34c17a6dd16b9/crates/project/src/terminals.rs#L149

In normal terminals this only affected activation scripts (only place
where shell kind is used)

I don't have a Windows machine to test it, so I would appreciate any
help with testing!

Release Notes:

- Fixed an issue where tasks could not be executed in Windows WSL

---------

Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>

Marco Mihai Condrache created

af0cd30 editor: Fix `delete line` moving the cursor too far (#40102)

Click to expand commit body
Release Notes:

- N/A *or* Added/Fixed/Improved ...

Lukas Wirth created

3ea4b30 gpui: Do not render ligatures between different styled text runs (#39928)

Click to expand commit body
This relands https://github.com/zed-industries/zed/pull/37175 as
https://github.com/zed-industries/zed/pull/39886 fixed the jiggling
issue.

Currently when we render text with differing styles adjacently we might
form a ligature between the text, causing the ligature forming
characters to take on one of the two styles. This can especially become
confusing when a ligature is formed between actual text and inlay hints.

Annoyingly, the only ways to prevent this with core text is to either
render each run separately, or to insert a zero-width non-joiner to
force core text to break the ligatures apart, as it otherwise will merge
subsequent font runs of the same fonts.

We currently do layouting on a per line basis and it is unlikely we want
to change that as it would incur a lot of complexity and annoyances to
merge things back into a line, so this goes with the other approach of
inserting ZWNJ characters instead.

Note that neither linux nor windows seem to currently render ligatures,
so this only concerns macOS rendering at the moment.

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

Release Notes:

- Fixed ligatures forming between real text and inlay hints on macOS

Lukas Wirth created

fdf801d acp: Add tooltips for auth methods with descriptions when available (#40098)

Click to expand commit body
Release Notes:

- acp: Provide auth method descriptions in the UI when available

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>

Ben Brandt and Bennet Bo Fenner created

ff50f48 lsp: Handle dynamic registration of workspace diagnostic capabilities (#40095)

Click to expand commit body
Workspace diagnostics in Zed have a dedicated background task that
handles querying the language server based on workspace diagnostics
refresh requests issued by both Zed and language server itself.
We only spawned that task when language server declared support for
workspace diagnostics on boot-up. This made workspace diagnostics
unavailable
when a language server (say, Ty) declared support via a capability
registration.
Originally reported in
https://github.com/zed-industries/zed/issues/39144#issuecomment-3370320004

Release Notes:

- python: Fixed workspace diagnostics not working with Ty.

Piotr Osiewicz created

af52cba settings_ui: Fix garbage value for terminal font size (#40093)

Click to expand commit body
Closes #40086

Release Notes:

- Fixed garbage value shown for terminal font size in the settings UI
when no font size is defined in `settings.json`.

Smit Barmase created

785cb41 gpui: Make image auto sizing work with Rems too (#40089)

Click to expand commit body
Closes #39981

Here both images of the left should be identical to the right, since
180px is the same as 11.25rem.

Before:

<img width="1457" height="847" alt="image"
src="https://github.com/user-attachments/assets/59f571d1-8d66-4f41-b9b0-e9826110cf0c"
/>

After:

<img width="1457" height="626" alt="image"
src="https://github.com/user-attachments/assets/a0c629a9-5916-453a-85a2-b3053ab2e613"
/>

Release Notes:

- N/A

Smit Barmase created

ce20e71 theme_selector: Fix mouse clicks not updating the theme properly (#40090)

Click to expand commit body
Closes https://github.com/zed-industries/zed/issues/40080

Follow-up to https://github.com/zed-industries/zed/pull/39720

We were already doing this for icon themes, but not for normal themes. 

Issue here is that we would only update the `cx.theme()` on the next
frame. On mouse confirmation, we would override the theme and confirm it
on the same frame, yet the global would only be peropely updated on the
next frame and then instantly reset to the new settings file, which
would again be the old theme. This caused a flicker and the selection to
not persist.. Keyboard interactions worked still, because there would be
a rendered frame inbetween selection and confirmation.

Release Notes:

- N/A

Finn Evers created

237474a Fix worktree ordering with `PathList` (#39944)

Click to expand commit body
The recent introduction of PathList removed some of the ordering logic
resulting in paths always being alphabetised.

This change restores the previous logic for sorting worktrees in a
project using the newer PathList type.

Closes #39934

Release Notes:

- Fixed manual worktree reordering

<details>

<summary>Screen recording of it retaining the order</summary>


https://github.com/user-attachments/assets/0197d118-6ea7-4d2d-8fec-c917fcb9d277

</details>

---------

Co-authored-by: MrSubidubi <finn@zed.dev>

Elliot Thomas and MrSubidubi created

f6630ed docs: Add Mesa GPU selection and XWayland fallback instructions (#39930)

Click to expand commit body
Related #35948

Should document it.. re:
- Added documentation for Mesa GPU device selection using environment
variables
- Added instructions for XWayland fallback when using Wayland


Release Notes:

- N/A

---------

Co-authored-by: Finn Evers <finn.evers@outlook.de>

William Fleurant and Finn Evers created

81cd435 Improve loading times for extension themes (#40015)

Click to expand commit body
This PR primarily does two things:
- replace `serde_json::from_reader` with `serde_json::from_slice`, as
the latter is much much faster, even with loading the file into memory
first.
- runs the initial loading of themes and icon themes coming from
extensions in parallel instead of sequential.

Measuring the `eager_load_active_theme_and_icon_theme` method, this
drastically improves the speed at which this happens (tested this method
primarily with debug builds on my MacBook Pro, but the `Before`
measurement was also confirmed against a `release-fast` build):
- Before: ~260ms on average (in one run, it even took 600ms)
- After: ~20ms on average

Which reduces the time this method takes to load these by around ~92%.

Given that we block on this during the initial app startup, this should
drastically improve Zeds initial startup loading time. Yet, it also
improves responsiveness when installing theme extensions and trying
these.

I also replaced all other `serde_json::from_reader` implementations with
`serde_json::from_slice` and added the former to `disallowed_methods`,
given
https://github.com/serde-rs/json/issues/160#issuecomment-253446892.

Release Notes:

- Improved Zed startup speed when using themes provided by extensions

Finn Evers created

47a66c9 editor: Optimize selection overlap checking with binary search (#39773)

Click to expand commit body
Replace O(n²) linear search with O(log n) binary search for checking
selection overlaps when finding next selection range. Pre-sort selection
ranges and use binary search to significantly improve performance when
working with many selections.

Release Notes:

- N/A

---------

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>

Xiaobo Liu created

1ca2f98 Improve logging of extension manifest parsing errors (#40082)

Click to expand commit body
Due to using anyhow here, we otherwise lose the relevant error and just
surface a fairly useless error message.

Intentionally not doing this for `extension.json` parsing since that is
deprecated.

Release Notes:

- N/A

Finn Evers created

52cc71e image_viewer: Make preview background checkered cover only the image size (#40078)

Click to expand commit body
This makes it easier to see the image bounds for images with transparent
backgrounds.

<img width="2560" height="1377" alt="png"
src="https://github.com/user-attachments/assets/e1555576-39a2-4240-b9d3-67574df76f0d"
/>

Release Notes:

- Updated image preview background checkboxes to match the actual image
size, making it easier to see the bounds of images with transparent
backgrounds.

Smit Barmase created

7a8a328 editor: Preserve the selection granularity when extending a selection (#39759)

Click to expand commit body
Currently when extending a selection using shift-click, the selection
granularity (or `SelectMode`) is based on the click count when extending
the selection, not on the click count of the initial selection. For
example, selecting a word with double-click followed by shift-click uses
a character granularity:


https://github.com/user-attachments/assets/13c78bb9-9c31-45d4-97de-99c30c7425a7

This PR changes this behavior to be more in line with other editors that
I'm familiar with by preserving the granularity of the initial selection
(unless the extension has a higher click count, i.e. the behavior of a
single click selection by a shift-double-click extension is unchanged):


https://github.com/user-attachments/assets/92e69e95-7ea2-4f76-b0a4-e4b9efa1947b

Release Notes:

- Extending a selection using shift-click now preserves the
character/word/line granularity of the initial selection

---------

Co-authored-by: Lukas Wirth <lukas@zed.dev>

Tim Vermeulen and Lukas Wirth created

eeaf0b5 docs: Update basedpyright section (#40079)

Click to expand commit body
Follows up the report #39794

Release Notes:

- N/A

Finn Evers created

95780e5 typescript: Runners support for `bun:test` & `node:test` (#39238)

Click to expand commit body
Closes #21132

Release Notes:

- JavaScript/TypeScript: Added support for detecting `node:test` and `bun:test` test runners

versecafe created

92e765b windows: Add support for fetching shell environment in remote projects (#39831)

Click to expand commit body
Closes #39216

Note that this affects all platforms, I'm just using the prefix to make
auto-cherry-picking easier.

Release Notes:

- Fixed shell commands run by agents failing to find installed programs
in some cases.

Cole Miller created

abc1e67 Make `ZED_BUILD_REMOTE_SERVER` opt-out for dev builds (#39653)

Click to expand commit body
Also removes the option to build with cross.

Release Notes:

- N/A

Cole Miller created

68bda24 Allow viewing DAP logs in remote projects (#39744)

Click to expand commit body
It looks like a `.is_local()` check got left in from the original
debugger implementation. I was able to view remote logs just fine after
removing it.

Release Notes:

- Fixed DAP logs being unviewable on remote projects.

Ryan Hawkins created

3f3d894 lsp colors: Reduce flickering while typing (#40055)

Click to expand commit body
Closes #40019

Follow-up https://github.com/zed-industries/zed/pull/40025

This PR reduces/removes the flickering of inlay colors. This is done by
adding a debounce, and not detaching the task that fetches the new
colors.

**Result**


https://github.com/user-attachments/assets/5dae278b-b821-4e64-8adb-c4d8376ba1df

Release Notes:

- Lsp colors: Reduce flickering while typing.

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>

Remco Smits and Kirill Bulatov created

83f0a36 editor: Fix behavior of clickable line numbers navigation in multibuffer (#39447)

Click to expand commit body
Repro:
- Open a multibuffer
- Click on a line number to jump to the corresponding file
- Click the back button
- Click the forward button, nothing happens
- Click the forward button again, now it works

Double clicking the code to jump to the file (with
`"double_click_in_multibuffer": "open"`) doesn't exhibit this bug, so I
just changed the logic when clicking on a line number in a multibuffer
to match that behavior.


https://github.com/user-attachments/assets/31c0d64d-fdb8-44d6-b0f3-a337ca53de30

Release Notes:

- Fixed bug that could cause navigation to break when clicking on a line
number in a multibuffer

Tim Vermeulen created

bbb6783 windows: Get more tests passing (#39984)

Click to expand commit body
Still got one more test in `project_tests.rs` to investigate...

Release Notes:

- N/A

---------

Co-authored-by: John Tur <john-tur@outlook.com>

Jakub Konka and John Tur created

998fece project_panel: Add ability to hide hidden files (#39843)

Click to expand commit body
Closes #5185

Release Notes:

- Added an option to hide hidden files in the project panel by setting
`hide_hidden` in the project panel settings.

---------

Co-authored-by: Gaauwe Rombouts <gromdroid@gmail.com>
Co-authored-by: Gaauwe Rombouts <mail@grombouts.nl>

Smit Barmase , Gaauwe Rombouts , and Gaauwe Rombouts created

abe1fd5 docs: Validate JSON snippets (settings, keymap, tasks, etc) (#40043)

Click to expand commit body
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...

Ben Kunkle created

deef58b docs: Remove/fix mentions of `code_actions_on_format` post #39983 (#40040)

Click to expand commit body
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...

Ben Kunkle created

e11e39f settings ui: Rearrange sections (#39978)

Click to expand commit body
Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...

Katie Geer created

6dc3e64 onboarding: Add some UI improvements (#40016)

Click to expand commit body
Includes improvements in button padding, ways we space elements out,
more consistent use of some components, and cleaning up redundant
buttons styles. Pretty much nothing changes in the design, though.

Release Notes:

- N/A

Danilo Leal created