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>
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
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
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
Closes #39974
Since the thumb hitboxes themselves do not propagate events, we need to
paint the normal parent hitbox on top of the other ones. This also
caused hover detection to fail, which caused the issue linked.
Release Notes:
- Fixed an issue where hovering scrollbars in hovers would dismiss
these.
Finn Evers
created
74d92fd
ruby: Rename `HTML/ERB` to `HTML+ERB` (#40000)
Click to expand commit body
Hi! In https://github.com/zed-extensions/ruby/issues/162 we renamed
embedded template languages:
- `HTML/ERB` to `HTML+ERB`
- `YAML/ERB` to `YAML+ERB`
- `JS/ERB` to `JS+ERB`
This pull request updates the Ruby extension documentation to reflect
that change. Thanks!
Release Notes:
- N/A
Deals with https://github.com/zed-industries/zed/security/dependabot/68
security warning
Release Notes:
- N/A
Kirill Bulatov
created
89bb2de
docs: Fix link/reference in CSS language doc (#39952)
Click to expand commit body
Looking at
https://github.com/zed-industries/zed/blob/5698636c92d015738843ad1ce982b887a236110a/crates/languages/src/css.rs#L19
it appears that the vscode-css-languageservice is used so I think this
was a typo.
Release Notes:
- N/A
Ned Zimmerman
created
3d4d8ef
Remove unnecessary clone from `Rope::append` (#39960)
Click to expand commit body
The previous code clones all the rope chunks, but the rope is passed by
value so the chunks are about to be dropped anyhow.
I thought this may slightly help performance but it has no very
noticeable effect, with a mix of small changes up and down probably
attributable to noise on my machine?
I wonder if the benchmarks might just not hit this path well? I'm
looking into that separately (see #39949, #39951), but this seemed clear
enough to be worth proposing by itself.
Incidentally it surprised me this did not generate a warning already,
but I think it's because we're taking only one field from the struct
that's about to be dropped:
https://github.com/rust-lang/rust-clippy/issues/7429.
<details>
```
Running benches/rope_benchmark.rs (target/release/deps/rope_benchmark-4c5c71666e7c1729)
push/4096 time: [362.58 µs 366.40 µs 370.69 µs]
thrpt: [10.538 MiB/s 10.661 MiB/s 10.773 MiB/s]
change:
time: [+0.0646% +1.2362% +2.4681%] (p = 0.04 < 0.05)
thrpt: [-2.4086% -1.2211% -0.0646%]
Change within noise threshold.
Found 10 outliers among 100 measurements (10.00%)
7 (7.00%) high mild
3 (3.00%) high severe
Benchmarking push/65536: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 8.4s, enable flat sampling, or reduce sample count to 50.
push/65536 time: [1.6185 ms 1.6353 ms 1.6557 ms]
thrpt: [37.747 MiB/s 38.219 MiB/s 38.616 MiB/s]
change:
time: [+1.9135% +2.9548% +3.9838%] (p = 0.00 < 0.05)
thrpt: [-3.8312% -2.8700% -1.8776%]
Performance has regressed.
Found 6 outliers among 100 measurements (6.00%)
5 (5.00%) high mild
1 (1.00%) high severe
append/4096 time: [1.1052 µs 1.1104 µs 1.1162 µs]
thrpt: [3.4177 GiB/s 3.4354 GiB/s 3.4516 GiB/s]
change:
time: [-2.5075% -0.3430% +1.5095%] (p = 0.76 > 0.05)
thrpt: [-1.4871% +0.3441% +2.5720%]
No change in performance detected.
Found 8 outliers among 100 measurements (8.00%)
7 (7.00%) high mild
1 (1.00%) high severe
append/65536 time: [12.404 µs 12.444 µs 12.487 µs]
thrpt: [4.8881 GiB/s 4.9049 GiB/s 4.9204 GiB/s]
change:
time: [-0.1408% +0.5573% +1.2016%] (p = 0.10 > 0.05)
thrpt: [-1.1874% -0.5542% +0.1410%]
No change in performance detected.
Found 5 outliers among 100 measurements (5.00%)
2 (2.00%) high mild
3 (3.00%) high severe
slice/4096 time: [32.963 µs 33.185 µs 33.466 µs]
thrpt: [116.72 MiB/s 117.71 MiB/s 118.51 MiB/s]
change:
time: [-6.4303% -5.1234% -3.6394%] (p = 0.00 < 0.05)
thrpt: [+3.7769% +5.4000% +6.8722%]
Performance has improved.
Found 2 outliers among 100 measurements (2.00%)
1 (1.00%) high mild
1 (1.00%) high severe
slice/65536 time: [668.67 µs 670.49 µs 672.65 µs]
thrpt: [92.916 MiB/s 93.215 MiB/s 93.469 MiB/s]
change:
time: [+0.0846% +0.5573% +1.0199%] (p = 0.02 < 0.05)
thrpt: [-1.0096% -0.5542% -0.0845%]
Change within noise threshold.
Found 10 outliers among 100 measurements (10.00%)
6 (6.00%) high mild
4 (4.00%) high severe
bytes_in_range/4096 time: [5.1513 µs 5.1594 µs 5.1674 µs]
thrpt: [755.95 MiB/s 757.12 MiB/s 758.31 MiB/s]
change:
time: [-4.9410% -4.2051% -3.3835%] (p = 0.00 < 0.05)
thrpt: [+3.5020% +4.3897% +5.1978%]
Performance has improved.
Found 4 outliers among 100 measurements (4.00%)
1 (1.00%) low mild
3 (3.00%) high severe
bytes_in_range/65536 time: [139.87 µs 140.17 µs 140.55 µs]
thrpt: [444.67 MiB/s 445.89 MiB/s 446.85 MiB/s]
change:
time: [-0.6267% -0.0474% +0.4635%] (p = 0.87 > 0.05)
thrpt: [-0.4614% +0.0475% +0.6306%]
No change in performance detected.
Found 9 outliers among 100 measurements (9.00%)
7 (7.00%) high mild
2 (2.00%) high severe
chars/4096 time: [1.0243 µs 1.0250 µs 1.0257 µs]
thrpt: [3.7190 GiB/s 3.7217 GiB/s 3.7243 GiB/s]
change:
time: [+4.0106% +4.5396% +5.3062%] (p = 0.00 < 0.05)
thrpt: [-5.0388% -4.3425% -3.8559%]
Performance has regressed.
Found 10 outliers among 100 measurements (10.00%)
2 (2.00%) high mild
8 (8.00%) high severe
chars/65536 time: [17.540 µs 17.576 µs 17.614 µs]
thrpt: [3.4652 GiB/s 3.4727 GiB/s 3.4797 GiB/s]
change:
time: [+2.5201% +3.3922% +4.1639%] (p = 0.00 < 0.05)
thrpt: [-3.9974% -3.2809% -2.4581%]
Performance has regressed.
Found 7 outliers among 100 measurements (7.00%)
4 (4.00%) high mild
3 (3.00%) high severe
clip_point/4096 time: [58.857 µs 59.162 µs 59.490 µs]
thrpt: [65.662 MiB/s 66.026 MiB/s 66.368 MiB/s]
change:
time: [+1.6900% +2.8088% +3.8521%] (p = 0.00 < 0.05)
thrpt: [-3.7092% -2.7321% -1.6619%]
Performance has regressed.
Found 3 outliers among 100 measurements (3.00%)
3 (3.00%) high mild
clip_point/65536 time: [1.8609 ms 1.8633 ms 1.8660 ms]
thrpt: [33.494 MiB/s 33.543 MiB/s 33.585 MiB/s]
change:
time: [+0.0577% +0.2579% +0.4495%] (p = 0.01 < 0.05)
thrpt: [-0.4474% -0.2572% -0.0577%]
Change within noise threshold.
Found 5 outliers among 100 measurements (5.00%)
3 (3.00%) high mild
2 (2.00%) high severe
point_to_offset/4096 time: [19.246 µs 19.287 µs 19.331 µs]
thrpt: [202.07 MiB/s 202.54 MiB/s 202.97 MiB/s]
change:
time: [+1.1073% +2.9754% +5.3818%] (p = 0.00 < 0.05)
thrpt: [-5.1069% -2.8894% -1.0951%]
Performance has regressed.
Found 13 outliers among 100 measurements (13.00%)
5 (5.00%) high mild
8 (8.00%) high severe
Benchmarking point_to_offset/65536: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 6.6s, enable flat sampling, or reduce sample count to 60.
point_to_offset/65536 time: [741.87 µs 743.28 µs 744.74 µs]
thrpt: [83.922 MiB/s 84.086 MiB/s 84.247 MiB/s]
change:
time: [+5.0577% +5.6751% +6.3133%] (p = 0.00 < 0.05)
thrpt: [-5.9384% -5.3703% -4.8142%]
Performance has regressed.
Found 7 outliers among 100 measurements (7.00%)
4 (4.00%) high mild
3 (3.00%) high severe
cursor/4096 time: [27.407 µs 27.483 µs 27.600 µs]
thrpt: [141.53 MiB/s 142.13 MiB/s 142.53 MiB/s]
change:
time: [-7.1479% -6.2928% -5.6378%] (p = 0.00 < 0.05)
thrpt: [+5.9747% +6.7154% +7.6981%]
Performance has improved.
Found 9 outliers among 100 measurements (9.00%)
1 (1.00%) high mild
8 (8.00%) high severe
cursor/65536 time: [848.91 µs 849.70 µs 850.59 µs]
thrpt: [73.478 MiB/s 73.555 MiB/s 73.624 MiB/s]
change:
time: [+0.0281% +0.3487% +0.6686%] (p = 0.04 < 0.05)
thrpt: [-0.6642% -0.3475% -0.0281%]
Change within noise threshold.
Found 9 outliers among 100 measurements (9.00%)
5 (5.00%) high mild
4 (4.00%) high severe
```
</details>
Release Notes:
- N/A
Martin Pool
created
42365df
settings_ui: Fix content page title (#39987)
Click to expand commit body
Follow up to https://github.com/zed-industries/zed/pull/39979. The
previous PR made it the title would change even if you were on a
non-root tree view item. This PR fixes that by fixating the title to
show only the root tree view item.
Release Notes:
- N/A
Closes #ISSUE
Annotated our `default.json` with `$schema` to get diagnostics, then
fixed the non-language not installed warnings.
Release Notes:
- N/A *or* Added/Fixed/Improved ...
Ben Kunkle
created
3ba4b84
Deprecate code actions on format setting (#39983)
Click to expand commit body
Closes #ISSUE
Release Notes:
- settings: Deprecated `code_actions_on_format` in favor of specifying
code actions to run on format inline in the `formatter` array.
Previously, you would configure code actions to run on format like this:
```json
{
"code_actions_on_format": {
"source.organizeImports": true,
"source.fixAll.eslint": true
}
}
```
This has been migrated to the new format:
```json
{
"formatter": [
{
"code_action": "source.organizeImports"
},
{
"code_action": "source.fixAll.eslint"
}
]
}
```
This change will be automatically migrated for you. If you had an
existing `formatter` setting, the code actions are prepended to your
formatter array (matching the existing behavior). This migration applies
to both global settings and language-specific settings
Ben Kunkle
created
f7e7a30
settings_ui: Expand nav entries by default when searching (#39980)
65a38a2
auto_update: Improve error message when `rsync` was not found (#39791)
Click to expand commit body
Reworded the error message when the `rsync` utility could not be found.
Release Notes:
- N/A
warrenjokinen
created
d6becab
gpui: Fix broken rendering with nested opacity (#35407)
Click to expand commit body
Rendering breaks when both an element and its parent have opacity set.
The following code reproduces the issue:
```rust
struct Repro;
impl Render for Repro {
fn render(&mut self, _window: &mut Window, _cx: &mut Context<Self>) -> impl IntoElement {
fn make_box(bg: impl Into<Fill>) -> impl IntoElement {
div().size_8().bg(bg).hover(|style| style.opacity(0.5))
}
div()
.flex()
.items_center()
.justify_center()
.size(px(500.0))
.hover(|style| style.opacity(0.5))
.child(make_box(gpui::red()))
.child(make_box(gpui::green()))
.child(make_box(gpui::blue()))
}
}
```
Before (broken behavior):
https://github.com/user-attachments/assets/2c5c1e31-88b2-4f39-81f8-40060e3fe958
The child element resets its parent and siblings' opacity, which is an
unexpected behavior.
After (fixed behavior):
https://github.com/user-attachments/assets/48527033-b06f-4737-b6c3-0ee3d133f138
Release Notes:
- Fixed an issue where nested opacity is rendered incorrectly.
Cyandev
created
924e7e6
settings_ui: Add page title label (#39979)
Click to expand commit body
Release Notes:
- N/A
Danilo Leal
created
18405de
Rename settings and keymap actions (#39970)
Click to expand commit body
This PR renames the following actions to make it easier and prioritize
the UI version of interacting with them:
| Before | After |
|--------|--------|
| `OpenSettingsEditor` | `OpenSettings` |
| `OpenSettings` | `OpenSettingsFile` |
| `OpenKeymapEditor` | `OpenKeymap` |
| `OpenKeymap` | `OpenKeymapFile` |
Release Notes:
- Rename actions to open settings (UI/window and JSON file) as well as
to open the keymap (editor tab and JSON file).
63032f6
Fix redirect stdin command for fish shell (#39963)
Click to expand commit body
This fixes an issue introduced via
[v0.208.0-pre](https://github.com/zed-industries/zed/releases/tag/v0.208.0-pre)
and reported via
https://github.com/zed-industries/zed/issues/34530#issuecomment-3386042577
where, when using fish shell as the default shell and using a Claude
Code thread in Zed, all command were failing because `(command)` in fish
is for command substitution. Using it creates this type of error:
```
fish: command substitutions not allowed in command position. Try var=(your-cmd) $var ...
(npm ci) </dev/null
^~~~~~~~~~~~^
```
or in the editor itself:
<img width="1624" height="1060" alt="image"
src="https://github.com/user-attachments/assets/64fc3126-2cdd-450e-bc85-ef91c56b3705"
/>
Using the appropriate syntax to redirect to stdin for fish fixes the
issue.
Release Notes:
- Fixed redirect stdin command for fish shell
Kevin Rambaud
created
5f857ff
Fix menu navigation in remote projects modal (#39965)
Click to expand commit body
Previously we were always adding a `Navigable` entry for the "new WSL
connection" option in this modal, even though we don't have the
corresponding button on non-Windows. This was causing `menu::SelectNext`
to behave incorrectly (focusing the center pane instead) when `Connect
New Server` was selected on macOS and Linux.
Release Notes:
- Fixed a bug with keyboard navigation in the remote project modal.
Closes #39263
Release Notes:
- N/A
from
https://github.com/zed-industries/zed/issues/39263#issuecomment-3358220988
>
> > If you replace that code with
> >
> > let adapter: IDXGIAdapter1 = unsafe {
> > dxgi_factory.EnumAdapters(adapter_index)
> > }?.cast()?;
> >
> > does it not select the right GPU?
>
> @reflectronic That does seem to select the active gpu for me, meaning
whichever GPU is currently connected. This is a much simpler solution
than the one I have here
(https://github.com/zed-industries/zed/pull/39264 - updated) and while
I'm sure I could imagine someone wanting to choose their GPU to render
Zed on, that may not be something that the application really needs to
support.
>
> I have a branch with just this as the only change that I can push to
that PR if the simpler solution is preferred.
>
> ```rust
> let adapter: IDXGIAdapter1 = unsafe {
> dxgi_factory.EnumAdapters(adapter_index)?.cast()?
> };
> ```
Gathering LSP declarations in zeta_cli can take a really long time for
big repos and has to be started from scratch if interrupted.
Instead of writing the cache file once we have walked the whole
worktree, we'll now do so incrementally as we complete each file. On
subsequent runs, we'll load as many valid declarations as has been
previously written to the cache, and then continue to request the rest
from the LSP which will append to the existing file as it makes
progress. If the last cache entry is incomplete, we'll truncate the
cache file to the end of the last valid line and continue from there, so
we can just `ctrl-c` without breaking resumability.
Release Notes:
- N/A
Agus Zubiaga
created
41ee92e
agent_ui: Improve quote selections to consider message being edited (#39947)
Click to expand commit body
- Update `AcpThreadView.insert_selections` to take into account whether
the user is currently editing an existing message and, if it is, insert
the selection into that message instead of the thread's message editor
- Update Window's default keymap to use the `agent::QuoteSelection`
action instead of the deprecated `assistant::QuoteSelection` action
- Introduce `AcpThreadView.active_editor` to allow callers to retrieve
either the thread view's message editor or the editor for the message
being edited, in case `AcpThreadView.editing_message` is not `None`
- Improve `AcpThreadView.focus_handle` to focus on the message being
currently edited in case the user navigates back to the editor and then
to the thread view again, all while editing a message
- Add tests for `AcpThreadView.insert_selections`, ensuring that the
selection is inserted in the message being currently edited, if a
message is being edited, or the thread view's message editor if no
message is being edited
Closes #39693
Release Notes:
- Improved `agent: quote selection` to also work for a message that was
already sent but is being edited
---------
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
The feedback modal did not match our keyboard-driven design. We can
revisit this later if we want, but for now, removing it makes sense. All
actions have been inlined in the `Help` menu to maintain
discoverability.
Additionally, not all feedback-based actions in the command palette were
namespaced under `feedback:`, and now they are, so they can all be found
there easily.
Release Notes:
- Notice: The `Give Feedback` modal has been removed. The options to
file bug reports, feature requests, email us, and open the Zed
repository can now be found within the `Help` menu directly. The command
palette actions have undergone the following changes:
- `feedback: give feedback` (removed)
- `feedback: file bug report` (no change)
- `zed: request feature` → `feedback: request feature`
- `zed: email zed` → `feedback: email zed`
- `zed: open zed repo` → `contribute: open zed repo`
Joseph T. Lyons
created
5698636
Change windows asset name to match other platforms (#39936)
localcc
created
bbd7359
Fix settings window on Linux/Windows being immovable (#39939)
localcc
created
3d5ddcc
ollama: Resolve context window size via API (#39941)
Click to expand commit body
Previously we were guessing the context window size here:
https://github.com/zed-industries/zed/blob/8c3f09e31e3588a2494042dfe77bb3dccab1f7ba/crates/ollama/src/ollama.rs#L22
This is inaccurate and must be updated manually. This PR ensures that we
extract the context window size from the request in the same way that
the Ollama CLI does when running `ollama show <model-name>` (Relevant
code is
[here](https://github.com/ollama/ollama/blob/3d32249c749c6f77c1dc8a7cb55ae74fc2f4c08b/cmd/cmd.go#L860))
The format looks like this:
```json
{
"model_info": {
"general.architecture": "llama",
"llama.context_length": 132000
}
}
```
Once this PR is merged we could technically remove the old code
https://github.com/zed-industries/zed/blob/8c3f09e31e3588a2494042dfe77bb3dccab1f7ba/crates/ollama/src/ollama.rs#L22
I decided to keep it for now, as it is unclear if the necessary fields
are available via the API on older Ollama versions.
Release Notes:
- Fixed an issue where Ollama models would use the wrong context window
size
Bennet Bo Fenner
created
4dae3a1
gpui: Fix uniform list scroll to offset for Top and Bottom strategies (#39938)
Click to expand commit body
Closes #39863
Regressed in https://github.com/zed-industries/zed/pull/36653
Release Notes:
- Fixed an issue where clicking a sticky item in the project panel
wouldn’t correctly scroll the view to show its start.
Smit Barmase
created
c6373cc
Enable test_remote_git_diffs_when_recv_update_repository_delay on Windows (#39866)
Click to expand commit body
Release Notes:
- N/A
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Xiaobo Liu
created
a4ec693
windows: Don't throw an error when the settings file is empty (#39908)
Click to expand commit body
Closes #39585
Release Notes:
- N/A
Cole Miller
created
08a2b68
Add a non-beta Windows issue template (#39904)
Click to expand commit body
The beta template will be removed after Windows launch, the new url will
be:
https://github.com/zed-industries/zed/issues/new?template=07_bug_windows.yml
Release Notes:
- N/A
Joseph T. Lyons
created
13b17b3
ui: Make tree view item styles more consistent with similar components (#39892)
Click to expand commit body
This is a small step toward a future where all tree view item-like
elements in Zed can actually use this component.
Release Notes:
- N/A