Commit log

bef575e Simplify project syncing (#16976)

Click to expand commit body
As part of allowing LSPs to run remotely, we need to move LSP stuff
out of project. To do that we'd like to simplify the concurrency story
on project syncing.

Co-Authored-By: Max <max@zed.dev>

Release Notes:

- N/A

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

Conrad Irwin and Max created

7571b1d docs: Fix how Tailwind CSS is spelled (#16975)

Click to expand commit body
Super pedantic (😬) but just a tiny PR to fix it: not "TailWind" or
"TailwindCSS" (without spaces).

---

Release Notes:

- N/A

Danilo Leal created

f39805d docs: Add redirect from `/developing-zed` to `/development` (#16974)

Click to expand commit body
This PR adds a redirect from the old `/docs/developing-zed` page to the
new `/docs/development` page.

Fixes https://github.com/zed-industries/zed/issues/16785.

Release Notes:

- N/A

Marshall Bowers created

98a3bda docs: Fix link to prompting guide (#16973)

Click to expand commit body
This PR fixes the link to the prompting guide, since it was broken in
048be73b22922af8633cf68cd6a12cd46893ea0d and
4e0124010dcedcade05b1a82a62cda4400a11294.

Release Notes:

- N/A

Marshall Bowers created

4e01240 Fix link (again)

Joseph T Lyons created

048be73 Fix bad link

Joseph T Lyons created

8643b11 Fix search sorting (#16970)

Click to expand commit body
Ensures we sort paths in search the same as we do in panels.

Ideally we'd store things like this in the worktree, but the sort order
depends
on file vs directory, and callers generally don't know which they're
asking for.

Release Notes:

- N/A

Conrad Irwin created

442ff94 Further document repl outputs (#16962)

Click to expand commit body
Adding more docs to the repl outputs modules.

Release Notes:

- N/A

Kyle Kelley created

37c7c99 Add pane activation bindings for Sublime Text keymap (#16930)

Click to expand commit body
- Improved Sublime keymap: Support for switching to individual tabs with `cmd-1` thru `cmd-9` (MacOS) and `alt-1` thru `alt-9` (Linux) matching Sublime behavior.

Junwoo created

f633b12 Fix git commit popup message bracket (#16279)

dovakin0007 created

98e09f2 Use JSONC for pyrightconfig.json (#16967)

Peter Tripp created

1d868e1 project search: Render results in batches (#16960)

Click to expand commit body
This improves performance, because we don't render after every single
match/range that was added to the results.

I think for my example search it's twice as fast?

## Numbers

Recorded in debug mode (because it's 6:30pm and my poor computer has
spun its fan enough for today and also because you can see the change of
the effect more in debug mode), rendering `<` searched in `zed.dev`
repo:

- Before: `14.59558225s`
- After: `2.604320875s`




## Videos
Before (recorded in release mode):



https://github.com/user-attachments/assets/909260fa-3e69-49ab-8786-dd384e2a27ee

After (recorded in release mode):



https://github.com/user-attachments/assets/fc8a85d3-e575-470f-b59c-16a6df8b3f80
## Release Notes

Release Notes:

- Improved performance of rendering project-search results in the
multi-buffer after finding them.

Thorsten Ball created

ff26abd nix: Fix gpu-lib/wayland binary patching on nix package (#16958)

Click to expand commit body
Also, includes some cleanup -- adds missing flake-compat input and
aligns the nix build module with how nixpkgs does it.

Release Notes:

- Fixed an issue on NixOS package where the wrong binaries were being
patched, leading to missing Wayland libs when launching Zed

jvmncs created

1f0b7d4 extensions: Upgrade `zed_extension_api` to v0.1.0 (#16955)

Click to expand commit body
This PR updates the `zed_extension_api` to v0.1.0 for the extensions
that live in this repo.

The changes in that version of additive, so none of the extensions need
to change their usage in order to upgrade.

Release Notes:

- N/A

Marshall Bowers created

b2f3f76 project search: Stream search results to improve TTFB (#16923)

Click to expand commit body
This is a prototype change to improve latency of local project searches.
It refactors the matcher to keep paths "in-order" so that we don't need
to wait for all matching files to display the first result.

On a test (searching for `<` in zed.dev) it changes the time until first
result from about 2s to about 50ms. The tail latency seems to increase
slightly (from 5s to 7s) so we may want to do more tuning before hitting
merge.

Release Notes:

- reduces latency for first project search result

---------

Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Thorsten <thorsten@zed.dev>

Conrad Irwin , Thorsten Ball , Antonio , and Thorsten created

dc889ca docs: Reference latest version of `zed_extension_api` (#16954)

Click to expand commit body
This PR updates the extension docs to reference the latest version of
the `zed_extension_api`.

Release Notes:

- N/A

Marshall Bowers created

8ec36f1 extension: Define capabilities in the extension manifest (#16953)

Click to expand commit body
This PR adds an initial notion of extension capabilities.

Capabilities are used to express the operations an extension is capable
of doing. This will provide further insights into what an extension can
do, as well as provide the ability to grant or deny the set of
capabilities.

Capabilities are defined in the `capabilities` field in the extension
manifest. This field contains an array of capabilities.

Each capability has a `kind` to denote the known capability it
corresponds to. Individual capabilities may have additional fields,
based on the `kind`.

Here's an example of some capabilities:

```toml
capabilities = [
    { kind = "download-file", host = "github.com", path_prefix = "owner/repo" },
    { kind = "npm:install", package = "@vue/language-server" },
]
```

In order to avoid a breaking change, the `capabilities` field is
currently optional and defaults to an empty array. This will allow us to
add support for extensions to define capabilities before we start
enforcing them.

Release Notes:

- N/A

Marshall Bowers created

ad43bbb inline completions: Add action to toggle inline completions (#16947)

Click to expand commit body
This adds a new action: `editor: toggle inline completions`.

It allows users to toggle inline completions on/off for the current
buffer.

That toggling is not persistent and when the editor is closed, it's
gone.

That makes it easy to disable inline completions for a single text
buffer, for example, even if you want them on for other buffers.

When toggling on/off, the toggling also overwrites any language
settings. So if you have inline completions disabled for Go buffers,
toggling them on takes precedence over those settings.


Release Notes:

- Added a new editor action to allow toggling inline completions
(Copilot, Supermaven) on and off for the current buffer, taking
precedence over any settings.

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

Thorsten Ball and Antonio created

5586397 Preserve selected entry in file_finder (#13452)

Click to expand commit body
Closes #11737

If the query has not changed and entry is still in the matches list keep
it selected


Release Notes:

- Fixes file finder jumping during background updates ([#11737](https://github.com/zed-industries/zed/issues/11737))

kshokhin created

60af9dd Add `.SystemUIFont` to font list (#15340)

Click to expand commit body
As discussed in #15326, this font name should be included in the font
list since `settings.json` indicates that one can set the font to
`.SystemUIFont`.

Release Notes:

- N/A

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

张小白 and Marshall Bowers created

d3d0c04 Support extended keys on Mac (insert, f13-f19) (#16921)

Click to expand commit body
- Improved support for extended keyboards on Mac (F13-F19, Insert)

Peter Tripp created

2b08e2a docs: Fix broken links (#16943)

Click to expand commit body
This PR fixes some broken links in the docs.

All internal links within the docs should be relative links so that
mdBook can resolve them to another page and generate the appropriate
URL.

Release Notes:

- N/A

Marshall Bowers created

226ec9d gpui: Fix performance of app menu opening with large # of windows (#16939)

Click to expand commit body
This is officially my weirdest performance fix to date; With large # of
windows opening app menu could take a lot of time (we're talking few
seconds with 9 windows, a minute with 10 windows). The fix is to make
one method pub(crate).. What?

<img width="981" alt="image"
src="https://github.com/user-attachments/assets/83b26154-0acd-43ef-84b3-4b85cde36120">

We were spending most of the time on clear_pending_keystrokes, which -
funnily enough - called itself recursively. It turned out we have two
methods; `AppContext::clear_pending_keystrokes` and
WindowContext::clear_pending_keystrokes. The former calls the latter,
but - due to the fact that `WindowContext::clear_pending_keystrokes` is
private and `WindowContext` derefs to `AppContext` - `AppContext` one
ended up actually calling itself! The fix is plain and simple - marking
WindowContext one as pub(crate), so that it gets picked up as a method
to call over `AppContext::clear_pending_keystrokes`.

Closes #16895



Release Notes:

- Fixed app menu performance slowdowns when there are multiple windows
open.

Piotr Osiewicz created

8ec680c project search: Increase perf up to 10x by batching `git status` calls (#16936)

Click to expand commit body
***Update**: after rebasing on top of
https://github.com/zed-industries/zed/pull/16915/ (that also changed how
search worked), the results are still good, but not 10x. Instead of
going from 10s to 500ms, it goes from 10s to 3s.*

This improves the performance of project-wide search by an order of
magnitude.

After digging in, @as-cii and I found that opening buffers was the
bottleneck for project-wide search (since Zed opens, parses, ... buffers
when finding them, which is something VS Code doesn't do, for example).
So this PR improves the performance of opening multiple buffers at once.

It does this by doing two things:

- It batches scan-requests in the worktree. When we search, we search
files in chunks of 64. Previously we'd handle all 64 scan requests
separately. The new code checks if the scan requests can be batched and
if so it, it does that.
- It batches `git status` calls when reloading the project entries for
the opened buffers. Instead of calling `git status` for each file, it
calls `git status` for a batch of files, and then extracts the status
for each file.

(It has to be said that I think the slow performance on `main` has been
a regression introduced over the last few months with the changes made
to project/worktree/git. I don't think it was this slow ~5 months ago.
But I also don't think it was this fast ~5 months ago.)

## Benchmarks

| Search | Before | After (without
https://github.com/zed-industries/zed/pull/16915) | After (with
https://github.com/zed-industries/zed/pull/16915)
|--------|--------|-------|------|
| `zed.dev` at `2b2a501192e78e`, searching for `<` (`4484` results) |
3.0s<br>2.9s<br>2.89s | 489ms<br>517ms<br>476ms | n/a |
| `zed.dev` at `2b2a501192e78e`, searching for `:` (`25886+` results) |
3.9s<br>3.9s<br>3.8s | 70ms<br>66ms<br>72ms | n/a |
| `zed` at `55dda0e6af`, searching for `<` (`10937+` results) |
10s<br>11s<br>12s | 500m<br>499ms<br>543ms | 3.4s<br>3.1s<br> |

(All results recorded after doing a warm-up run that would start
language servers etc.)

Release Notes:

- Performance of project-wide search has been improved by up to 10x.

---------

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

Thorsten Ball and Antonio created

d1dceef blade: Update blade to b37a9a9 to fix leaking memory (#16935)

Click to expand commit body
Bumps blade to `b37a9a994709d256f4634efd29281c78ba89071a` which
importantly includes a fix for leaking memory from Vulkan objects when
creating and destroying the context.
https://github.com/kvark/blade/pull/162

This improves https://github.com/zed-industries/zed/issues/13346, but I
think there are still some improvements to be made.
 
Release Notes:

- N/A

Matin Aniss created

88d36d8 Restore missing fifo check (#16931)

Click to expand commit body
Fixes a merge conflict between #16915 and #16039

Release Notes:

- N/A

Conrad Irwin created

9662829 vim: Add Smart Relative Line Number (#16567)

Click to expand commit body
Closes #16514

Release Notes:

- Added Vim: absolute numbering in any mode except `insert` mode

---------

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

0x2CA and Conrad Irwin created

26d9432 REPL: Refactor output (#16927)

Click to expand commit body
Shuffle `outputs.rs` into individual `outputs/*.rs` files and start
documenting them more.

Release Notes:

- N/A

Kyle Kelley created

bea6786 Fix git repository state corruption when work dir's metadata is updated (#16926)

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

Release Notes:

- Fixed an issue where git state would stop updating if the root
directory of a git repository was updated in certain ways

Max Brunsfeld created

2de420a assistant: Fix model selector check icon overflow (#16716)

Click to expand commit body
Release Notes:

- Fixed assistant model selector check icon overflow for long model
names

moshyfawn created

f64f85e Do not hold any tasks by default and no other terminals (#16847)

Kirill Bulatov created

29745ae blade: Align rasterized path bounds to whole pixels (#16784)

Click to expand commit body
Related: https://github.com/zed-industries/zed/pull/15822

| Before | After |
| --- | --- |
|
![image](https://github.com/user-attachments/assets/4c4ed1e7-b639-44ce-b318-8cdaaee809ee)|
![image](https://github.com/user-attachments/assets/c2757528-eef3-4d21-9522-39b2597a96b7)
|
|
![image](https://github.com/user-attachments/assets/b70ee108-bea6-4e5e-9583-392d1163d236)
|
![image](https://github.com/user-attachments/assets/aefc1f0c-7bba-4287-a3f9-bbb9befb6a4c)
|

Release Notes:

- N/A

apricotbucket28 created

6afb36f Reorganize the context menu a bit (#16773)

Click to expand commit body
Follow up to #16080 
The idea is that the current context menu became a bit top-heavy over
time. Let's reorganisze it into four sections:
1. Finding symbols
2. Editing using lsp and similar
3. Copy/Cut/Paste
4. Getting file location

Release Notes:

- Reorganized context menu to be a bit less top heavy and have more
logical parts

Before (a giant part on top and two small ones on the bottom):
<img width="248" alt="Screenshot 2024-08-23 at 21 02 33"
src="https://github.com/user-attachments/assets/87a136c7-df16-4032-ba02-dea087fd8445">

After (much more balanced):
<img width="250" alt="Screenshot 2024-08-23 at 21 01 28"
src="https://github.com/user-attachments/assets/4aa48b8a-99f3-4315-b325-625a47ecd5b8">

Stanislav Alekseev created

b99bf92 Implement "join pane into next" (#16077)

Click to expand commit body
Closes #12409

Release Notes:

- Added "join pane into next" action ([#12409](https://github.com/zed-industries/zed/issues/12409))


https://github.com/zed-industries/zed/assets/727422/00cc8599-e5d6-4fb8-9f0d-9b232d2210ef

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>

Toni Cárdenas and Kirill Bulatov created

f417893 Avoid unwrap of Worktree::root_entry in resolve_path_in_worktrees (#16917)

Click to expand commit body
It looks like this unwrap was introduced in
https://github.com/zed-industries/zed/pull/16534.

I think a worktree's `root_entry` can be null if it represents a
non-existent file that has not yet been saved. I hit a panic due to the
`unwrap` a couple of times on nightly.

Release Notes:

- N/A

Max Brunsfeld created

ef22372 SSH remote search (#16915)

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

Release Notes:

- ssh remoting: add project search

---------

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

Conrad Irwin and Max created

0332eaf Remove reference to Copilot plugin (#16916)

Peter Tripp created

c2835df Improve buffers used by Zed for discoverability/visibility (#16906)

Click to expand commit body
- Fixed Telemetry log being marked dirty.
- Fixed asset buffers (default settings and default keymap) showing 'untitled' in breadcrumbs

Peter Tripp created

93a7682 collab: Count active users based on the tokens per minute measure (#16911)

Click to expand commit body
This PR fixes an issue where active user counts were being computed
across _all_ measures instead of the per-minute measures.

We now compute them using the tokens per minute measure, as we're
concerned with usage in recent minutes.

Release Notes:

- N/A

Marshall Bowers created

3ddec48 Remove block step from delete comments workflow (#16910)

Click to expand commit body
The block step wasn't working, and it also appears that most of these
spam comments are coming from compromised accounts, so I think just
deleting the comments is okay for now.

Release Notes:

- N/A

jvmncs created

e2635a6 Add command to copy current file:line for working with external tools (#14793)

Click to expand commit body
Closes #14787.

I made a quick draft implementation of this feature request:
https://github.com/zed-industries/zed/issues/14787

I know how to use use gdb well, so lacking a built-in debugger is OK.
BUT... Speaking personally, setting breakpoints is 50% of what I want an
IDE to do for me when debugging. Having a feature where I can click,
copy, "b [paste]", is a huge step up from typing the whole thing in
manually. I figure this must be useful for other external tools, or even
just regular-human-communication too.

Open Questions:
* Does this belong in the right click menu? (I put it next to "Copy
Permalink" which is similar.)
* Probably not useful enough to get a default keymap?
* Relative vs absolute path?
* Does this need tests?

Release Notes:

- Added `editor: copy file location` command to copy the current file
location (FILE:LINE) to the clipboard
([#14787](https://github.com/zed-industries/zed/issues/14787)).

---------

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

Scott Lembcke and Marshall Bowers created

14d0f4f ruby: Upgrade `zed_extension_api` to v0.1.0 (#16907)

Click to expand commit body
This pull request upgrades the Ruby extension to use v0.1.0 of the Zed
extension API.

Release Notes:

- N/A

Vitaly Slobodin created

eb0a01e Relax comment restrictions in delete_comments action (#16899)

Click to expand commit body
The script no longer triggers on harmless words like "Download".

Release Notes:

- N/A

jvmncs created

635e7f6 docs: Remove reference to nonexistent vim key binding (#16884)

Click to expand commit body
That line was accidentally introduced in
https://github.com/zed-industries/zed/pull/12789.

Release Notes:

- N/A

ShikChen created

e8c6c53 Fix delete comments workflow (#16896)

Click to expand commit body
Release Notes:

- N/A

jvmncs created

d50cb17 docs: Install `libxkbcommon` (#16897)

Click to expand commit body
This PR installs the development packages for `xkbcommon` and
`xkbcommon-x11` that are needed for building the `docs_preprocessor`.

Release Notes:

- N/A

Marshall Bowers created

4c7c8b0 ruby: Update tree-sitter grammar for the Ruby language (#16892)

Click to expand commit body
Closes [#7776](https://github.com/zed-industries/zed/issues/7776)

Hi, this pull request updates the tree-sitter grammar for the Ruby
language.

The changes between two version do not have any breaking change:
https://github.com/tree-sitter/tree-sitter-ruby/compare/dc2d7d6b50f9975bc3c35bbec0ba11b2617b736b..7dbc1e2d0e2d752577655881f73b4573f3fe85d4

Release Notes:

- N/A

Vitaly Slobodin created

5f6726a ruby: Rename "rbs" language to "RBS" (#16893)

Click to expand commit body
Rename rbs to RBS. This is primarily a UX change, as the proper name for
the Ruby Type Signature language is RBS, not rbs.

Screenshots:

Before:
![CleanShot 2024-08-26 at 18 28
45@2x](https://github.com/user-attachments/assets/c6773fe5-f071-47c7-91b3-27f448ce3b2a)

After:

![CleanShot 2024-08-26 at 18 29
44@2x](https://github.com/user-attachments/assets/ddd8859e-6cbc-4a6f-8485-2b663a76420f)


Release Notes:

- N/A

Vitaly Slobodin created

2f08a0a Fix fifo files hanging the project wide search (#16039)

Click to expand commit body
Release Notes:

- Fixed the issue related to the project wide search being stuck when
project contains .fifo files
- Might potentially solve the following issue
https://github.com/zed-industries/zed/issues/7360

TheCub3 created

aaddb73 assistant: Refesh message headers only for dirty messages (#16881)

Click to expand commit body
We've noticed performance issues in long conversations with assistants;
the profiles pointed to slowiness in WrapMap (and indeed there were some
low hanging fruits that we picked up in
https://github.com/zed-industries/zed/pull/16761). That however did not
fully resolve the issue, as WrapMap still cracked through in profiles;
basically, the speedup I've landed has just moved the post elsewhere.

The higher level issue is that we were trying to refresh message headers
for all messages, irrespective of whether they've actually needed to be
updated. This PR fixes that by using `replace_blocks` API where
possible.

Release Notes:

- Improved performance of Assistant Panel with long conversations.

Piotr Osiewicz created