Commit graph

23680 commits

Author SHA1 Message Date
mgsloan@gmail.com
4148786a74
Use the display's resolution for the video frames
co-authored-by: Nathan <nathan@zed.dev>
2024-12-02 17:16:44 -08:00
Mikayla
0f5bd9a3b9
Upgrade to latest livekit 2024-12-02 11:06:35 -08:00
Mikayla
c6f1ab9646
bump livekit version 2024-12-02 10:12:29 -08:00
Mikayla
7050288e33
Merge branch 'main' into livekit-rust-sdk 2024-12-02 09:45:11 -08:00
uncenter
995b40f149
Add "Copy Extension ID" action to extension card dropdown (#21395)
Adds a new "Copy Extension ID" action to the dropdown of remote
extension cards in the extensions list UI. Would have liked for it to be
a context menu where you could click anywhere on the card, but couldn't
figure out how to integrate that with the existing setup.

I've been missing this from VSCode's extension panel, which allows this
on right click:

![CleanShot 2024-12-01 at 22 03
14](https://github.com/user-attachments/assets/64796f96-1a37-4ba2-bfe1-971b939aa50a)

This is useful if you, say, want to add some extensions to
https://zed.dev/docs/configuring-zed#auto-install-extensions, where you
need the IDs.

Release Notes:

- Added "Copy Extension ID" action to extension card dropdown

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-12-02 11:19:42 -05:00
Piotr Osiewicz
89e46396f6
workspace: Serialize active panel even if it's not visible (#21408)
Fixes #21285

Closes #21285

Release Notes:

- Fixed workspace serialization of collapsed panels
2024-12-02 17:08:16 +01:00
Finn Evers
3987d0d731
Treat .pcss files as CSS (#21402)
This addresses
https://github.com/zed-industries/zed/pull/19416#discussion_r1865019293
and also follows the [associated PostCSS file extensions for VS
Code](5d003170c5/package.json (L37)).

Release Notes:

- `.pcss` files are now recognized as CSS

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-12-02 10:56:47 -05:00
loczek
6cb758a1cd
theme_importer: Add more mappings (#21393)
This PR adds `search_match_background` and `editor_document_highlight_bracket_background` color mappings as they appear to be missing.
2024-12-02 09:37:41 -05:00
Delyan Angelov
0cb3a6ed0e
Add V file icon (#20017)
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
Here is a preview of the new `v.svg` in comparison with some of the
existing icons:

![image](https://github.com/user-attachments/assets/451762ff-b13a-42b9-89ac-695f25a43a84)

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
2024-12-02 10:51:28 -03:00
Danilo Leal
2300f40cd9
Add consistent placeholder text for terminal inline assist (#21398)
Ensuring it is consistent with the buffer inline assistant. Just thought
of not having "Transform" here as that felt it made less sense for
terminal-related prompts, where arguably more frequently, one would be
suggesting for actual commands rather than code transformation.

<img width="700" alt="Screenshot 2024-12-02 at 09 11 00"
src="https://github.com/user-attachments/assets/ad96d03e-0366-46e8-8056-581066712d59">

Release Notes:

- N/A
2024-12-02 09:28:46 -03:00
Danilo Leal
dacd919e27
Add setting for making the tab's close button always visible (#21352)
Closes https://github.com/zed-industries/zed/issues/20422

<img width="700" alt="Screenshot 2024-11-29 at 22 00 20"
src="https://github.com/user-attachments/assets/4a17d00c-d64f-4b33-97a7-a57766ce6d17">

Release Notes:

- N/A
2024-12-02 07:48:10 -03:00
Danilo Leal
740ba7817b
Fine-tune terminal tab bar actions spacing (#21391)
Just quickly reducing the spacing between the terminal tab bar actions
so they're tighter and matching other similar components.

| Before | After |
|--------|--------|
| <img width="800" alt="Screenshot 2024-12-01 at 19 20 50"
src="https://github.com/user-attachments/assets/938336df-9ce1-42d3-8f3d-9c26b8e88453">
| <img width="800" alt="Screenshot 2024-12-01 at 19 18 19"
src="https://github.com/user-attachments/assets/0a2b5915-f37c-4b8e-af2c-b8018c4750ab">
|

Release Notes:

- N/A
2024-12-02 07:47:57 -03:00
fred-sch
380679fcc2
Fix: Copilot Chat is logged out (#21360)
Closes #21255

Release Notes:

- Fixed Copilot Chat OAuth Token parsing

---------

Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
2024-12-02 10:35:29 +01:00
moskirathe
89a56968f6
Fix typos in key-bindings documentation (#21390)
Some checks are pending
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
Release Notes:

Fixes two minor typos in the key-bindings documentation.
2024-12-01 19:02:12 -03:00
Kirill Bulatov
5f6b200d8d
Do not change selections when opening FS entries (#21382)
Some checks failed
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
CI / Check Postgres and Protobuf migrations, mergability (push) Has been cancelled
CI / Check formatting and spelling (push) Has been cancelled
CI / (macOS) Run Clippy and tests (push) Has been cancelled
CI / (Linux) Run Clippy and tests (push) Has been cancelled
CI / (Linux) Build Remote Server (push) Has been cancelled
CI / (Windows) Run Clippy and tests (push) Has been cancelled
CI / Create a macOS bundle (push) Has been cancelled
CI / Create a Linux bundle (push) Has been cancelled
CI / Create arm64 Linux bundle (push) Has been cancelled
CI / Auto release preview (push) Has been cancelled
Follow-up of https://github.com/zed-industries/zed/pull/21375

When changing selections for FS entries, outline panel will be forced to
change item to the first excerpt which is not what we want.

Release Notes:

- N/A
2024-12-01 14:28:48 +02:00
yoleuh
4d5415273e
Docs: Update developing zed docs to match (#21379)
Some changes just so the build docs for the different os matches each
other :)

macos:
- moved `rust wasm toolchain install` up under `rust install` (match
windows docs)
- add instructions to update rust if already installed (match windows
and linux docs)

windows:
- add `(required by a dependency)` to cmake install (match macos docs)

Release Notes:

- N/A
2024-12-01 10:59:29 +02:00
Kirill Bulatov
bf569d720e
Always change editor selection when navigating outline panel entries (#21375)
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
Also scroll to the center when doing so.

This way, related editor's breadcrumbs always update, bringing more
information.

Release Notes:

- Adjust outline panel item opening behavior to always change the editor
selection, and center it
2024-12-01 01:49:41 +02:00
Kirill Bulatov
28849dd2a8
Fix item closing overly triggering save dialogues (#21374)
Closes https://github.com/zed-industries/zed/issues/12029

Allows to introspect project items inside items more deeply, checking
them for being dirty.
For that:
* renames `project::Item` into `project::ProjectItem`
* adds an `is_dirty(&self) -> bool` method to the renamed trait
* changes the closing logic to only care about dirty project items when
checking for save prompts conditions
* save prompts are raised only if the item is singleton without a
project path; or if the item has dirty project items that are not open
elsewhere

Release Notes:

- Fixed item closing overly triggering save dialogues
2024-12-01 01:48:31 +02:00
Agustin Gomes
c2cd84a749
Add musl-gcc as dependency (#21366)
This addition comes after attempting building Zed from source.

As part of the process, one of the components (a crate I presume) called
`ring` failed to compile due to the following sequence of console
messages:

```log
warning: ring@0.17.8: Compiler family detection failed due to error: ToolNotFound: Failed to find tool. Is `musl-gcc` installed?
warning: ring@0.17.8: Compiler family detection failed due to error: ToolNotFound: Failed to find tool. Is `musl-gcc` installed?

error: failed to run custom build command for `ring v0.17.8`
```

Adding this library should help fix the issue on Fedora 41 at least, and
possibly will help fixing it for other RedHat based distributions as
well.

Closes #ISSUE

Release Notes:

- Add musl-gcc as dependency

Signed-off-by: Agustin Gomes <me@agustingomes.com>
2024-11-30 13:20:31 -08:00
tims
d609931e1c
linux: Fix mouse cursor size and blur on Wayland (#21373)
Closes #15788, #13258

This is a long-standing issue with a few previous attempts to fix it,
such as [this one](https://github.com/zed-industries/zed/pull/17496).
However, that fix was later reverted because it resolved the blur issue
but caused a size issue. Currently, both blur and size issues persist
when you set a custom cursor size from GNOME Settings and use fractional
scaling.

This PR addresses both issues.

---

### Context

A new Wayland protocol,
[cursor-shape-v1](https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/194),
allows the compositor to handle rendering the cursor at the correct size
and shape. This protocol is implemented by KDE, wlroots (Sway-like
environments), etc. Zed supports this protocol, so there are no issues
on these desktop environments.

However, GNOME has not yet
[adopted](https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/6212) this
protocol. As a result, apps must fall back to manually rendering the
cursor by specifying the theme, size, scale, etc., themselves. Zed also
implements this fallback but does not correctly account for the display
scale.

---

### Scale Fix

For example, if your cursor size is `64px` and you’re using fractional
scaling (e.g., `150%`), the display scale reported by the window query
will be an integer value, `2` in this case. Why `2` if the scale is
`150%`? That’s what the new protocol aims to improve. However, since
GNOME Wayland uses this integer scale everywhere, it’s sufficient for
our use case.

To fix the issue, we set the `buffer_scale` to this value. But that
alone doesn’t solve the problem. We also need to generate a matching
theme cursor size for this scaled version. This can be calculated as
`64px` * `2`, resulting in `128px` as the theme cursor size.

---

### Size Fix

The XDG Desktop Portal’s `cursor-size` event fails to read the cursor
size because it expects an `i32` but encounters a type error with `u32`.
Due to this, the cursor size was interpreted as the default `24px`
instead of the actual size set via user.

---

### Tested

This fix has been tested with all possible combinations of the
following:

- [x] GNOME Normal Scale (100%, 200%, etc.)
- [x] GNOME Fractional Scaling (125%, 150%, etc.)
- [x] GNOME Cursor Sizes (**Settings > Accessibility > Seeing**, e.g.,
`24px`, `64px`, etc.)
- [x] GNOME Experimental Feature `scale-monitor-framebuffer` (both
enabled and disabled)
- [x] KDE (`cursor-shape-v1` protocol)

---

**Result:**

64px custom cursor size + 150% Fractional Scale:


https://github.com/user-attachments/assets/cf3b1a0f-9a25-45d0-ab03-75059d3305e7

---

Release Notes:

- Fixed mouse cursor size and blur issues on Wayland
2024-11-30 13:19:44 -08:00
Remco Smits
fd71801346
Improve JavaScript runnable detection followup (#21363)
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
Followup: https://github.com/zed-industries/zed/pull/21246

**Before**
<img width="545" alt="Screenshot 2024-11-30 at 13 27 15"
src="https://github.com/user-attachments/assets/3346e485-96c8-482d-b5fd-85b86f37d662">
**After**
<img width="537" alt="Screenshot 2024-11-30 at 13 27 36"
src="https://github.com/user-attachments/assets/3cedcaa5-e285-47fb-909d-16d37d9844ca">

We did not need to add the `*` as it was already matching one of them,
we actually need at least one of them, so making it optional was a
mistake.

Don't think we need to add release notes, as the change is only on main
the branch now.

Release Notes:

- N/A
2024-11-30 13:55:14 +01:00
Haru Kim
c1de606581
Fix the autoscroll_on_clicks setting working incorrectly (#21362) 2024-11-30 14:30:27 +02:00
Kirill Bulatov
57a45d80ad
Add a keybinding to the Go to Line button (#21350)
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-11-30 00:50:38 +02:00
tims
5f29f214c3
linux: Fix file not opening from file explorer (#21137)
Closes #20070

Release Notes:

- Fixed issue where files wouldn't open from the file explorer.
- Fixed "Open a new workspace" option on the desktop entry right-click
menu.

Context:

Zed consists of two binaries:

- `zed` (CLI component, located at `crates/cli/main.rs`)
- `zed-editor` (GUI component, located at `crates/zed/main.rs`)

When `zed` is used in the terminal, it checks if an existing instance is
running. If one is found, it sends data via a socket to open the
specified file. Otherwise, it launches a new instance of `zed-editor`.
For more details, see the `detect` and `boot_background` functions in
`crates/cli/main.rs`.

Root Cause:

Install process creates directories like `.local/zed.app` and
`.local/zed-preview.app`, which contain desktop entries for the
corresponding release. For example, `.local/zed.app/share/applications`
contains `zed.desktop`.

This desktop entry includes a generic `Exec` field, which is correct by
default:

```sh
Comment=A high-performance, multiplayer code editor.
TryExec=zed
StartupNotify=true
```

The issue is in the `install.sh` script. This script copies the above
desktop file to the common directory for desktop entries
(.local/share/applications). During this process, it replaces the
`TryExec` value from `zed` with the exact binary path to avoid relying
on the shell's PATH resolution and to make it explicit.

However, replacement incorrectly uses the path for `zed-editor` instead
of the `zed` CLI binary. This results in not opening a file as if you
use `zed-editor` directly to do this it will throw `zed is already
running` error on production and open new instance on dev.


Note: This PR solves it for new users. For existing users, they will
either have to update `.desktop` file manually, or use `install.sh`
script again. I'm not aware of zed auto-update method, if it runs
`install.sh` under the hood.
2024-11-29 23:01:29 +02:00
tims
4bf59393ec
linux: Fix Zed not visible in "Open With" list in file manager for Flatpak (#21177)
- Closes #19030

When `%U` is used in desktop entries, file managers pick this and use
it:

- When you right-click a file and choose "Open with..."
- When you drag and drop files onto an application icon

<img
src="https://github.com/user-attachments/assets/ea5aa008-b81c-4f10-9302-b82332f6b174"
width="200px" alt="image">

Adding it to CLI args, changes Flatpak desktop entry `Exec` from:

```diff
- Exec=/usr/bin/flatpak run --branch=master --arch=x86_64 --command=zed dev.zed.ZedDev --foreground
+ Exec=/usr/bin/flatpak run --branch=master --arch=x86_64 --command=zed --file-forwarding dev.zed.ZedDev --foreground @@u %U @@
```

This is Flatpak's way of doing `%U`, by adding `--file-forwarding` and
wrapping arg with `@@u` and `@@`.
Read more below
([source](https://docs.flatpak.org/en/latest/flatpak-command-reference.html)):

> --file-forwarding
>
> If this option is specified, the remaining arguments are scanned, and
all arguments that are enclosed between a pair of '@@' arguments are
interpreted as file paths, exported in the document store, and passed to
the command in the form of the resulting document path. Arguments
between "@@u" and "@@" are considered URIs, and any "file:" URIs are
exported. The exports are non-persistent and with read and write
permissions for the application.

Release Notes:

- Fixed Zed not visible in the "Open with" list in the file manager for
Flatpak.
2024-11-29 22:59:04 +02:00
moshyfawn
aea6fa0c09
Remove project panel trash action for remote projects (#21300)
Closes #20845

I'm uncertain about my placement for the logic to remove actions from
the command palette list. If anyone has insights or alternative
approaches, I'm open to changing the code.

Release Notes:

- Removed project panel `Trash` action for remote projects.

---------

Co-authored-by: Finn Evers <dev@bahn.sh>
2024-11-29 22:37:24 +02:00
Danilo Leal
4137d1adb9
Make project search landing page scrollable if too small (#21338)
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
Address
https://github.com/zed-industries/zed/issues/21317#issuecomment-2508011556


https://github.com/user-attachments/assets/089844fc-a485-44a6-8e8b-d294f28e9ea2

Release Notes:

- N/A
2024-11-29 12:45:08 -03:00
Danilo Leal
1903a29cca
Expose "Column Git Blame" in the editor controls menu (#21336)
Closes https://github.com/zed-industries/zed/issues/10196

I think having this action exposed in the editor controls menu, close to
the inline Git Blame option, makes more sense than a more prominent item
somewhere else in the app. Maybe having it there will increase its
discoverability. I myself didn't know this until a few weeks ago! Next
steps would be ensuring the menu exposes its keybindings.

(Quick note about the menu item name: I think maybe "_Git Blame Column_"
would make more sense and feel grammatically more correct, but then we
would have two Git Blame-related options, one with "Git Blame" at the
start (Inline...) and another with "Git Blame" at the end (... Column).
I guess one had to be sacrificed for the sake of consistency 😅.)

<img width="750" alt="Screenshot 2024-11-29 at 12 01 33"
src="https://github.com/user-attachments/assets/2f3324ec-a2f0-4303-9582-714d0ee6bd31">

Release Notes:

- N/A
2024-11-29 12:38:12 -03:00
Danilo Leal
69c761f5a5
Adjust project search landing page layout (#21332)
Closes https://github.com/zed-industries/zed/issues/21317


https://github.com/user-attachments/assets/a4970c08-9715-4c90-ad48-8f6e80c6fcd0

Release Notes:

- N/A
2024-11-29 11:39:02 -03:00
Kirill Bulatov
0306bdc695
Use a single action for toggling the language (#21331)
Follow-up of https://github.com/zed-industries/zed/pull/21299

Release Notes:

- N/A
2024-11-29 16:02:57 +02:00
yoleuh
de55bd8307
Status bar: Reduce right tools lateral margin (#21329)
Closes #21316

| Before | After |
|--------|-------|
|
![image](https://github.com/user-attachments/assets/525d16b0-c1f0-4d93-9a8e-19112b927e78)|
![image](https://github.com/user-attachments/assets/c6947c3e-6b46-4498-a672-5f418f5faad0)|

Changes:
changed `Base08` to `Base04` in `render_right_tools`

Release Notes:

- N/A
2024-11-29 10:56:32 -03:00
Kirill Bulatov
a593a04da4
Update the lockfile after a recent dependency update (#21328)
Follow-up of https://github.com/zed-industries/zed/pull/21288

Release Notes:

- N/A
2024-11-29 15:39:18 +02:00
наб
74f265e5cf
Update to embed-resource 3.0 (fixes build below windows \?\ path) (#21288)
Accd'g to
https://github.com/zed-industries/zed/pull/9009#issuecomment-1983599232
the manifest is required

Followup for
https://github.com/nabijaczleweli/rust-embed-resource/issues/71

Release Notes:
- N/A
2024-11-29 14:43:40 +02:00
Haru Kim
f9d5de834a
Disable editor autoscroll on mouse clicks (#20287)
Closes #18148

Release Notes:

- Stop scrolling when clicking to the edges of the visible text area.
Use `autoscroll_on_clicks` to configure this behavior.


https://github.com/user-attachments/assets/3afd5cbb-5957-4e39-94c6-cd2e927038fd

---------

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2024-11-29 13:51:36 +02:00
Haru Kim
eadb107339
Allow workspace::ActivatePaneInDirection to navigate out of the terminal panel (#21313)
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
Enhancement for #21238

Release Notes:

- N/A
2024-11-29 13:04:58 +02:00
Stanislav Alekseev
94faf9dd56
nix: Return to building with crane (#21292)
This removes .envrc, putting it into gitignore as well as building with
crane, as it does not require an up to date hash for a FOD.

Release Notes:

- N/A

cc @mrnugget @jaredramirez
2024-11-29 10:09:33 +01:00
Kirill Bulatov
73f546ea5f
Force ashpd crate to not use tokio (#21315)
https://github.com/zed-industries/zed/issues/21304

Fixes a regression after
https://github.com/zed-industries/zed/pull/20939

Release Notes:

- N/A
2024-11-29 11:02:56 +02:00
mgsloan@gmail.com
454f38041a Update LiveKit repo reference to include patched webrtc
Specifically to pull in https://github.com/webrtc-sdk/webrtc/pull/156
2024-11-28 17:51:11 -07:00
Danilo Leal
eb2c0b33df
Fine-tune status bar left-side spacing (#21306)
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 https://github.com/zed-industries/zed/issues/21291

This PR also adds a small divider separating the panel-opening controls
from the other items that appear on the left side of the status bar. The
spacing was a bit bigger before because all three items on the left open
panels, whereas each other item does different things (e.g., open the
diagnostics tab, update the app, display language server status, etc.).
Therefore, they needed to be separated somehow to communicate the
difference in behavior. Hopefully, now, the border will help sort of
figuring this out.

| With error | Normal state |
|--------|--------|
| <img width="1179" alt="Screenshot 2024-11-28 at 18 52 58"
src="https://github.com/user-attachments/assets/bf4bad19-5588-481a-9d08-91b2227e44e6">
| <img width="1234" alt="Screenshot 2024-11-28 at 18 53 03"
src="https://github.com/user-attachments/assets/4443a16a-9982-44ce-9005-64d4df46f4f0">
|

Release Notes:

- N/A
2024-11-28 19:15:30 -03:00
Kirill Bulatov
4507a0d07a Merge branch 'main' into livekit-rust-sdk 2024-11-28 23:52:10 +02:00
Kirill Bulatov
9f90dabd4f Exclude Alsa static libraries from Zed Linux bundle 2024-11-28 23:51:39 +02:00
Danilo Leal
3458687300
Add keybinding to the language selector tooltip (#21299)
Just making sure sure we're always making keyboard navigation
discoverable.

<img width="700" alt="Screenshot 2024-11-28 at 16 05 40"
src="https://github.com/user-attachments/assets/bd7611f0-190c-4e3b-ad69-9552060e37ea">

Release Notes:

- N/A
2024-11-28 18:28:20 -03:00
Danilo Leal
e76589107d
Improve the "go to line" modal (#21301)
Just a small, mostly visual refinement to this component.

<img width="700" alt="Screenshot 2024-11-28 at 16 30 27"
src="https://github.com/user-attachments/assets/d5bbed63-202c-4cd3-b4b0-b7ed23466309">

Release Notes:

- N/A
2024-11-28 18:28:05 -03:00
Danilo Leal
ae85ecba2d
Make fetch slash command visible in the command selector (#21302)
The `/fetch` command is naturally already accessible via the completion
menu when you type / in the assistant panel, but it wasn't on the "Add
Context" command selector. I think it should! It's a super nice/powerful
one, and I've seen folks not knowing it existed. Side-note: maybe, in
the near future, it'd be best to rename it to "`/web`, as that's an
easier name to parse and assume what it does.

<img width="700" alt="Screenshot 2024-11-28 at 16 52 07"
src="https://github.com/user-attachments/assets/37134e1c-c788-48ca-81ae-d7416e8c8706">

Release Notes:

- N/A
2024-11-28 18:26:59 -03:00
Kirill Bulatov
0acd98a07e
Do not show cursor position for empty files (#21295)
Closes https://github.com/zed-industries/zed/issues/21289

Fixes most of the issues: does not display cursor position in empty
multi buffers and on non-full editors.

Does not fix the startup issue, as it's caused by the AssistantPanel's
`ContextEditor` acting as an `Editor`, so whenever default prompts are
added, those are registered as added editors, and Zed shows some line
numbers for them.

We cannot replace `item.act_as::<Editor>(cx)` with
`item.downcast::<Editor>()` as then multi bufers' navigation will fall
off (arguably, those line numbers do not make that much sense too, but
still seem useful).
This will will fix itself in the future, when assistant panel gets
reworked into readonly view by default, as `assistant2` crate already
shows (there's no `act_as` impl there and nothing cause issue).

Since the remaining issue is minor and will go away on any focus change,
and future changes will alter this, closing the original issue.

Release Notes:

- Improved cursor position display
2024-11-28 20:42:57 +02:00
Matin Aniss
4a96db026c
gpui: Implement hover for Windows (#20894)
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
2024-11-28 18:45:10 +02:00
Danilo Leal
301a8900a5
Add consistency between buffer and project search design (#20754)
Follow up to https://github.com/zed-industries/zed/pull/20242

This PR adds the `SearchInputWidth` util, which sets a threshold
container size in which an input's width stops filling the available
space. In practice, this is in place to make the buffer and project
search input fill the whole container width up to a certain point (where
this point is really an arbitrary number that can be fine-tuned per
taste). For folks using huge monitors, the UX isn't excellent if you
have a gigantic input.

In the future, upon further review, maybe it makes more sense to
reorganize this code better, baking it in as a default behavior of the
input component. Or even exposing this is a function many other
components could use, given we may want to have dynamic width in
different scenarios.

For now, I just wanted to make the design of these search UIs better and
more consistent.

| Buffer Search | Project Search |
|--------|--------|
| <img width="1042" alt="Screenshot 2024-11-15 at 20 39 21"
src="https://github.com/user-attachments/assets/f9cbf0b3-8c58-46d1-8380-e89cd9c89699">
| <img width="1042" alt="Screenshot 2024-11-15 at 20 39 24"
src="https://github.com/user-attachments/assets/ed244a51-ea55-4fe3-a719-a3d9cd119aa9">
|

Release Notes:

- N/A
2024-11-28 13:39:49 -03:00
Kirill Bulatov
f30944543e
Do less resolves when showing the completion menu (#21286)
Closes https://github.com/zed-industries/zed/issues/21205

Zed does completion resolve on every menu item selection and when
applying the edit, so resolving all completion menu list is excessive
indeed.

In addition to that, removes the documentation-centric approach of menu
resolves, as we're actually resolving these for more than that, e.g.
additionalTextEdits and have to do that always, even if we do not show
the documentation.

Potentially, we can omit the second resolve too, but that seems
relatively dangerous, and many servers remove the `data` after the first
resolve, so a 2nd one is not that harmful given that we used to do much
more

Release Notes:

- Reduced the amount of `completionItem/resolve` calls done in the
completion menu
2024-11-28 18:16:37 +02:00
Gowtham K
6cba467a4e
project-panel: Fix playback GIF images (#21274) 2024-11-28 03:20:10 -08:00
CharlesChen0823
cacec06db6
search: Treat non-word char as whole-char when searching (#19152)
when search somethings like `clone(`, with search options `match case
sensitively` and `match whole words` in zed code base, only `clone(cx)`
hit match, `clone()` will not hit math.

Release Notes:

- Improved buffer search for queries ending with non-letter characters
2024-11-28 11:06:48 +02:00