Commit log

ae696c8 zed 0.143.2

Peter Tripp created

9b84af1 Fix delay when changing scrolling direction (#13867)

Click to expand commit body
Fixes: #13720.

Co-authored-by: Antonio Scandurra <antonio@zed.dev>

Peter Tripp and Antonio Scandurra created

29a5111 Bump to 0.143.1 for @ConradIrwin

Zed Bot created

dbf2965 fix duplicated code

Mikayla Maki created

3eec525 Linux window decorations (#13611)

Click to expand commit body
This PR adds support for full client side decorations on X11 and Wayland

TODO:
- [x] Adjust GPUI APIs to expose CSD related information
- [x] Implement remaining CSD features (Resizing, window border, window
shadow)
- [x] Integrate with existing background appearance and window
transparency
- [x] Figure out how to check if the window is tiled on X11
- [x] Implement in Zed
- [x] Repeatedly maximizing and unmaximizing can panic
- [x] Resizing is strangely slow
- [x] X11 resizing and movement doesn't work for this:
https://discord.com/channels/869392257814519848/1204679850208657418/1256816908519604305
- [x] The top corner can clip with current styling
- [x] Pressing titlebar buttons doesn't work
- [x] Not showing maximize / unmaximize buttons
- [x] Noisy transparency logs / surface transparency problem
https://github.com/zed-industries/zed/pull/13611#issuecomment-2201685030
- [x] Strange offsets when dragging the project panel
https://github.com/zed-industries/zed/pull/13611#pullrequestreview-2154606261
- [x] Shadow inset with `_GTK_FRAME_EXTENTS` doesn't respect tiling on
X11 (observe by snapping an X11 window in any direction)

Release Notes:

- N/A

---------

Co-authored-by: conrad <conrad@zed.dev>
Co-authored-by: Owen Law <81528246+someone13574@users.noreply.github.com>
Co-authored-by: apricotbucket28 <71973804+apricotbucket28@users.noreply.github.com>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>

Mikayla Maki , conrad , Owen Law , apricotbucket28 , and Conrad Irwin created

c59098f Linux builds on stable (#13744)

Click to expand commit body
Release Notes:

- First beta version of Linux

Conrad Irwin created

443f423 v0.143.x preview

Peter Tripp created

38fb841 Use regex to properly select Go test runnable (#13750)

Click to expand commit body
This is already done when selecting a subtest; by wrapping the test name
with `^{}$` the runnable will avoid selecting additional tests with the
same prefix.

Without this fix, selecting the runnable for `TestExample` will also run
`TestExample2`.

Release Notes:

- Fixed Golang tasks spawning tests starting with the current function name and not using the exact match.

Connor Finnell created

48763d0 vim: Add vim bindings for outline panel (#13763)

Click to expand commit body
Release Notes:

- vim: Add vim bindings for outline panel #13763

Xiaoguang Wang created

089cc85 Use a dedicated test extension in extension tests (#13781)

Click to expand commit body
This PR updates the `extension` crate's tests to use a dedicated test
extension for its tests instead of the real Gleam extension.

As the Gleam extension continues to evolve, it makes it less suitable to
use as a test fixture:

1. For a while now, the test has failed locally due to me having `gleam`
on my $PATH, which causes the extension's `get_language_server_command`
to go down a separate codepath.
2. With the addition of the `indexed_docs_providers` the test was
hanging indefinitely.

While these problems are likely solvable, it seems reasonable to have a
dedicated extension to use as a test fixture. That way we can do
whatever we need to exercise our test criteria.

The `test-extension` is a fork of the Gleam extension with some
additional functionality removed.

Release Notes:

- N/A

Marshall Bowers created

995b082 Change `tool_calls` to be an Option in response (#13778)

Click to expand commit body
Here is an image of my now getting assistance responses!

![2024-07-03_08-45-37_swappy](https://github.com/zed-industries/zed/assets/20910163/904adc51-cb40-4622-878e-f679e0212426)

I ended up adding a function to handle the use case of not serializing
the tool_calls response if it is either null or empty to keep the
functionality of the existing implementation (not deserializing if vec
is empty). I'm sorta a noob, so happy to make changes if this isn't done
correctly, although it does work and it does pass tests!

Thanks a bunch to [amtoaer](https://github.com/amtoaer) for pointing me
in the direction on how to fix it.

Release Notes:

- Fixed some responses being dropped from OpenAI-compatible providers
([#13741](https://github.com/zed-industries/zed/issues/13741)).

Allison Durham created

64755a7 linux/x11: Custom run loop with `mio` instead of `calloop` (#13646)

Click to expand commit body
This changes the implementation of the X11 client to use `mio`, as a
polling mechanism, and a custom run loop instead of `calloop` and its
callback-based approach.

We're doing this for one big reason: more control over how we handle
events.

With `calloop` we don't have any control over which events are processed
when and how long they're processes for. For example: we could be
blasted with 150 input events from X11 and miss a frame while processing
them, but instead of then drawing a new frame, calloop could decide to
work off the runnables that were generated from application-level code,
which would then again cause us to be behind.

We kinda worked around some of that in
https://github.com/zed-industries/zed/pull/12839 but the problem still
persists.

So what we're doing here is to use `mio` as a polling-mechanism. `mio`
notifies us if there are X11 on the XCB connection socket to be
processed. We also use its timeout mechanism to make sure that we don't
wait for events when we should render frames.

On top of `mio` we now have a custom run loop that allows us to decide
how much time to spend on what — input events, rendering windows, XDG
events, runnables — and in what order we work things off.

This custom run loop is consciously "dumb": we render all windows at the
highest frame rate right now, because we want to keep things predictable
for now while we test this approach more. We can then always switch to
more granular timings. But considering that our loop runs and checks for
windows to be redrawn whenever there's an event, this is more an
optimization than a requirement.

One reason for why we're doing this for X11 but not for Wayland is due
to how peculiar X11's event handling is: it's asynchronous and by
default X11 generates synthetic events when a key is held down. That can
lead to us being flooded with input events if someone keeps a key
pressed.

So another optimization that's in here is inspired by [GLFW's X11 input
handling](https://github.com/glfw/glfw/blob/b35641f4a3c62aa86a0b3c983d163bc0fe36026d/src/x11_window.c#L1321-L1349):
based on a heuristic we detect whether a `KeyRelease` event was
auto-generated and if so, we drop it. That essentially halves the amount
of events we have to process when someone keeps a key pressed.

Release Notes:

- N/A

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Conrad <conrad@zed.dev>

Thorsten Ball , Conrad Irwin , and Conrad created

3348c3a vim: Support for q and @ (#13761)

Click to expand commit body
Fixes: #1504

Release Notes:

- vim: Support for macros (`q` and `@`) to record and replay (#1506,
#4448)

Conrad Irwin created

dceb082 Rename `ExtensionDocsIndexer` to `ExtensionIndexedDocsProvider` (#13776)

Click to expand commit body
This PR renames `ExtensionDocsIndexer` to `ExtensionIndexedDocsProvider`
to better align with the name of the trait it implements.

Release Notes:

- N/A

Marshall Bowers created

c1e1805 gpui: Prefer integrated GPUs on Intel Mac (#13685)

Click to expand commit body
On Intel, Metal will pick a discrete GPU by default when available,
resulting in higher power consumption and heat output. Prefer
non‐removable low‐power devices to correct this.

On Apple Silicon, there is only ever one GPU, so there is no functional
change.

I didn’t do intensive benchmarking of this or anything, but Zed still
seems responsive and it stops my MacBook Pro acting as a combination
space heater–jet engine.

Thanks to @denlukia for showing that this is easy to fix; I’ve marked
you as a co‐author, I hope that’s okay.

Closes: #5124



Release Notes:

- Improved power consumption on Intel Macs by preferring integrated GPUs
over the discrete GPUs.
([#5124](https://github.com/zed-industries/zed/issues/5124)).

Co-authored-by: Denis Lukianenko <denlyk1@gmail.com>

Emily and Denis Lukianenko created

351a3c0 docs: Improve default settings comments (#13749)

Click to expand commit body
- Add the phrase "compact folders" to `auto_fold_dirs` to enhance
searchability.
- Fix `buffer_line_height` copy pasta

Release Notes:

- N/A

Peter Tripp created

28c5e33 JSON: Fix validation being disabled following #13459 (#13770)

Click to expand commit body
The problem with #13459 was the bump to a newer JSON LS version, which
requires explicitly opting into validation.

Release Notes:

- Fixed JSON validation being disabled by default (Preview only)

Piotr Osiewicz created

5c7a8f7 Allow extensions to define providers for indexing docs (#13755)

Click to expand commit body
This PR provides extensions with the ability to define providers for
indexing docs.

Release Notes:

- N/A

Marshall Bowers created

b7cb238 Log extension queries to axiom (#13752)

Click to expand commit body
Log extension queries to axiom. Longer term it'd be nice to get this in
clickhouse, but that requires a bit more work.

Release Notes:

- N/A

Conrad Irwin created

7db6854 Update Platform Controls (#13751)

Click to expand commit body
Continuing from #13597, this PR refactors platform controls to extract a
generic set of platform controls that can be used for any platform that
does not define it's own/we don't use the system ones.

In the future, these controls will likely be used as a fallback on
windows as well when the windows icon font isn't available.

Release Notes:

- Added updated window controls on Linux

Nate Butler created

eb845ee Send telemetry events for pnpm usage (#13748)

Click to expand commit body
This PR adds telemetry events for pnpm usage, similar to what we did for
Yarn in #12785.

Seems like useful information to have.

Release Notes:

- N/A

Marshall Bowers created

8ea2bd4 Organize dependencies in workspace `Cargo.toml` (#13746)

Click to expand commit body
This PR does some organization in the workspace's `Cargo.toml`.

Namely, ensuring the dependency lists of internal and external
dependencies remain separate.

Release Notes:

- N/A

Marshall Bowers created

7460381 Start work on genericizing `/rustdoc` (#13745)

Click to expand commit body
This PR begins the process of making the backing infrastructure for the
`/rustdoc` command more generic such that it can be applied to
additional documentation providers.

In this PR we:

- Rename the `rustdoc` crate to `indexed_docs` as a more general-purpose
name
- Start moving rustdoc-specific functionality into
`indexed_docs::providers::rustdoc`
- Add an `IndexedDocsRegistry` to hold multiple `IndexedDocsStore`s (one
per provider)

We haven't yet removed the rustdoc-specific bits in the `DocsIndexer`.
That will follow soon.

Release Notes:

- N/A

Marshall Bowers created

eab98eb prisma: Bump to v0.0.3 (#13739)

Click to expand commit body
This PR bumps the Prisma extension to v0.0.3.

Changes:

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

Release Notes:

- N/A

Marshall Bowers created

6eda9c9 prisma: Fix autocompletion adding word character (#13738)

Click to expand commit body
Fixes https://github.com/zed-industries/zed/issues/13662.

Release Notes:

- N/A

Krzysztof Witkowski created

8dd7c2c Fix typo in show_whitespaces docs in default setting (#13735)

Click to expand commit body
Release Notes:

- N/A

Andrei N. Onea created

3bbe574 Introduce a New `assistant: insert into editor` Action (#13467)

Click to expand commit body
This implements the functionality (paired with @as-cii), but we weren't
sure what the clearest name would be for the action. It's essentially
the inverse of "quote selection" - but what's the opposite of quoting
the selection?

One idea:
* Rename "quote selection" to "Insert **into** assistant"
* Name this "Insert **from** assistant"

Release Notes:

- Added action to insert from assistant into editor (default keybinding:
`cmd-<` on macOS, `ctrl-<` on Linux)

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Bennet <bennet@zed.dev>

Richard Feldman , Antonio Scandurra , and Bennet created

51ee60b assistant: Feature flag terminal inline assistant (#13732)

Click to expand commit body
This PR adds a feature flag for the terminal inline assistant because we
want to keep it internal for now.

Release Notes:

- N/A

Bennet Bo Fenner created

193be27 Fix focusing terminal when running tasks (#13675)

Click to expand commit body
After removing the unnecessary reveal strategy handling:



[focus-task-fix.webm](https://github.com/zed-industries/zed/assets/39293/93afd332-8f22-47f5-914d-5bc040e24029)

When running tasks, the terminal was not focused when the terminal had
to be replaced. This is because the code for revealing the terminal had
been executed twise: once inside `replace_terminal` function and also at
the end of `spawn_task`.

Fixes #13674

Release Notes:

- Fixed focusing the terminal when re-spawning a task
([#13674](https://github.com/zed-industries/zed/issues/13674))

Aleksei Gusev created

ce48555 Update `.mailmap` (#13724)

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

Release Notes:

- N/A

Marshall Bowers created

ecd9422 gleam: Add `/gleam-docs` (#13721)

Click to expand commit body
This PR adds a `/gleam-docs` slash command to the Gleam extension, which
can be used to fetch docs from HexDocs.

Release Notes:

- N/A

Marshall Bowers created

0eb26d2 Fix auto-rename ranges with special characters (#13719)

Click to expand commit body
Release Notes:

- Fixed ([#13551](https://github.com/zed-industries/zed/issues/13551)).

Krzysztof Witkowski created

3a43adb Publish `html_to_markdown` (#13718)

Click to expand commit body
This PR updates the `html_to_markdown` crate with the necessary changes
to publish it to crates.io.

Publishing it makes it available for use within extensions when
implementing functionality for the Assistant.

Release Notes:

- N/A

Marshall Bowers created

3419f5f zed_extension_api: Add `fetch` (#13716)

Click to expand commit body
This PR adds a new `fetch` function to the `zed_extension_api` to allow
fetching a URL through the Wasm host.

Currently we only support GET requests and return the response body as a
string.

Release Notes:

- N/A

Marshall Bowers created

e7214a4 Update linux.md

Mikayla Maki created

c9ac7b8 assistant: Remove unused `NowPlaceholder` (#13713)

Click to expand commit body
This PR removes the `NowPlaceholder` component, as it was no longer
used.

Release Notes:

- N/A

Marshall Bowers created

e243856 Add terminal inline assistant (#13638)

Click to expand commit body
Release Notes:

- N/A

---------

Co-authored-by: Antonio <antonio@zed.dev>

Bennet Bo Fenner and Antonio created

c516b8f zig: Revert `464a4439f7c71e867da481e99e22ad99cc23807e` (#13712)

Click to expand commit body
This PR reverts the changes from #13709, now that we've published a new
version of the Zig extension with them.

This reverts commit 464a4439f7c71e867da481e99e22ad99cc23807e.

Release Notes:

- N/A

Marshall Bowers created

03447b9 zig: Bump to v0.1.3 (#13710)

Click to expand commit body
This PR bumps the Zig extension to v0.1.3 so we can republish with
#13709.

Release Notes:

- N/A

Marshall Bowers created

464a443 zig: Temporarily roll back changes depending on new extension API (#13709)

Click to expand commit body
This PR temporarily rolls back the changes in #12173 so that we can
publish a new version of the Zig extension.

There was a problem stemming from #12614 that caused v0.1.2 of the Zig
extension to get re-published with unreleased `zed_extension_api`
changes.

Once we publish v0.1.3 we'll be able to revert this change.

Release Notes:

- N/A

Marshall Bowers created

0e60730 Slightly improve project panel ergonomics (#13704)

Click to expand commit body
* properly fetch outlines from channel notes and other project-less
external files
* show better messages when for no contents
* make file entries collapsible (hiding all excerpts and outlines
beneath), keep the initial panel state unfolded up to file level


Release Notes:

- Slightly improved project panel ergonomics

Kirill Bulatov created

25ad318 Remove invalid symlink in title bar crate (#13702)

Click to expand commit body
This removes an invalid symlink to a non-existing license file, which
was added in #13597.

Release Notes:

- N/A

Bennet Bo Fenner created

bac6e2f tasks: Add experimental support for user-defined task variables (#13699)

Click to expand commit body
Context:
@bennetbo spotted a regression in handling of `cargo run` task in zed
repo following a merge of #13658. We've started invoking `cargo run`
from the folder of an active file whereas previously we did it from the
workspace root. We brainstormed few solutions that involved adding a
separate task that gets invoked at a workspace level, but I realized
that a cleaner solution may be to finally add user-configured task
variables. This way, we can choose which crate to run by default at a
workspace level.

This has been originally brought up in the context of javascript tasks
in
https://github.com/zed-industries/zed/pull/12118#issuecomment-2129232114

Note that this is intended for internal use only for the time being.
/cc @RemcoSmitsDev we should be unblocked on having runner-dependant
tasks now.

Release notes:

- N/A

Piotr Osiewicz created

065ab93 Use user-defined font weight, where appropriate (#13653)

Click to expand commit body
Release Notes:

- N/A

Gilles Peiffer created

8359230 Add a test for PageUp/PageDown in completion list (#13670)

Click to expand commit body
This is just tests to verify [the fix for PageUp/PageDown in the
completions list](6e1b99b03935922511cdf01978f24abedd0d1868) that was
previously added works properly. @SomeoneToIgnore Please check when you
have a moment. Thanks

Release Notes:

- N/A

Aleksei Gusev created

e650c01 Fix Prettier parser values when formatting files with paths (#13666)

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

Now, as intended, the parser value is passed only if configured in the
language settings.

Also, allows to format JSONC by default with Prettier and reformats Zed
settings.

Release Notes:

- Fixed Zed Prettier integration always passing parser value for files
with paths ([13660](https://github.com/zed-industries/zed/issues/13660))

Kirill Bulatov created

f1859e3 Rust: Execute tasks from files ZED_DIRNAME (#13658)

Click to expand commit body
Fixes #13267

Release Notes:

- Fixed Rust tests not working when crates Cargo.toml is not at the root
of a worktree.

Piotr Osiewicz created

b1a0188 Fix: Atom keymap in ProjectPanel (#13655)

Click to expand commit body
- Fix various keys [aAD] which did not function in Project Panel filename entry with Atom Keybind.

Peter Tripp created

218629c language: Memoize value of has_edits_since for a given buffer version (#13656)

Click to expand commit body
As a drive-by of https://github.com/zed-industries/zed/pull/13654, I've
noticed that the editor felt sluggish after I've undone the changes made
by the replacement. It turns out that we are repeatedly checking whether
there are any edits to estabilish dirty/conflict state of a buffer, even
though this operation is pure; this PR stores away the result of a
computation and refers to it before rerunning it.

Release Notes:

- Improve editor's performance with large undo histories

Piotr Osiewicz created

0761383 search: Improve performance of `replace_all` (#13654)

Click to expand commit body
Previously replace_all amounted to what could be achieved by repeatedly
mashing "Replace" button, which had a bunch of overhead related to
buffer state syncing. This commit gets rid of the automated button
mashing, processing all of the replacements in one go.

Fixes #13455



Release Notes:

- Improved performance of "replace all" in buffer search and project
search

Piotr Osiewicz created