Commit Graph

21916 Commits

Author SHA1 Message Date
CharlesChen0823
a5b82b2bf3
project_panel: Add support for copy/paste between different worktrees (#15396)
Closes https://github.com/zed-industries/zed/issues/5362

Release Notes:

- Added a way to copy/cut-paste between different worktrees ([#5362](https://github.com/zed-industries/zed/issues/5362))
2024-08-28 11:35:18 +03:00
Christoph Schmatzler
81eb594037
elixir: Add support for property macro in runnables (#16985)
Closes #16984 

Release Notes:

- Added support for `property` tests in runnables for Elixir ([#16984](https://github.com/zed-industries/zed/issues/16984))
2024-08-28 11:11:35 +03:00
Piotr Osiewicz
4ec1f29df0
chore: Make some of the deps of gpui optional (#16986)
Minor bookkeeping, that takes down dep count of gpui from 454 to 430 for
me.

Release Notes:

- N/A
2024-08-28 10:05:50 +02:00
Conrad Irwin
22a791d9c7
Bump collab min version to 0.134 (#16918)
0.05% of requests use a version less than this today; and it lets us get
  rid of a bunch of versioning we no longer need.

Release Notes:

- N/A
2024-08-27 21:44:00 -06:00
fletcher gornick
cfc3b7de05
vim: Retain search direction upon search submit (#16754)
Before, when using `?` and `#` for backwards search it would initially
search for the previous match, but upon subsequent inputs to `n` and
`N`, `n` is always treated as "forward" and `N` is always treated as
"backward", instead of continuing the search direction.

now, if i use `?` or `#` for backward search, `n` will go to the
previous selection, and `N` will go to the next. Functionality stays the
same for `/` and `*`.

Release Notes:

- vim: Fixed `n` direction after searching backwards

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-08-27 18:50:19 -06:00
Conrad Irwin
bef575e30a
Simplify project syncing (#16976)
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>
2024-08-27 15:36:38 -06:00
Danilo Leal
7571b1d444
docs: Fix how Tailwind CSS is spelled (#16975)
Super pedantic (😬) but just a tiny PR to fix it: not "TailWind" or
"TailwindCSS" (without spaces).

---

Release Notes:

- N/A
2024-08-27 17:19:25 -04:00
Marshall Bowers
f39805d529
docs: Add redirect from /developing-zed to /development (#16974)
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
2024-08-27 16:40:40 -04:00
Marshall Bowers
98a3bdad57
docs: Fix link to prompting guide (#16973)
This PR fixes the link to the prompting guide, since it was broken in
048be73b22 and
4e0124010d.

Release Notes:

- N/A
2024-08-27 16:32:05 -04:00
Joseph T Lyons
4e0124010d Fix link (again) 2024-08-27 16:13:11 -04:00
Joseph T Lyons
048be73b22 Fix bad link 2024-08-27 16:09:48 -04:00
Conrad Irwin
8643b11f57
Fix search sorting (#16970)
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
2024-08-27 13:46:36 -06:00
Kyle Kelley
442ff94d58
Further document repl outputs (#16962)
Adding more docs to the repl outputs modules.

Release Notes:

- N/A
2024-08-27 12:34:16 -07:00
Junwoo
37c7c99383
Add pane activation bindings for Sublime Text keymap (#16930)
- 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.
2024-08-27 15:22:38 -04:00
dovakin0007
f633b125b9
Fix git commit popup message bracket (#16279) 2024-08-27 15:18:48 -04:00
Peter Tripp
98e09f22c2
Use JSONC for pyrightconfig.json (#16967) 2024-08-27 19:02:03 +00:00
Thorsten Ball
1d868e19f2
project search: Render results in batches (#16960)
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.
2024-08-27 18:37:26 +02:00
jvmncs
ff26abdc2f
nix: Fix gpu-lib/wayland binary patching on nix package (#16958)
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
2024-08-27 12:24:42 -04:00
Marshall Bowers
1f0b7d45ff
extensions: Upgrade zed_extension_api to v0.1.0 (#16955)
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
2024-08-27 12:00:43 -04:00
Conrad Irwin
b2f3f760ab
project search: Stream search results to improve TTFB (#16923)
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>
2024-08-27 09:37:07 -06:00
Marshall Bowers
dc889ca7f2
docs: Reference latest version of zed_extension_api (#16954)
This PR updates the extension docs to reference the latest version of
the `zed_extension_api`.

Release Notes:

- N/A
2024-08-27 11:26:13 -04:00
Marshall Bowers
8ec36f1e2b
extension: Define capabilities in the extension manifest (#16953)
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
2024-08-27 11:10:58 -04:00
Thorsten Ball
ad43bbbf5e
inline completions: Add action to toggle inline completions (#16947)
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>
2024-08-27 15:51:57 +02:00
kshokhin
5586397f95
Preserve selected entry in file_finder (#13452)
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))
2024-08-27 16:24:06 +03:00
张小白
60af9dd4b1
Add .SystemUIFont to font list (#15340)
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>
2024-08-27 09:23:24 -04:00
Peter Tripp
d3d0c043f5
Support extended keys on Mac (insert, f13-f19) (#16921)
- Improved support for extended keyboards on Mac (F13-F19, Insert)
2024-08-27 09:09:57 -04:00
Marshall Bowers
2b08e2abe5
docs: Fix broken links (#16943)
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
2024-08-27 08:51:46 -04:00
Piotr Osiewicz
226ec9d404
gpui: Fix performance of app menu opening with large # of windows (#16939)
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.
2024-08-27 12:23:00 +02:00
Thorsten Ball
8ec680cecb
project search: Increase perf up to 10x by batching git status calls (#16936)
***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>
2024-08-27 11:59:59 +02:00
Matin Aniss
d1dceef945
blade: Update blade to b37a9a9 to fix leaking memory (#16935)
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
2024-08-27 09:59:10 +03:00
Conrad Irwin
88d36d8b9f
Restore missing fifo check (#16931)
Fixes a merge conflict between #16915 and #16039

Release Notes:

- N/A
2024-08-26 21:17:44 -06:00
0x2CA
9662829810
vim: Add Smart Relative Line Number (#16567)
Closes #16514

Release Notes:

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

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-08-26 21:17:21 -06:00
Kyle Kelley
26d943287b
REPL: Refactor output (#16927)
Shuffle `outputs.rs` into individual `outputs/*.rs` files and start
documenting them more.

Release Notes:

- N/A
2024-08-26 18:03:06 -07:00
Max Brunsfeld
bea6786f14
Fix git repository state corruption when work dir's metadata is updated (#16926)
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
2024-08-26 17:46:50 -07:00
moshyfawn
2de420a67b
assistant: Fix model selector check icon overflow (#16716)
Release Notes:

- Fixed assistant model selector check icon overflow for long model
names
2024-08-26 17:32:32 -07:00
Kirill Bulatov
f64f85eb1e
Do not hold any tasks by default and no other terminals (#16847) 2024-08-27 01:48:34 +03:00
apricotbucket28
29745ae229
blade: Align rasterized path bounds to whole pixels (#16784)
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
2024-08-27 01:26:59 +03:00
Stanislav Alekseev
6afb36fd6f
Reorganize the context menu a bit (#16773)
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">
2024-08-27 01:22:58 +03:00
Toni Cárdenas
b99bf92452
Implement "join pane into next" (#16077)
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>
2024-08-27 00:51:51 +03:00
Max Brunsfeld
f417893a7b
Avoid unwrap of Worktree::root_entry in resolve_path_in_worktrees (#16917)
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
2024-08-26 14:01:56 -07:00
Conrad Irwin
ef22372f0b
SSH remote search (#16915)
Co-Authored-By: Max <max@zed.dev>

Release Notes:

- ssh remoting: add project search

---------

Co-authored-by: Max <max@zed.dev>
2024-08-26 14:47:02 -06:00
Peter Tripp
0332eaf797
Remove reference to Copilot plugin (#16916) 2024-08-26 16:43:22 -04:00
Peter Tripp
c2835df898
Improve buffers used by Zed for discoverability/visibility (#16906)
- Fixed Telemetry log being marked dirty.
- Fixed asset buffers (default settings and default keymap) showing 'untitled' in breadcrumbs
2024-08-26 16:42:35 -04:00
Marshall Bowers
93a7682659
collab: Count active users based on the tokens per minute measure (#16911)
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
2024-08-26 15:04:55 -04:00
jvmncs
3ddec4816a
Remove block step from delete comments workflow (#16910)
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
2024-08-26 14:47:38 -04:00
Scott Lembcke
e2635a685e
Add command to copy current file:line for working with external tools (#14793)
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>
2024-08-26 14:31:20 -04:00
Vitaly Slobodin
14d0f4fbb2
ruby: Upgrade zed_extension_api to v0.1.0 (#16907)
This pull request upgrades the Ruby extension to use v0.1.0 of the Zed
extension API.

Release Notes:

- N/A
2024-08-26 14:20:41 -04:00
jvmncs
eb0a01e9cb
Relax comment restrictions in delete_comments action (#16899)
The script no longer triggers on harmless words like "Download".

Release Notes:

- N/A
2024-08-26 13:38:05 -04:00
ShikChen
635e7f6480
docs: Remove reference to nonexistent vim key binding (#16884)
That line was accidentally introduced in
https://github.com/zed-industries/zed/pull/12789.

Release Notes:

- N/A
2024-08-26 13:32:20 -04:00
jvmncs
e8c6c537de
Fix delete comments workflow (#16896)
Release Notes:

- N/A
2024-08-26 12:54:52 -04:00