Commit log

b4c2f29 Remove use of current `File` for new buffers that never have `File` (#20832)

Click to expand commit body
`create_buffer` calls `Buffer::local` which sets `file` to `None`
[here](https://github.com/zed-industries/zed/blob/f12981db32f9b936cd29e39ccc7f8a0b4e54cee1/crates/language/src/buffer.rs#L629).
So there's no point in then immediately attempting to update maps that
rely on `file` being present.

Release Notes:

- N/A

Michael Sloan created

8666ec9 ssh: Fix SSH to mac remotes (#20838)

Click to expand commit body
Restore ability to SSH to macOS arm remotes (`uname -m` on mac == `arm64`).
Fix regression introduced in https://github.com/zed-industries/zed/pull/20618

Peter Tripp created

889aac9 Snippet choices (#13958)

Click to expand commit body
Closes: #12739

Release Notes:

Solves #12739 by
- Enable snippet parsing to successfully parse snippets with choices
- Show completion menu when tabbing to a snippet variable with multiple
choices

Todo:
 - [x] Parse snippet choices
- [x] Open completion menu when tabbing to a snippet variable with
several choices (Thank you Piotr)
- [x] Get snippet choices to reappear when tabbing back to a previous
tabstop in a snippet
 - [x] add snippet unit tests
- [x] Add fuzzy search to snippet choice completion menu & update
completion menu based on choices
 - [x] add completion menu unit tests

Current State:

Using these custom snippets

```json
  "my snippet": {
      "prefix": "log",
      "body": ["type ${1|i32, u32|} = $2"],
      "description": "Expand `log` to `console.log()`"
  },
  "my snippet2": {
      "prefix": "snip",
      "body": [
        "type ${1|i,i8,i16,i64,i32|} ${2|test,test_again,test_final|} = $3"
      ],
      "description": "snippet choice tester"
    }
```

Using snippet choices:



https://github.com/user-attachments/assets/d29fb1a2-7632-4071-944f-daeaa243e3ac

---------

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

Anthony Eid , Piotr Osiewicz , and Piotr Osiewicz created

5b9916e ci: Add shellcheck for scripts (#20631)

Click to expand commit body
Fixes shellcheck errors in script/*
Adds a couple trailing newlines.
Adds `script/shellcheck-scripts` and associated CI machinery.
Current set ultra-conservative, does not output warnings, only errors.

Peter Tripp created

5b317f6 Improve install-cmake script (#20836)

Click to expand commit body
- Don't output junk to stderr when cmake unavailable
- Kitware PPA does not include up to date bins for all distros (e.g.
Ubuntu 24 only has 3.30.2 although 3.30.4 has been out for a while) so
don't try to force install a specific version. Take the best we can get.

Peter Tripp created

e2552b9 collab: Bypass account age check for users with active LLM subscriptions (#20837)

Click to expand commit body
This PR makes it so users with an active LLM subscription can bypass the
account age check.

Release Notes:

- N/A

Marshall Bowers created

3789918 Adjust file finder width configuration (#20819)

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

This PR tweaks the setting value, so it's clear we're referring to
`max-width`, meaning the width will change up to a specific value
depending on the available window size. Then, it also makes `Small` the
default value, which, in practice, makes the modal size the same as it
was before the original PR linked above.

Release Notes:

- N/A

---------

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>

Danilo Leal and Kirill Bulatov created

d265e44 Don't treat absence of a file on fs as conflict for new files from CLI (#20828)

Click to expand commit body
Closes #20827

Release Notes:

- Fixes bug where save for new files created via CLI would report a
conflict and ask about overwriting.

Michael Sloan created

f12981d docs: Add Language extension config TBDs (To Be Documented) (#20829)

Click to expand commit body
Release Notes:

- N/A

Peter Tripp created

d99f5fe Add `File.disk_state` enum to clarify filesystem states (#20776)

Click to expand commit body
Motivation for this is to make things more understandable while figuring
out #20775.

This is intended to be a refactoring that does not affect behavior, but
there are a few tricky spots:

* Previously `File.mtime()` (now `File.disk_state().mtime()`) would
return last known modification time for deleted files. Looking at uses,
I believe this will not affect anything. If there are behavior changes
here I believe they would be improvements.

* `BufferEvent::DirtyChanged` is now only emitted if dirtiness actually
changed, rather than if it may have changed. This should only be an
efficiency improvement.

Release Notes:

- N/A

Co-authored-by: Mikayla Maki <mikayla@zed.dev>

Michael Sloan and Mikayla Maki created

df1d0de ocaml: Extract to zed-extensions/ocaml repository (#20825)

Click to expand commit body
This PR extracts the OCaml extensions to the
[zed-extensions/ocaml](https://github.com/zed-extensions/ocaml)
repository.

Release Notes:

- N/A

Marshall Bowers created

ad94ad5 ocaml: Bump to v0.1.1 (#20823)

Click to expand commit body
This PR bumps the OCaml extension to v0.1.1.

Changes:

- https://github.com/zed-industries/zed/pull/20700

Release Notes:

- N/A

Marshall Bowers created

0e7770a theme: Add color `darken` function (#20746)

Click to expand commit body
This PR adds a `darken` function that allows to reduce the lightness of
a color by a certain factor. This popped up as I wanted to add hover
styles to tinted-colors buttons.

Release Notes:

- N/A

Danilo Leal created

3f905d5 assistant: Adjust title summarization prompt (#20822)

Click to expand commit body
Meant to avoid the excessive use of "Here's a concise 3-7 word title..."
and "Title:" instances we've been seeing lately.
Follow up to: https://github.com/zed-industries/zed/pull/19530

Release Notes:

- Improve prompt for generating title summaries, avoiding preambles

Danilo Leal created

f01a86c Support for Back/Forward multimedia keys (#20695)

Click to expand commit body
- Added Support for Back/Forward multimedia keys (Linux)

Peter Tripp created

5fd7afb docs: More language extension config.toml key documentation (#20818)

Click to expand commit body
Release Notes:

- N/A

Peter Tripp created

9260aba Use `HashMap<ProjectEntryId, Entry>` instead of `HashSet<Entry>` in outline_panel (#20780)

Click to expand commit body
Came across this because I noticed that `Entry` implements `Hash`, which
was surprising to me. I believe that `ProjectEntryId` should be unique
and so it seems better to dedupe based on this.

Release Notes:

- N/A

Michael Sloan created

d92166f Revert "Use livekit's Rust SDK instead of their swift SDK (#13343)" (#20809)

Click to expand commit body
Issues found:

* audio does not work well with various set-ups using USB
* switching audio during initial join may leave the client with no audio
at all
* audio streaming is done on the main thread, beachballing certain
set-ups
* worse screenshare quality (seems that there's no dynamic scaling
anymore, compared to the Swift SDK)

This reverts commit 1235d0808ed7697874085fc8528f22aec988c85e.

Release Notes:

- N/A

Kirill Bulatov created

59a355d docs: Update Svelte extension link (#20804)

Click to expand commit body
Closes #20768

Release Notes:

- N/A

moshyfawn created

ee207ab Map "feature upsell" events to the new "Noun Verbed" format (#20787)

Click to expand commit body
Release Notes:

- N/A

Nathan Sobo created

31566cb Add width setting for the file finder (#18682)

Click to expand commit body
This PR adds the ability to adjust the width of the file finder popup. I
found when searching my projects the default width was not always wide
enough and there was no option to change it.

It allows values `small`, `medium` (default), `large`, `xlarge`, and
`full`

Release Notes:

- Added a setting to adjust the width of the file finder modal


Example Setting:
```json
  "file_finder": {
    "modal_width": "medium"
  },
```

Screenshots can be found in the comments below.

Isaac Donaldson created

2d34765 lsp: Retrieve links to documentation for the given symbol (#19233)

Click to expand commit body
Closes #18924 

Release Notes:

- Added an `editor:OpenDocs` action to open links to documentation via
rust-analyzer

Lu Wan created

f9990b4 Send events to Snowflake in the format they're expected by Amplitude (#20765)

Click to expand commit body
This will allow us to use the events table directly in Amplitude, which
lets us use the newer event ingestion flow that detects changes to the
table. Otherwise we'll need a transformation.

I think Amplitude's API is probably a pretty good example to follow for
the raw event schema, even if we don't end up using their product. They
also recommend a "Noun Verbed" format for naming events, so I think we
should go with this. This will help us be consistent and encourage the
author of events to think more clearly about what event they're
reporting.

cc @ConradIrwin 

Release Notes:

- N/A

Nathan Sobo created

97e9137 Update references of Ollama Llama 3.1 to model Llama 3.2 (#20757)

Click to expand commit body
Release Notes:

- N/A

Siddharth M. Bhatia created

932c7e2 gpui: Fix SVG color render, when color have alpha (#20537)

Click to expand commit body
Release Notes:

- N/A


## Demo

- [Source
SVG](https://github.com/user-attachments/assets/1c681e01-baba-4613-a3e7-ea5cb3015406)
click here open in browser.

| Before | After |
| --- | --- |
| <img width="1212" alt="image"
src="https://github.com/user-attachments/assets/ba323b13-538b-4a34-bb64-9dcf490aface">
| <img width="1212" alt="image"
src="https://github.com/user-attachments/assets/4635926a-843e-426d-89a1-4e9b4f4cc37e">
|

---------

Co-authored-by: Floyd Wang <gassnake999@gmail.com>

Jason Lee and Floyd Wang created

65a9c8d Dynamic tab bar height (#19076)

Click to expand commit body
Tracking issue: https://github.com/zed-industries/zed/issues/18078

Release Notes:

- Change tab bar height according to `ui-density`

---------

Signed-off-by: Aaron Ruan <aaron212cn@outlook.com>

Aaron Ruan created

33f09ba Highlight `?` and `:` in ternary expressions as operator in JavaScript, TypeScript, and TSX (#20573)

Click to expand commit body
Closes #ISSUE

Release Notes:

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

狐狸 created

792c1e4 gpui: Add paint_path example (#20499)

Click to expand commit body
Release Notes:

- N/A

---

```
cargo run -p gpui --example painting
```

I added this demo to verify the detailed support of Path drawing in
GPUI.

Because of, when we actually used GPUI to draw a 2D line chart, we found
that the straight line Path#line_to did not support `anti-aliasing`, and
the drawn line looked very bad.

As shown in the demo image, if we zoom in on the image, we can clearly
see that all the lines are jagged.

I read and tried to make some appropriate adjustments to the functions
in Path, but since I have no experience in the graphics field, I still
cannot achieve anti-aliasing support so far.

I don't know if I used it wrong somewhere. I checked `curve_to` and
found that the curves drawn have anti-aliasing effects, as shown in the
arc part of the figure below.

<img width="1136" alt="image"
src="https://github.com/user-attachments/assets/4dfb7603-e746-43e9-b737-cff56b56329f">

Jason Lee created

b421ffa Windows: Add transparency effect (#20400)

Click to expand commit body
Release Notes:

- Added Transparency effect for Windows #19405 


![image](https://github.com/user-attachments/assets/b0750020-5a89-48c9-b26e-13b30874cf8d)


![image](https://github.com/user-attachments/assets/80609a14-b8c3-4159-b909-1e61f4c3eac3)

---------

Co-authored-by: thedeveloper-sharath <35845141+thedeveloper-sharath@users.noreply.github.com>

Gowtham K and thedeveloper-sharath created

21c785e Add more common Prettier plugin base paths (#20758)

Click to expand commit body
Closes #19024

Release Notes:
- Added some more common Prettier plugin base paths

SweetPPro created

516f7b3 Add Loading and Fallback States to Image Elements (via StyledImage) (#20371)

Click to expand commit body
@iamnbutler edit:

This pull request enhances the image element by introducing the ability
to display loading and fallback states.

Changes:

- Implemented the loading and fallback states for image elements using
`.with_loading` and `.with_fallback` respectively.
- Introduced the `StyledImage` trait and `ImageStyle` to enable a fluent
API for changing image styles across image types (`Img`,
`Stateful<Img>`, etc).

Example Usage:

```rust
fn loading_element() -> impl IntoElement {
    div().size_full().flex_none().p_0p5().rounded_sm().child(
        div().size_full().with_animation(
            "loading-bg",
            Animation::new(Duration::from_secs(3))
                .repeat()
                .with_easing(pulsating_between(0.04, 0.24)),
            move |this, delta| this.bg(black().opacity(delta)),
        ),
    )
}

fn fallback_element() -> impl IntoElement {
    let fallback_color: Hsla = black().opacity(0.5);

    div().size_full().flex_none().p_0p5().child(
        div()
            .size_full()
            .flex()
            .items_center()
            .justify_center()
            .rounded_sm()
            .text_sm()
            .text_color(fallback_color)
            .border_1()
            .border_color(fallback_color)
            .child("?"),
    )
}

impl Render for ImageLoadingExample {
    fn render(&mut self, _cx: &mut ViewContext<Self>) -> impl IntoElement {
        img("some/image/path")
            .id("image-1")
            .with_fallback(|| Self::fallback_element().into_any_element())
            .with_loading(|| Self::loading_element().into_any_element())
    }
}
```

Note:

An `Img` must have an `id` to be able to add a loading state.

Release Notes:

- N/A

---------

Co-authored-by: nate <nate@zed.dev>
Co-authored-by: michael <michael@zed.dev>
Co-authored-by: Nate Butler <iamnbutler@gmail.com>
Co-authored-by: Antonio Scandurra <me@as-cii.com>

Mikayla Maki , nate , michael , Nate Butler , and Antonio Scandurra created

f348773 Fix tab strikethrough logic (#20755)

Click to expand commit body
This fix was in downstream commits before splitting out #20711, should
have tested locally before merging.

Release Notes:

- N/A

Michael Sloan created

6e296eb ssh: Use openbsd nc on macOS (#20751)

Click to expand commit body
Co-authored-by: Conrad Irwin <conrad@zed.dev>

Peter Tripp and Conrad Irwin created

4c8c6c0 docs: Fix assistant prompt_overrides template directory (#20434)

Click to expand commit body
Update docs to reflect the correct path for prompt handlebars templates.
Link to git repo for prompts rather than including an out of date version inline.

Co-authored-by: Peter Tripp <peter@zed.dev>

Wes Higbee and Peter Tripp created

050ce91 Rename "Overwrite" to "Save" for prompt about recreating a deleted file (#20750)

Click to expand commit body
Release Notes:

- N/A

Michael Sloan created

369828f Require save confirmation and prevent autosave for deleted files (#20742)

Click to expand commit body
* `has_conflict` will now return true if the file has been deleted on
disk.  This is for treating multi-buffers as conflicted, and also
blocks auto-save.

* `has_deleted_file` is added so that the single-file buffer save can
specifically mention the delete conflict. This does not yet handle
discard (#20745).

Closes #9101
Closes #9568
Closes #20462

Release Notes:

- Improved handling of externally deleted files: auto-save will be
disabled, multibuffers will treat this as a save conflict, and single
buffers will ask for restore confirmation.

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

Michael Sloan and Conrad created

ac5ecf5 Don't log every value (#20744)

Click to expand commit body
Release Notes:

- N/A

Conrad Irwin created

1235d08 Use livekit's Rust SDK instead of their swift SDK (#13343)

Click to expand commit body
See https://github.com/livekit/rust-sdks/pull/355

Todo:

* [x] make `call` / `live_kit_client` crates use the livekit rust sdk
* [x] create a fake version of livekit rust API for integration tests
* [x] capture local audio
* [x] play remote audio
* [x] capture local video tracks
* [x] play remote video tracks
* [x] tests passing
* bugs
* [x] deafening does not work
(https://github.com/livekit/rust-sdks/issues/359)
* [x] mute and speaking status are not replicated properly:
(https://github.com/livekit/rust-sdks/issues/358)
* [x] **linux** - crash due to symbol conflict between WebRTC's
BoringSSL and libcurl's openssl
(https://github.com/livekit/rust-sdks/issues/89)
* [x] **linux** - libwebrtc-sys adds undesired dependencies on `libGL`
and `libXext`
* [x] **windows** - linker error, maybe related to the C++ stdlib
(https://github.com/livekit/rust-sdks/issues/364)
        ```
libwebrtc_sys-54978c6ad5066a35.rlib(video_frame.obj) : error LNK2038:
mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't
match value 'MD_DynamicRelease' in
libtree_sitter_yaml-df6b0adf8f009e8f.rlib(2e40c9e35e9506f4-scanner.o)
        ```
    * [x] audio problems

Release Notes:

- Switch from Swift to Rust LiveKit SDK 🦀

---------

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
Co-authored-by: Conrad Irwin <conrad@zed.dev>
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Co-authored-by: Michael Sloan <michael@zed.dev>

Max Brunsfeld , Mikayla Maki , Conrad Irwin , Kirill Bulatov , and Michael Sloan created

6ff69fa Start to send data to Snowflake too (#20698)

Click to expand commit body
This PR adds support for sending telemetry events to AWS Kinesis.

In our AWS account we now have three new things:
* The [Kinesis data
stream](https://us-east-1.console.aws.amazon.com/kinesis/home?region=us-east-1#/streams/details/zed-telemetry/monitoring)
that we will actually write to.
* A [Firehose for
Axiom](https://us-east-1.console.aws.amazon.com/firehose/home?region=us-east-1#/details/telemetry-to-axiom/monitoring)
that sends events from that stream to Axiom for ad-hoc queries over
recent data.
* A [Firehose for
Snowflake](https://us-east-1.console.aws.amazon.com/firehose/home?region=us-east-1#/details/telemetry-to-snowflake/monitoring)
that sends events from that stream to Snowflake for long-term retention.
This Firehose also backs up data into an S3 bucket in case we want to
change how the system works in the future.

In a follow-up PR, we'll add support for ad-hoc telemetry events; and
slowly move away from the current Clickhouse defined schemas; though we
won't move off click house until we have what we need in Snowflake.

Co-Authored-By: Nathan <nathan@zed.dev>

Release Notes:

- N/A

Conrad Irwin created

f449e8d Migrate Renovate config (#20741)

Click to expand commit body
The Renovate config in this repository needs migrating. Typically this
is because one or more configuration options you are using have been
renamed.

You don't need to merge this PR right away, because Renovate will
continue to migrate these fields internally each time it runs. But later
some of these fields may be fully deprecated and the migrations removed.
So it's a good idea to merge this migration PR soon.





🔕 **Ignore**: Close this PR and you won't be reminded about config
migration again, but one day your current config may no longer be valid.

❓ Got questions? Does something look wrong to you? Please don't hesitate
to [request help
here](https://redirect.github.com/renovatebot/renovate/discussions).


---

Release Notes:

- N/A

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>

renovate[bot] , renovate[bot] , and Marshall Bowers created

da09cbd assistant: Show more details for assist errors (#20740)

Click to expand commit body
This PR updates the Assistant to show more detailed error messages when
the user encounters an assist error.

Here are some examples:

<img width="415" alt="Screenshot 2024-11-15 at 1 47 03 PM"
src="https://github.com/user-attachments/assets/5e7c5d5f-bd78-4af3-86ed-af4c6712770f">

<img width="417" alt="Screenshot 2024-11-15 at 2 11 14 PM"
src="https://github.com/user-attachments/assets/02cb659b-1239-4e24-865f-3a512703a94f">

The notification will scroll if the error lines overflow the set maximum
height.

Release Notes:

- Updated the Assistant to show more details in error cases.

Marshall Bowers created

4327459 Fix Rust LSP adapter on FreeBSD (#20736)

Click to expand commit body
This PR fixes the Rust LSP adapter on FreeBSD. This issue was creating
build errors.

Release Notes:

- Fixed Rust LSP adapter on FreeBSD

Caleb Heydon created

cc601bd Use strikethrough style in label implementation (#20735)

Click to expand commit body
Release Notes:

- N/A

---------

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

Michael Sloan , Richard Feldman , and Marshall Bowers created

c491b75 assistant: Fix panic when using `/project` (#20733)

Click to expand commit body
This PR fixes a panic when using `/project` (which is staff-flagged).

We weren't initializing the `SemanticDb` global if the
`project-slash-command` feature flag was enabled.

Closes #20563.

Release Notes:

- N/A

Marshall Bowers created

3420ebb util: Remove unused code (#20734)

Click to expand commit body
This PR removes the `with_clone` macro from `util`, as it wasn't used
(and isn't needed).

Release Notes:

- N/A

Marshall Bowers created

b23d72e gpui: Clean up `Styled` doc comments (#20731)

Click to expand commit body
This PR cleans up the doc comments on the `Styled` trait to make them
more consistent.

Release Notes:

- N/A

Marshall Bowers created

e25a03c docs: Variable escaping in tasks (#20730)

Peter Tripp created

9e8ff3f Update `.mailmap` (#20729)

Click to expand commit body
This PR updates the `.mailmap` file to merge some more commit authors.

Release Notes:

- N/A

Marshall Bowers created

6d80d5b gpui: Add `line_through` method to `Styled` (#20728)

Click to expand commit body
This PR adds a `.line_through` method to the `Styled` trait that mirrors
the corresponding Tailwind class.

Release Notes:

- N/A

Marshall Bowers created

7137bde Fix scrollbar not always being on top (#20665)

Click to expand commit body
Set the elevation of the scrollbar to 1 borderless, so that the blue
outline is no longer above the scrollbar.

Closes #19875

Release Notes:

- N/A

---------

Co-authored-by: Peter Tripp <peter@zed.dev>

TOULAR and Peter Tripp created