Commit log

88b0d3c markdown: Make `cx` the last parameter to the constructor (#21487)

Click to expand commit body
I noticed that `Markdown::new` didn't have the `cx` as the final
parameter, as is conventional.

This PR fixes that.

Release Notes:

- N/A

Marshall Bowers created

165d50f Add openbsd netcat to script/linux (#21478)

Click to expand commit body
- Follow-up to: https://github.com/zed-industries/zed/pull/20751

openbsd-netcat is required for interactive SSH Remoting prompts
(password, passphrase, 2fa, etc).

Peter Tripp created

731e6d3 Revert "macos: Add default keybind for ctrl-home / ctrl-end (#21007)" (#21476)

Click to expand commit body
This reverts commit 614b3b979b7373aaa6dee84dfbc824fce1a86ea8.

This conflicts with the macOS `ctrl-fn-left/right` bindings for moving
windows around (new in Sequoia).

If you want these use:
```
  {
    "context": "Editor",
    "bindings": {
      "ctrl-home": "editor::MoveToBeginning",
      "ctrl-end": "editor::MoveToEnd"
    }
  },
```

Release Notes:

- N/A

Conrad Irwin created

b28287c Fix panic in remove_item (#21480)

Click to expand commit body
In #20742 we added a call to remove_item that retain an item index over
an
await point. This led to a race condition that could panic if another
tab was
removed during that time. (cc @mgsloan)

This changes the API to make it harder to misuse.

Release Notes:

- Fixed a panic when closing tabs containing new unsaved files

Conrad Irwin created

492ca21 Fix panic in autoclosing (#21482)

Click to expand commit body
Closes #14961

Release Notes:

- Fixed a panic when backspacing at the start of a buffer with
`always_treat_brackets_as_autoclosed` enabled.

Conrad Irwin created

afb253b ui: Ensure `Label` with `single_line` set does not wrap (#21444)

Click to expand commit body
Release Notes:

- N/A

---

Split from #21438, this change for make sure the `single_line` mode
Label will not be wrap.

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>

Jason Lee and Marshall Bowers created

41a973b Publish theme json schema v0.2.0 (#21428)

Click to expand commit body
Fix theme json schema so `./script/import-themes print-schema` works again
Update schema to reflect current structs
([diff](https://gist.github.com/notpeter/26e6d0939985f542e8492458442ac62a/revisions?diff=unified&w=))

https://zed.dev/schema/themes/v0.2.0.json

Peter Tripp created

75c9dc1 Add textobjects queries (#20924)

Click to expand commit body
Co-Authored-By: Max <max@zed.dev>

Release Notes:

- vim: Added motions `[[`, `[]`, `]]`, `][` for navigating by section,
`[m`, `]m`, `[M`, `]M` for navigating by method, and `[*`, `]*`, `[/`,
`]/` for comments. These currently only work for languages built in to
Zed, as they are powered by new tree-sitter queries.
- vim: Added new text objects: `ic`, `ac` for inside/around classes,
`if`,`af` for functions/methods, and `g c` for comments. These currently
only work for languages built in to Zed, as they are powered by new
tree-sitter queries.

---------

Co-authored-by: Max <max@zed.dev>

Conrad Irwin and Max created

c443307 Fix ctrl-alt-X shortcuts (#21473)

Click to expand commit body
The macOS input handler assumes that you want to insert control
sequences when
you type ctrl-alt-X (you probably don't...).

Release Notes:

- (nightly only) fix ctrl-alt-X shortcuts

Conrad Irwin created

2dd5138 docs: Add anchor links for language-specific settings (#21469)

Peter Tripp created

a464474 Properly handle opening of file-less excerpts (#21465)

Click to expand commit body
Follow-up of https://github.com/zed-industries/zed/pull/20491 and
https://github.com/zed-industries/zed/pull/20469
Closes https://github.com/zed-industries/zed/issues/21369

Release Notes:

- Fixed file-less excerpts always opening instead of activating

Kirill Bulatov created

a0f2c07 Debounce diagnostics status bar updates (#21463)

Click to expand commit body
Closes https://github.com/zed-industries/zed/pull/20797

Release Notes:

- Fixed diagnostics status bar flashing when typing

Kirill Bulatov created

1270ef3 Enable toolchain venv in new terminals (#21388)

Click to expand commit body
Fixes part of issue #7808 

> This venv should be the one we automatically activate when opening new
terminals, if the detect_venv setting is on.

Release Notes:

- Selected Python toolchains (virtual environments) are now automatically activated in new terminals.

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>

Sebastian Nickels and Piotr Osiewicz created

a76cd77 Disable hunk diff arrow buttons when there's only one hunk (#21437)

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

| One hunk | Multiple hunks |
|--------|--------|
| <img width="800" alt="Screenshot 2024-12-03 at 09 42 49"
src="https://github.com/user-attachments/assets/7c2ff80a-d4d9-4a74-84b8-891fadfd4e6c">
| <img width="800" alt="Screenshot 2024-12-02 at 23 36 38"
src="https://github.com/user-attachments/assets/60ea94b8-0b23-43a2-afad-b816b4645d1f">
|

Release Notes:

- Fixed showing prev/next hunk navigation buttons when there is only one
hunk

Danilo Leal created

a8c7e61 Fix AI Context menu text wrapping causing overlap (#21438)

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

| Before | After |
| --- | --- |
| <img width="672" alt="SCR-20241203-jreb"
src="https://github.com/user-attachments/assets/411ba2a6-712f-4ab7-a320-12ac9a35c1e1">
| <img width="771" alt="SCR-20241203-jwhe"
src="https://github.com/user-attachments/assets/022c8ee9-4089-4c09-aa4b-12a0f5528822">
|

Release Notes:

- Fixed AI Context menu text wrapping causing overlap.

Also cc #21409 @WeetHet @osiewicz to use `Label`, this PR has been fixed
`Label` to ensure `whitespace_nowrap` when use `single_line`.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>

Jason Lee and Danilo Leal created

2b14378 Improve audio files icon (#21441)

Click to expand commit body
It took me a couple of minutes of staring at this speaker icon to figure
out it was a speaker! I even researched whether the `.wav` file type had
a specific icon, given I thought it was a specific triangle of sorts 😅
I'm sensing audio waves, at this size, will be easier to parse.

Release Notes:

- N/A

Danilo Leal created

b53b2c0 Run dependency review for pull requests only (#21432)

Click to expand commit body
This was an oversight in the original PR, dependency-review-action won't
work properly for `push` events
([example](https://github.com/zed-industries/zed/actions/runs/12130053580/job/33819624076)).

Release Notes:

- N/A

Cole Miller created

e1c509e Check for vulnerable dependencies in CI (#21424)

Click to expand commit body
This PR adds GitHub's dependency review action to CI, to flag PRs that
introduce new Cargo.lock entries for vulnerable crates according to the
GHSA database.

An alternative would be to run `cargo audit`, which checks against the
RustSec database. The state of synchronization between these two
databases seems a bit messy, but as far as I can tell GHSA has most
recent RustSec advisories on file, while RustSec is missing a larger
number of recent GHSA advisories.

The dependency review action should be smart enough not to flag PRs
because an untouched entry in Cargo.lock has a new advisory.

I've turned off the "license check" functionality since we have a
separate CI step for that.

Release Notes:

- N/A

Cole Miller created

f4dbcb6 Use explicit sort order instead of comparison impls for gpui prims (#21430)

Click to expand commit body
Found this while looking into adding support for the Surface primitive
on Linux, for rendering video shares. In that case it would be
expensive to compare images for equality. `Eq` and `PartialEq` were
being required but not used here due to use of `Ord` and `PartialOrd`.

Release Notes:

- N/A

Michael Sloan created

579bc8f Upgrade repl dependencies (#21431)

Click to expand commit body
Bump dependencies for jupyter packages. cc @maxdeviant 

Release Notes:

- N/A

Kyle Kelley created

7c994cd Add AutoIndent action and '=' vim operator (#21427)

Click to expand commit body
Release Notes:

- vim: Added the `=` operator, for auto-indent

Co-authored-by: Conrad <conrad@zed.dev>

Max Brunsfeld and Conrad created

f3140f5 assistant2: Wire up error messages (#21426)

Click to expand commit body
This PR wires up the error messages for Assistant 2 so that they are
shown to the user:

<img width="1138" alt="Screenshot 2024-12-02 at 4 28 02 PM"
src="https://github.com/user-attachments/assets/d8a5b9bd-0cef-4304-b561-b2edadbc70ef">
<img width="1138" alt="Screenshot 2024-12-02 at 4 29 09 PM"
src="https://github.com/user-attachments/assets/0dd70841-0d5a-4de6-bebe-82c563246b65">
<img width="1138" alt="Screenshot 2024-12-02 at 4 32 49 PM"
src="https://github.com/user-attachments/assets/a8838866-fad1-43a9-8935-490dc1936016">

@danilo-leal I kept the existing UX from Assistant 1, as I didn't see
any errors in the design prototype, but we can revisit if another
approach would work better.

Release Notes:

- N/A

Marshall Bowers created

72afe68 assistant: Use a smaller icon for the "New Chat" button (#21425)

Click to expand commit body
Assistant new chat icon is slightly larger than editor pane new icon.

Changes:
Adds `IconSize::Small` to assistant default size new chat icon, not
really noticeable, but matches the new icon in editor pane, and the
assistant dropdown menu that have icon size small.

|old|new|
|---|---|

|![image](https://github.com/user-attachments/assets/cbef5054-a465-4957-9409-b4a73e703363)|![image](https://github.com/user-attachments/assets/baee66ea-76d6-43b4-a4b9-ead34991ff85)|

Release Notes:

- N/A

yoleuh created

59dc6cf toolchains: Run listing tasks on background thread (#21414)

Click to expand commit body
Potentially fixes #21404

This is a speculative fix, as while I was trying to repro this issue
I've noticed that introducing artificial delays in ToolchainLister::list
could impact apps responsiveness. These delays were essentially there to
stimulate PET taking a while to find venvs.

Release Notes:

- Improved app responsiveness in environments with multiple Python
virtual environments

Piotr Osiewicz created

b88daae assistant2: Add support for using tools provided by context servers (#21418)

Click to expand commit body
This PR adds support to Assistant 2 for using tools provided by context
servers.

As part of this I introduced a new `ThreadStore`.

Release Notes:

- N/A

---------

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

Marshall Bowers and Cole created

f32ffcf workspace: Sanitize pinned tab count before usage (#21417)

Click to expand commit body
Fixes all sorts of panics around usage of incorrect pinned tab count
that has been fixed in app itself, yet persists in user db.

Closes #ISSUE

Release Notes:

- N/A

Piotr Osiewicz created

95a047c tasks/rust: Add support for running examples as binary targets (#21412)

Click to expand commit body
Closes #21044

Release Notes:

- Added support for running Rust examples as tasks.

Piotr Osiewicz created

dbe4182 Use proper terminal item for splitting context (#21415)

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

Release Notes:

- N/A

Kirill Bulatov created

7c40824 Fix macOS IME overlay positioning (#21416)

Click to expand commit body
Release Notes:

- Improved positioning of macOS IME overlay

---------

Co-authored-by: Richard Feldman <richard@zed.dev>

Conrad Irwin and Richard Feldman created

4e12f05 Fix dismissing the IME viewer with escape (#21413)

Click to expand commit body
Co-Authored-By: Richard Feldman <richard@zed.dev>

Closes #21392

Release Notes:

- Fixed dismissing the macOS IME menu with escape when no marked text
was present

---------

Co-authored-by: Richard Feldman <richard@zed.dev>

Conrad Irwin and Richard Feldman created

f795ce9 Add language icons to the language selector (#21298)

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

This is a first attempt to show the language icons to the selector.
Ideally, I wouldn't like to have yet another place mapping extensions to
icons, as we already have the `file_types.json` file doing that, but I'm
not so sure how to pull from it yet. Maybe in a future pass we'll
improve this and make it more solid.

<img width="700" alt="Screenshot 2024-11-28 at 16 10 27"
src="https://github.com/user-attachments/assets/683c3bef-5389-470f-a41e-3d510b927b61">

Release Notes:

- N/A

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>

Danilo Leal , Kirill Bulatov , and Piotr Osiewicz created

995b40f Add "Copy Extension ID" action to extension card dropdown (#21395)

Click to expand commit body
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>

uncenter and Marshall Bowers created

89e4639 workspace: Serialize active panel even if it's not visible (#21408)

Click to expand commit body
Fixes #21285

Closes #21285

Release Notes:

- Fixed workspace serialization of collapsed panels

Piotr Osiewicz created

3987d0d Treat `.pcss` files as CSS (#21402)

Click to expand commit body
This addresses
https://github.com/zed-industries/zed/pull/19416#discussion_r1865019293
and also follows the [associated PostCSS file extensions for VS
Code](https://github.com/csstools/postcss-language/blob/5d003170c5ed962b09b9a0f3725a6cae885df292/package.json#L37).

Release Notes:

- `.pcss` files are now recognized as CSS

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>

Finn Evers and Marshall Bowers created

6cb758a theme_importer: Add more mappings (#21393)

Click to expand commit body
This PR adds `search_match_background` and `editor_document_highlight_bracket_background` color mappings as they appear to be missing.

loczek created

0cb3a6e Add V file icon (#20017)

Click to expand commit body
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>

Delyan Angelov and Danilo Leal created

2300f40 Add consistent placeholder text for terminal inline assist (#21398)

Click to expand commit body
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

Danilo Leal created

dacd919 Add setting for making the tab's close button always visible (#21352)

Click to expand commit body
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

Danilo Leal created

740ba78 Fine-tune terminal tab bar actions spacing (#21391)

Click to expand commit body
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

Danilo Leal created

380679f Fix: Copilot Chat is logged out (#21360)

Click to expand commit body
Closes #21255

Release Notes:

- Fixed Copilot Chat OAuth Token parsing

---------

Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>

fred-sch and Bennet Bo Fenner created

89a5696 Fix typos in key-bindings documentation (#21390)

Click to expand commit body
Release Notes:

Fixes two minor typos in the key-bindings documentation.

moskirathe created

5f6b200 Do not change selections when opening FS entries (#21382)

Click to expand commit body
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

Kirill Bulatov created

4d54152 Docs: Update developing zed docs to match (#21379)

Click to expand commit body
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

yoleuh created

bf569d7 Always change editor selection when navigating outline panel entries (#21375)

Click to expand commit body
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

Kirill Bulatov created

28849dd Fix item closing overly triggering save dialogues (#21374)

Click to expand commit body
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

Kirill Bulatov created

c2cd84a Add musl-gcc as dependency (#21366)

Click to expand commit body
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>

Agustin Gomes created

d609931 linux: Fix mouse cursor size and blur on Wayland (#21373)

Click to expand commit body
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

tims created

fd71801 Improve JavaScript runnable detection followup (#21363)

Click to expand commit body
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

Remco Smits created

c1de606 Fix the `autoscroll_on_clicks` setting working incorrectly (#21362)

Haru Kim created

57a45d8 Add a keybinding to the Go to Line button (#21350)

Click to expand commit body
Release Notes:

- N/A

Kirill Bulatov created