Commit graph

24294 commits

Author SHA1 Message Date
Peter Tripp
4fbb568f42
Improve script/bump-zed-minor-version (#22199)
- Follow up to: https://github.com/zed-industries/zed/pull/22170

CC: @mgsloan 

Release Notes:

- N/A

---------

Co-authored-by: Michael Sloan <mgsloan@gmail.com>
2024-12-20 21:02:57 +00:00
Marshall Bowers
7913b6a5a2
assistant2: Restrict directory context picker to development builds (#22302)
This PR temporarily restricts the directory context picker to
development builds until the implementation is finished.

Release Notes:

- N/A
2024-12-20 19:08:29 +00:00
Marshall Bowers
d566792ae1
assistant2: List directories in directory context picker (#22300)
This PR updates the directory context picker in Assistant2 to show the
available directories.

Release Notes:

- N/A
2024-12-20 18:42:36 +00:00
Piotr Osiewicz
62f5ca562e
editor: Improve performance of lsp_ext validation (#22299)
We've received a complaint on Discord about bad multicursor performance.
I too run 15k cursor simultaneously. The gist of the issue was in the
lsp_ext; whenever we gather up actions to be registered on a buffer, we
need to know whether a buffer has any of the languages for which we have
LSP extensions. The problem stemed from the fact that we did a two-phase
filtering. For each selection we'd first check whether this selection
lies in a part of a file that is part of a language for which we have
LSP extensions. Then, we'd check whether we're running a language server
of interest for this buffer.

This is not optimal, because it would often do the redundant work:
1. We resolve selections for buffer that are known to not contain a
given language server.
2. We look up language server in the LspStore once per each matching
selection.

In case where the file is not related at all, we end up resolving all of
the selections which is pretty bad. This PR makes us skip buffers which
are known to not match the criteria. It also caches the result of
language server lookup for the buffers.

Closes #ISSUE

Release Notes:

- Improved performance with large quantity of cursors
2024-12-20 18:41:23 +00:00
Piotr Osiewicz
4eb8492308
chore: Remove stray println (#22297)
Follow-up to #22292

Release Notes:

- N/A
2024-12-20 18:18:44 +00:00
Thorsten Ball
d824baeece
Fix lang servers status set to Downloading when checking version (#22292)
This message has confused me many times too: we printed the status as
"Downloading" when we were only checking whether we need to install a
given version of a language server.

This fixes the issue for Node-based language servers where we had the
same check in all implementations.

Closes  #22241

Release Notes:

- Fixed some language servers reporting status as "Downloading..." when
only a version check was being done.
2024-12-20 16:59:10 +00:00
Marshall Bowers
8a858fee7c
Enable Assistant2 outside of development builds (#22294)
This PR removes the gate that limited Assistant2 to development builds,
so that we can start testing it out in Nightly.

Note that currently this still requires explicit opt-in to the
`assistant2` feature flag.

Release Notes:

- N/A
2024-12-20 16:43:24 +00:00
Alejandro Gómez-Londoño
cbd2e81a7e
Add arrow key movements to terminal vi mode (#22103)
Some checks are pending
CI / check_docs_only (push) Waiting to run
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Build Remote Server (push) Blocked by required conditions
CI / (Windows) Run Clippy and tests (push) Blocked by required conditions
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
Expands #18715

Release Notes:

- Added arrow keys movement to the built-in terminal's [vi
mode](https://github.com/alacritty/alacritty/blob/master/docs/features.md#vi-mode)
(which is using Alacritty under the hood).

Details
--
A minuscule improvement on #18715 to allow user with alternative
keyboard layouts to use the terminal's vi mode with the arrow keys.
2024-12-20 13:49:12 +00:00
Thorsten Ball
b25d8ecb75
vim: Fix deletion with sentence-motion (#22289)
Fixes #22151.

Turns out Vim also has some weird behavior with sentence deletion in
case it's on the first character of a line.

Release Notes:

- vim: Fixed deleting sentence-wise (i.e. `d(` and `d)`), which would
previously delete the whole line instead of just a sentence.
2024-12-20 12:48:38 +00:00
Aaron Feickert
7c03e11cfc
Fix blank line cursor width (#22275)
This PR ensures that, for fixed-width fonts, the cursor width is the
same on blank lines as on non-blank lines, as well as at the end of a
line. It does so by using the em advance to define the cursor width
instead of the em width in these cases.

Note that this can look... bizarre on non-fixed-width fonts:
<img width="93" alt="Screenshot 2024-12-19 at 21 43 11"
src="https://github.com/user-attachments/assets/a4c9b26c-98ea-4a1d-947b-51f1acd3c2f8"
/>
However, this is arguably reasonably consistent with how (terminal) Vim
handles it:
<img width="45" alt="Screenshot 2024-12-19 at 21 46 42"
src="https://github.com/user-attachments/assets/ec3ff614-7a15-4cc3-8d14-3d15ce62f2b8"
/>

Closes #22260.

Release Notes:

- N/A
2024-12-20 10:26:27 +00:00
Michael Sloan
f3fc4d6279
Add a CI check for todo! and FIXME comments (#21950)
Motivation for this is to support writing comments that will certainly
be revisited before merge.

Release Notes:

- N/A
2024-12-20 08:38:50 +00:00
tims
e4493d60dc
linux: Fix wrong cursor theme for arrow cursor style (#22276)
Some checks are pending
CI / check_docs_only (push) Waiting to run
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Build Remote Server (push) Blocked by required conditions
CI / (Windows) Run Clippy and tests (push) Blocked by required conditions
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
Closes #22264

On Linux, the arrow cursor style currently used by Zed is `arrow`.
However, this style might not be available in most themes, causing the
cursor to fall back to system default theme. Note cursor style are
platform (X11 and Wayland) agnostic.

Most themes use `left_ptr` as their arrow cursor style instead of
`arrow`. In some cases, `left_ptr` and `arrow` are symlinks pointing to
the `default` style, but the `default` style is not guaranteed to be
available across all themes.

After inspecting the available cursor themes on popular desktop
environments, changing the default from `arrow` to `left_ptr` seems to
be available in all of them. `left_ptr` as default cursor style is also
mentioned in [Arch Wiki: Cursor
themes](https://wiki.archlinux.org/title/Cursor_themes#Change_X_shaped_default_cursor).

KDE:
```sh
tims@lemon /u/s/icons> find . -name "arrow"
./Breeze_Snow/cursors/arrow
./breeze_cursors/cursors/arrow
./Adwaita/cursors/arrow

tims@lemon /u/s/icons> find . -name "default"
./default
./Breeze_Snow/cursors/default
./breeze_cursors/cursors/default
./Adwaita/cursors/default

tims@lemon /u/s/icons> find . -name "left_ptr"
./Oxygen_White/cursors/left_ptr
./KDE_Classic/cursors/left_ptr
./Oxygen_Yellow/cursors/left_ptr
./Oxygen_Blue/cursors/left_ptr
./Oxygen_Black/cursors/left_ptr
./Breeze_Snow/cursors/left_ptr
./breeze_cursors/cursors/left_ptr
./Adwaita/cursors/left_ptr
./Oxygen_Zion/cursors/left_ptr

```

Gnome:
```sh
tims@orange:/usr/share/icons$ find . -name "arrow"
./DMZ-Black/cursors/arrow
./Adwaita/cursors/arrow
./redglass/cursors/arrow
./whiteglass/cursors/arrow
./handhelds/cursors/arrow
./Yaru/cursors/arrow
./DMZ-White/cursors/arrow

tims@orange:/usr/share/icons$ find . -name "default"
./Adwaita/cursors/default
./default
./Yaru/cursors/default

tims@orange:/usr/share/icons$ find . -name "left_ptr"
./DMZ-Black/cursors/left_ptr
./Adwaita/cursors/left_ptr
./redglass/cursors/left_ptr
./whiteglass/cursors/left_ptr
./handhelds/cursors/left_ptr
./Yaru/cursors/left_ptr
./DMZ-White/cursors/left_ptr
```

My theme is set to Oxygen Yellow here.

Before:
<img
src="https://github.com/user-attachments/assets/7485f1e7-5936-45b4-96bd-399525bad95d"
alt="before" width="450px" />

After:
<img
src="https://github.com/user-attachments/assets/56090735-6a1f-4652-ad3e-075ff4c3f9ab"
alt="after" width="450px" />


Release Notes:

- Fixed wrong cursor theme for arrow cursor style on Linux.
2024-12-20 05:57:47 +00:00
Max Brunsfeld
3632b36fde
Move multibuffer tests to their own source file (#22270)
Release Notes:

- N/A
2024-12-20 02:02:32 +00:00
renovate[bot]
97e11fd5d2
Update aws-sdk-rust monorepo (#22215)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [aws-config](https://redirect.github.com/smithy-lang/smithy-rs) |
dependencies | patch | `1.5.10` -> `1.5.11` |
| [aws-sdk-kinesis](https://redirect.github.com/awslabs/aws-sdk-rust) |
dependencies | minor | `1.52.0` -> `1.53.0` |
| [aws-sdk-s3](https://redirect.github.com/awslabs/aws-sdk-rust) |
dependencies | minor | `1.65.0` -> `1.66.0` |

---

### Configuration

📅 **Schedule**: Branch creation - "after 3pm on Wednesday" in timezone
America/New_York, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

Release Notes:

- N/A

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS43Mi41IiwidXBkYXRlZEluVmVyIjoiMzkuNzIuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-20 01:15:25 +00:00
renovate[bot]
150aa03c5f
Update Rust crate hyper to v0.14.32 (#22207)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [hyper](https://hyper.rs)
([source](https://redirect.github.com/hyperium/hyper)) |
workspace.dependencies | patch | `0.14.31` -> `0.14.32` |

---

### Release Notes

<details>
<summary>hyperium/hyper (hyper)</summary>

###
[`v0.14.32`](https://redirect.github.com/hyperium/hyper/releases/tag/v0.14.32)

[Compare
Source](https://redirect.github.com/hyperium/hyper/compare/v0.14.31...v0.14.32)

#### Features

- **server:** add `Builder::max_pending_accept_reset_streams(num)`
option
([a24f0c0](a24f0c0af8))

#### Bug Fixes

- **http1:** fix intermittent panic parsing partial headers
([0f274ae](0f274ae653))

#### New Contributors

- [@&#8203;cratelyn](https://redirect.github.com/cratelyn) made their
first contribution in
[https://github.com/hyperium/hyper/pull/3796](https://redirect.github.com/hyperium/hyper/pull/3796)

**Full Changelog**:
https://github.com/hyperium/hyper/compare/v0.14.31...v0.14.32

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 3pm on Wednesday" in timezone
America/New_York, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

Release Notes:

- N/A

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS43Mi41IiwidXBkYXRlZEluVmVyIjoiMzkuNzIuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-20 01:14:22 +00:00
renovate[bot]
ebf6115c3c
Update Rust crate semver to v1.0.24 (#22211)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [semver](https://redirect.github.com/dtolnay/semver) |
workspace.dependencies | patch | `1.0.23` -> `1.0.24` |

---

### Release Notes

<details>
<summary>dtolnay/semver (semver)</summary>

###
[`v1.0.24`](https://redirect.github.com/dtolnay/semver/releases/tag/1.0.24)

[Compare
Source](https://redirect.github.com/dtolnay/semver/compare/1.0.23...1.0.24)

- Optimize Ord impls for semver::Prerelease and semver::BuildMetadata
([#&#8203;328](https://redirect.github.com/dtolnay/semver/issues/328),
thanks [@&#8203;Eh2406](https://redirect.github.com/Eh2406))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 3pm on Wednesday" in timezone
America/New_York, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

Release Notes:

- N/A

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS43Mi41IiwidXBkYXRlZEluVmVyIjoiMzkuNzIuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-20 01:14:10 +00:00
renovate[bot]
394af7481d
Update Rust crate tree-sitter-c to v0.23.4 (#22212)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [tree-sitter-c](https://redirect.github.com/tree-sitter/tree-sitter-c)
| workspace.dependencies | patch | `0.23.2` -> `0.23.4` |

---

### Release Notes

<details>
<summary>tree-sitter/tree-sitter-c (tree-sitter-c)</summary>

###
[`v0.23.4`](https://redirect.github.com/tree-sitter/tree-sitter-c/releases/tag/v0.23.4)

[Compare
Source](https://redirect.github.com/tree-sitter/tree-sitter-c/compare/v0.23.2...v0.23.4)

**NOTE:** Download `tree-sitter-c.tar.xz` for the *complete* source
code.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 3pm on Wednesday" in timezone
America/New_York, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

Release Notes:

- N/A

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS43Mi41IiwidXBkYXRlZEluVmVyIjoiMzkuNzIuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-20 01:13:51 +00:00
renovate[bot]
7b0d63fffb
Update Rust crate tree-sitter-json to 0.24 (#22226)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[tree-sitter-json](https://redirect.github.com/tree-sitter/tree-sitter-json)
| workspace.dependencies | minor | `0.23` -> `0.24` |

---

### Release Notes

<details>
<summary>tree-sitter/tree-sitter-json (tree-sitter-json)</summary>

###
[`v0.24.8`](https://redirect.github.com/tree-sitter/tree-sitter-json/releases/tag/v0.24.8)

[Compare
Source](https://redirect.github.com/tree-sitter/tree-sitter-json/compare/v0.24.7...v0.24.8)

**NOTE:** Download `tree-sitter-json.tar.xz` for the *complete* source
code.

###
[`v0.24.7`](https://redirect.github.com/tree-sitter/tree-sitter-json/releases/tag/v0.24.7)

[Compare
Source](https://redirect.github.com/tree-sitter/tree-sitter-json/compare/v0.24.5...v0.24.7)

**NOTE:** Download `tree-sitter-json.tar.xz` for the *complete* source
code.

###
[`v0.24.5`](https://redirect.github.com/tree-sitter/tree-sitter-json/releases/tag/v0.24.5)

[Compare
Source](https://redirect.github.com/tree-sitter/tree-sitter-json/compare/v0.24.4...v0.24.5)

**NOTE:** Download `tree-sitter-json.tar.xz` for the *complete* source
code.

###
[`v0.24.4`](https://redirect.github.com/tree-sitter/tree-sitter-json/compare/v0.24.3...v0.24.4)

[Compare
Source](https://redirect.github.com/tree-sitter/tree-sitter-json/compare/v0.24.3...v0.24.4)

###
[`v0.24.3`](https://redirect.github.com/tree-sitter/tree-sitter-json/compare/v0.24.2...v0.24.3)

[Compare
Source](https://redirect.github.com/tree-sitter/tree-sitter-json/compare/v0.24.2...v0.24.3)

###
[`v0.24.2`](https://redirect.github.com/tree-sitter/tree-sitter-json/compare/v0.24.1...v0.24.2)

[Compare
Source](https://redirect.github.com/tree-sitter/tree-sitter-json/compare/v0.24.1...v0.24.2)

###
[`v0.24.1`](https://redirect.github.com/tree-sitter/tree-sitter-json/compare/v0.24.0...v0.24.1)

[Compare
Source](https://redirect.github.com/tree-sitter/tree-sitter-json/compare/v0.24.0...v0.24.1)

###
[`v0.24.0`](https://redirect.github.com/tree-sitter/tree-sitter-json/compare/v0.23.0...v0.24.0)

[Compare
Source](https://redirect.github.com/tree-sitter/tree-sitter-json/compare/v0.23.0...v0.24.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 3pm on Wednesday" in timezone
America/New_York, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

Release Notes:

- N/A

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS43Mi41IiwidXBkYXRlZEluVmVyIjoiMzkuNzIuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-20 01:13:17 +00:00
tims
f64bfe8c1d
linux: Fix saving file with root ownership (#22045)
Some checks are pending
CI / check_docs_only (push) Waiting to run
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Build Remote Server (push) Blocked by required conditions
CI / (Windows) Run Clippy and tests (push) Blocked by required conditions
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
Closes #13585

Currently, saving files with `root` ownership or `root` as the group
throws a `Permission denied (os error 13). Please try again.` error.
This PR fixes the issue on Linux by prompting the user for a password
and saving the file with elevated privileges.

It uses `pkexec` (Polkit), which is by default available on GNOME, KDE,
and most Linux systems. I haven't implemented this for macOS as I don't
have a device to test it on.

This implementation is similar to how Vscode handles it. Except, they
don't show custom message.

**Working**:

When file saving fails due to a `PermissionDenied` error, we create a
temporary file in the same directory as the target file and writes the
data to this temporary file. After, the contents of this file are copied
to the original file using the `tee` command instead of `cp` or `mv`.
This ensures that the ownership and permissions of the original file are
preserved. This command is executed using `pkexec` which will prompt
user for their password.

**Custom Message**:

The message displayed to the user in the prompt is automatically
retrieved from the `org.zed.app.policy` file, which is located at
`/usr/share/polkit-1/actions/`. This file should be installed during the
setup process. While the policy file is optional, omitting it will cause
the user to see the underlying command being executed rather than a
user-friendly message. Currently, VSCode does not display the
user-friendly message.

The policy file must specify a unique binary, ensuring that only that
binary can use the policy file. It cannot be as generic as a
`/bin/bash`, as any software using bash to prompt will end up showing
Zed’s custom message. To address this, we will create a custom bash
script, as simple as the following, placed in `/usr/bin/zed/elevate.sh`.
The script should have root ownership and should not reside in the home
directory, since the policy file cannot resolve `$HOME`.

```sh
#!/bin/bash
eval "$@"
```

*IMPORTANT NOTE*

Since copying the policy file and our script requires sudo privileges,
the installation script will now prompt for the password at very end.
Only on Linux, if `pexec` is installed.

Screenshots:

KDE with policy file:
![Screenshot from 2024-12-15
22-13-06](https://github.com/user-attachments/assets/b8bb7565-85df-4c95-bb10-82e50acf9b56)

Gnome with policy file:
![Screenshot from 2024-12-15
22-21-48](https://github.com/user-attachments/assets/83d15056-a2bd-41d9-a01d-9b8954260381)

Gnome without policy file:

![image](https://github.com/user-attachments/assets/66c39d02-eed4-4f09-886f-621b6d37ff43)

VSCode:

![image](https://github.com/user-attachments/assets/949dc470-c3df-4e2f-8cc6-31babaee1d18)

User declines the permission request:

![image](https://github.com/user-attachments/assets/c5cbf056-f6f9-43a8-8d88-f2b0597e14d6)

Release Notes:

- Fixed file saving with root ownership on Linux.
2024-12-19 22:16:01 +00:00
Michael Sloan
5b86845605
Fix docs for Bounds::from_corner_and_size (#22265)
(left in a todo!, oops)

Release Notes:

- N/A
2024-12-19 21:50:52 +00:00
Marshall Bowers
9782abf3c5
ci: Put docs-only conditionals on each step (#22261)
This PR is a follow up to #22254 with a different approach.

We need to put the conditional on each step in order to skip them, as I
couldn't see any other way of bailing out of the pipeline early based on
a condition.

Release Notes:

- N/A
2024-12-19 19:46:10 +00:00
Cole Miller
6231072d85
Hide chat panel button when not in a call (#22200)
cc @nathansobo 

Release Notes:

- Hide chat panel button by default when not in a call
2024-12-19 19:32:45 +00:00
Cole Miller
2094d50514
Fix permalink-to-line when Git repo root and worktree dir don't coincide (#22003)
Closes #21505. This should work if the git dir is an ancestor of the
worktree dir or vice versa.

Release Notes:

- Fixed GitHub permalink-to-line actions when worktree dir and Git dir
aren't the same
2024-12-19 19:23:50 +00:00
Ringo De Smet
1e2fa3b022
Update macOS system requirements in docs (#22248)
Update macOS system requirements to include Sequoia (15.x), the latest
major version.

Release Notes:

- N/A

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-12-19 17:55:46 +00:00
Piotr Osiewicz
8e81070091
terminal: Clear output after venv is activated (#22256)
The command used to activate the venv can still be accessed/scrolled to
if needed.

Release Notes:

- The Python virtual environment activation command is no longer shown
in the terminal output by default.

Co-authored-by: Peter Tripp <peter@zed.dev>
2024-12-19 17:43:19 +00:00
Thorsten Ball
1071814d41
zeta: Always include current file's outline in telemetry (#22257)
This doesn't include the outline in the prompt yet, but it does send it
up via telemetry so we can use it to see whether it would have improved
generated output.

Release Notes:

- N/A

Co-authored-by: Agus <agus@zed.dev>
2024-12-19 17:17:10 +00:00
Marshall Bowers
3d3d8f20eb
ci: Run required status checks for docs-only PRs, but exit early (#22254)
I noticed a problem with the addition of required status checks where
PRs that only touched the docs wouldn't pass the status checks due to
all of the checks being skipped via `paths-ignore`:

<img width="950" alt="Screenshot 2024-12-19 at 11 16 38 AM"
src="https://github.com/user-attachments/assets/a6fa43ee-de63-40a6-a15a-f2f3519e9db8"
/>

This PR aims to address this by making it so required status checks run
for docs-only PRs, but exit early (before doing all of the work).

Release Notes:

- N/A
2024-12-19 17:05:11 +00:00
Aaron Feickert
536a958c58
Fix cursor overlap (#21999)
When the cursor has a block shape and is not on the first line, its name
popup exhibits an overlap:
<img width="171" alt="Screenshot 2024-12-13 at 18 00 54"
src="https://github.com/user-attachments/assets/1dc2ef93-020b-45c4-9fc6-db7d97f65c62"
/>

This occurs because the popup's horizontal alignment is set differently
when the cursor
[is](fff12ec1e5/crates/editor/src/element.rs (L6383))
or
[isn't](fff12ec1e5/crates/editor/src/element.rs (L6385))
on the first line.

This PR makes the horizontal alignment the same in both cases, which
removes the overlap:
<img width="176" alt="Screenshot 2024-12-13 at 17 57 20"
src="https://github.com/user-attachments/assets/a3c10ed5-6a1b-4040-9408-92290e9da30b"
/>

Closes #21887.

Release Notes:

- Fixed an overlap that cuts off user names when a cursor has a block
shape.
2024-12-19 16:24:30 +00:00
Thorsten Ball
96ad022cd7
Fix project environment not working correctly with multiple worktrees (#22246)
Fixes https://github.com/zed-industries/zed/issues/21972

This fixes two bugs:

**Bug 1**: this bug caused us to only ever load a single environment in
a multi-worktree project, thanks to this line:

```rust
if let Some(task) = self.get_environment_task.as_ref()
```

We'd only ever run a single task per project, which is wrong.

What does code does is to cache the tasks per `worktree_id`, which means
we don't even need to cache the environments again, since we can just
cache the `Shared<Task<...>>`.

**Bug 2**: we assumed that every `worktree_abs_path` is a directory,
which lead to `Failed to run direnv` log messages when opening a project
that had a worktree with a single file open (easy to reproduce: open a
normal project, open your settings, close Zed, reopen it — the settings
faile caused environments to not load)

It's fixed by checking whether the `worktree_abs_path` is an absolute
directory. Since this is always running locally, it's fine to use
`smol::fs` here instead of using our `Fs`.

Release Notes:

- Fixed shell environments not being loaded properly to be used by
language servers and terminals in case a project had multiple worktrees.
- Fixed `Failed to run direnv` messages showing up in case Zed restored
a window that contained a worktree with a single file.
https://github.com/zed-industries/zed/issues/21972
2024-12-19 14:50:14 +00:00
Agus Zubiaga
11260e6d37
Match keymap-style action names in command palette (#22149)
Some checks are pending
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Linux) Build Remote Server (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
For example, `editor::TabPrev` matches "editor: tab prev".

Release Notes:

- Added support for searching command palette using keymap-style action
names.

---------

Co-authored-by: Peter Tripp <peter@zed.dev>
2024-12-19 12:48:54 +00:00
Thorsten Ball
d54662e683
zeta: Do not change user's menu selection if completion is late (#22238)
Release Notes:

- N/A
2024-12-19 09:42:29 +00:00
Thorsten Ball
2a17274ec2
zeta: Always show ghost text, even if showing completion in menu (#22194)
See:
![screenshot-2024-12-18-17 26
22@2x](https://github.com/user-attachments/assets/82bdea76-6c96-4c4d-a08a-1601381a378f)


https://github.com/user-attachments/assets/165d9f0d-8339-4fd9-a796-a67121689af6



Release Notes:

- N/A

Co-authored-by: Danilo <danilo@zed.dev>
2024-12-19 09:00:58 +00:00
Michael Sloan
b93cee8d27
Use static LazyLocks for all constant regexes (#22225)
Some checks are pending
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Linux) Build Remote Server (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
Release Notes:

- N/A
2024-12-19 02:20:35 +00:00
Peter Tripp
837bbc851f
astro: Bump to v0.1.2 (#22220)
Includes:
- https://github.com/zed-industries/zed/pull/20206

Release Notes:

- N/A
2024-12-18 23:22:24 +00:00
Peter Tripp
0fe88a88b1
elixir: Bump to v0.1.2 (#22219)
Includes:
- https://github.com/zed-industries/zed/pull/21666
- https://github.com/zed-industries/zed/pull/20206

Release Notes:

- N/A
2024-12-18 23:22:19 +00:00
renovate[bot]
2b4f0deff5
Update Rust crate async-tungstenite to v0.28.2 (#22206)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[async-tungstenite](https://redirect.github.com/sdroege/async-tungstenite)
| workspace.dependencies | patch | `0.28.1` -> `0.28.2` |

---

### Release Notes

<details>
<summary>sdroege/async-tungstenite (async-tungstenite)</summary>

###
[`v0.28.2`](https://redirect.github.com/sdroege/async-tungstenite/blob/HEAD/CHANGELOG.md#0282---2024-12-15)

[Compare
Source](https://redirect.github.com/sdroege/async-tungstenite/compare/0.28.1...0.28.2)

##### Fixed

- Add `alloc` feature to `futures_task` dependency to make sure
`futures-task::ArcWake` is available.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 3pm on Wednesday" in timezone
America/New_York, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

Release Notes:

- N/A

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS43Mi41IiwidXBkYXRlZEluVmVyIjoiMzkuNzIuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-18 23:05:46 +00:00
Marshall Bowers
4f2ab812fb
ci: Enable merge_group for workflows (#22214)
Enable the `merge_group` for CI workflows so that they work with the
merge queue.

Release Notes:

- N/A
2024-12-18 22:59:20 +00:00
Michael Sloan
3f40d76be4
Enable search within diagnostics pane (#22213)
Closes #16033
Addresses one part of #4475

Release Notes:

- Added support for find and replace in diagnostics. Also causes
keybindings that use search to now work (such as `*` and `#` vim
bindings).
2024-12-18 22:52:16 +00:00
Michael Sloan
6bb21b1e5e
Fix vim repeat (.) and macro playback insertions in diagnostics and assistant (#22210)
Release Notes:

- Fixed vim repeat (`.`) and macro playback of insertions in diagnostics
and assistant.

Co-authored-by: Conrad <conrad@zed.dev>
2024-12-18 15:30:52 -07:00
tims
f7a7866d4a
linux: Implement Menus (#21873)
Closes #19837

This PR implements menus for Linux and Windows, inspired by JetBrains
IDEs. Thanks to @notpeter for the inspiration.


https://github.com/user-attachments/assets/7267fcdf-fec5-442e-a53b-281f89471095

I plan to complete this in multiple parts. While this PR delivers a
fully functional menus, there are many UX improvements that can be done.
So, this is part 1 of 3.

**This PR**:
- [x] Clicking the application menu opens the first menu popup. This
also shows other available menus.
- [x] While a menu is open, hovering over other menus opens them without
needing a click.
- [x] Up/down arrow keys works out of the box. Thanks GPUI. 

**Future - Part 2**:
- Add keybinding support to open specific menus using `Option + first
character of menu item`.
- Add support for left/right arrow keys to move between menus.

**Future - Part 3**:
- Implement nested context menus in GPUI for submenus. (I haven't
checked if this already exists).

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2024-12-18 17:27:25 -05:00
Dzmitry Malyshau
298b9df589
Switch to a single GPU context in Blade (#20853)
Some checks are pending
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Linux) Build Remote Server (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
Closes #17005

Release Notes:

- Improved GPU context management: share a single context with multiple
surfaces.

### High Level

Blade got a proper support for Surface objects in
https://github.com/kvark/blade/pull/203.
That was mainly motivated by Zed needing to draw multiple windows. With
the Surface API, Zed is now able to have the GPU context tied to the
"Platform" instead of "Window". Practically speaking, this means:
  - architecture more sound
  - faster to open/close windows
  - less surprises, more robust

### Concerns

1. Zed has been using a temporary workaround for the platform bug on
some Intel+Nvidia machines that makes us unable to present -
https://github.com/kvark/blade/pull/144 . This workaround is no longer
available with the new architecture. I'm looking for ideas on how to
approach this better.
- we are now picking up the change in
https://github.com/kvark/blade/pull/210, which allows forcing a specific
Device ID. This should allow Zed users to work around the issue. We
could help them to automate it, too.
2. ~~Metal-rs dependency is switched to
https://github.com/kvark/metal-rs/tree/blade, since upstream isn't
responsive in merging changes that are required for Blade. Hopefully,
temporary.~~
- ~~we can also hack around it by just transmuting the texture
references, since we know those are unchanged in the branch. That would
allow Blade to use it's own version of Metal, temporarily, if switching
metal-rs in the workspace is a concern.~~
- merged my metal-rs changes and updated Zed to use the upstream github
reference

---------

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-12-18 14:47:09 -07:00
Agus Zubiaga
56d20fc0a3
Reuse prompt editor across buffer and terminal assist (#22188)
Builds on https://github.com/zed-industries/zed/pull/22160 and extracts
the rest of `PromptEditor` so it can be shared across terminal and
inline assistants. This will help avoid the UI drifting as we have
already observed.

Note: This is mostly a mechanical refactor. I imagine some things could
be factored in a better way by someone with more context, but I think
this is a good start.

Release Notes:

- N/A

---------

Co-authored-by: Richard Feldman <oss@rtfeldman.com>
2024-12-18 16:12:54 -05:00
Marshall Bowers
fc00eaa161
assistant2: Reduce message editor's maximum height (#22205)
This PR reduces the message editor's maximum height to 10 lines, after
which point it will scroll.

Release Notes:

- N/A
2024-12-18 16:11:31 -05:00
renovate[bot]
7414e91a85
Update actions/upload-artifact digest to 6f51ac0 (#22203)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[actions/upload-artifact](https://redirect.github.com/actions/upload-artifact)
| action | digest | `b4b15b8` -> `6f51ac0` |

---

### Configuration

📅 **Schedule**: Branch creation - "after 3pm on Wednesday" in timezone
America/New_York, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

Release Notes:

- N/A

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS43Mi41IiwidXBkYXRlZEluVmVyIjoiMzkuNzIuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-18 22:59:38 +02:00
renovate[bot]
b51a162d22
Update Rust crate tiktoken-rs to 0.6.0 (#21900)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [tiktoken-rs](https://redirect.github.com/zurawiki/tiktoken-rs) |
workspace.dependencies | minor | `0.5.9` -> `0.6.0` |

---

### Release Notes

<details>
<summary>zurawiki/tiktoken-rs (tiktoken-rs)</summary>

###
[`v0.6.0`](https://redirect.github.com/zurawiki/tiktoken-rs/releases/tag/v0.6.0)

[Compare
Source](https://redirect.github.com/zurawiki/tiktoken-rs/compare/v0.5.9...v0.6.0)

**Minor version release signifies a breaking change in 0.x**

#### What's Changed

- Add support for chatgpt-4o-latest by
[@&#8203;Congyuwang](https://redirect.github.com/Congyuwang) in
[https://github.com/zurawiki/tiktoken-rs/pull/85](https://redirect.github.com/zurawiki/tiktoken-rs/pull/85)
- Refactor internals to make future updates to tiktoken easier to merge
-   Do not expose tiktoken internal modules and functions
-   Update dependencies

#### New Contributors

- [@&#8203;Congyuwang](https://redirect.github.com/Congyuwang) made
their first contribution in
[https://github.com/zurawiki/tiktoken-rs/pull/85](https://redirect.github.com/zurawiki/tiktoken-rs/pull/85)

**Full Changelog**:
https://github.com/zurawiki/tiktoken-rs/compare/v0.5.9...v0.6.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 3pm on Wednesday" in timezone
America/New_York, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

Release Notes:

- N/A

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS41OC4xIiwidXBkYXRlZEluVmVyIjoiMzkuNTguMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-18 22:24:56 +02:00
renovate[bot]
78dde63337
Update Rust crate heed to 0.21.0 (#21892)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [heed](https://redirect.github.com/Kerollmops/heed) |
workspace.dependencies | minor | `0.20.1` -> `0.21.0` |

---

### Configuration

📅 **Schedule**: Branch creation - "after 3pm on Wednesday" in timezone
America/New_York, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

Release Notes:

- N/A

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS41OC4xIiwidXBkYXRlZEluVmVyIjoiMzkuNTguMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-18 22:24:48 +02:00
renovate[bot]
c0b40d0bd0
Update Rust crate cargo_toml to 0.21 (#21880)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [cargo_toml](https://lib.rs/cargo_toml)
([source](https://gitlab.com/lib.rs/cargo_toml)) |
workspace.dependencies | minor | `0.20` -> `0.21` |

---

### Configuration

📅 **Schedule**: Branch creation - "after 3pm on Wednesday" in timezone
America/New_York, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

Release Notes:

- N/A

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS41OC4xIiwidXBkYXRlZEluVmVyIjoiMzkuNTguMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-18 22:24:30 +02:00
renovate[bot]
0acb743dac
Update 2428392/gh-truncate-string-action action to v1.4.1 (#22204)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[2428392/gh-truncate-string-action](https://redirect.github.com/2428392/gh-truncate-string-action)
| action | patch | `v1.4.0` -> `v1.4.1` |

---

### Release Notes

<details>
<summary>2428392/gh-truncate-string-action
(2428392/gh-truncate-string-action)</summary>

###
[`v1.4.1`](https://redirect.github.com/2428392/gh-truncate-string-action/releases/tag/v1.4.1)

[Compare
Source](https://redirect.github.com/2428392/gh-truncate-string-action/compare/v1.4.0...v1.4.1)

#### What's Changed

- update action.yml inputs to include truncationSymbol by
[@&#8203;aballman](https://redirect.github.com/aballman) in
[https://github.com/2428392/gh-truncate-string-action/pull/14](https://redirect.github.com/2428392/gh-truncate-string-action/pull/14)

#### New Contributors

- [@&#8203;aballman](https://redirect.github.com/aballman) made their
first contribution in
[https://github.com/2428392/gh-truncate-string-action/pull/14](https://redirect.github.com/2428392/gh-truncate-string-action/pull/14)

**Full Changelog**:
https://github.com/2428392/gh-truncate-string-action/compare/v1...v1.4.1

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 3pm on Wednesday" in timezone
America/New_York, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

Release Notes:

- N/A

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS43Mi41IiwidXBkYXRlZEluVmVyIjoiMzkuNzIuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-18 22:24:02 +02:00
Marshall Bowers
8b2afab0d3
assistant2: Wire up basic @-mention interaction for context (#22197)
This PR adds an initial version of using `@` in the message editor to
add context to the thread.

We don't yet insert any sort of reference to it in the message body
itself.

Release Notes:

- N/A
2024-12-18 13:29:39 -05:00
Peter Tripp
b79117c882
Bump Zed to v0.168.x (#22198) 2024-12-18 12:03:40 -05:00