Commit Graph

20129 Commits

Author SHA1 Message Date
Marshall Bowers
c83d1c23d7
rustdoc_to_markdown: Handle "stabs" in item name entries (#12494)
This PR extends `rustdoc_to_markdown` with support for rustdoc's
"stabs".

These are used in item name lists to indicate that the construct is
behind a feature flag:

<img width="641" alt="Screenshot 2024-05-30 at 1 34 53 PM"
src="https://github.com/zed-industries/zed/assets/1486634/0216f325-dc4e-4302-b6db-149ace31deea">

We now treat these specially in the Markdown output:

<img width="813" alt="Screenshot 2024-05-30 at 1 35 27 PM"
src="https://github.com/zed-industries/zed/assets/1486634/96396305-123d-40b2-af49-7eed71b62971">

Release Notes:

- N/A
2024-05-30 13:46:14 -04:00
Marshall Bowers
39a2cdb13f
rustdoc_to_markdown: Strip "Copy item path to clipboard" button (#12490)
This PR strips the "Copy item path to clipboard" button from the rustdoc
output.

Release Notes:

- N/A
2024-05-30 12:55:37 -04:00
Max Brunsfeld
8f942bf647
Use repository mutex more sparingly. Don't hold it while running git status. (#12489)
Previously, each git `Repository` object was held inside of a mutex.
This was needed because libgit2's Repository object is (as one would
expect) not thread safe. But now, the two longest-running git operations
that Zed performs, (`status` and `blame`) do not use libgit2 - they
invoke the `git` executable. For these operations, it's not necessary to
hold a lock on the repository.

In this PR, I've moved our mutex usage so that it only wraps the libgit2
calls, not our `git` subprocess spawns. The main user-facing impact of
this is that the UI is much more responsive when initially opening a
project with a very large git repository (e.g. `chromium`, `webkit`,
`linux`).

Release Notes:

- Improved Zed's responsiveness when initially opening a project
containing a very large git repository.
2024-05-30 09:37:11 -07:00
Bennet Bo Fenner
1ecd13ba50
Support copying permalink in multibuffer (#12435)
Closes #11392 

Release Notes:

- Added support for copying permalinks inside multi-buffers
([#11392](https://github.com/zed-industries/zed/issues/11392))
2024-05-30 18:36:24 +02:00
Marshall Bowers
c118012223
rustdoc_to_markdown: Add table support (#12488)
This PR extends `rustdoc_to_markdown` with support for tables:

<img width="1007" alt="Screenshot 2024-05-30 at 12 05 35 PM"
src="https://github.com/zed-industries/zed/assets/1486634/4e9a2a65-8aaa-4df1-98c4-4dd4e7874514">


Release Notes:

- N/A
2024-05-30 12:17:10 -04:00
Marshall Bowers
7a30937e21
Sort file_types.json (#12487)
This PR sorts the `file_types.json` file alphabetically.

This is the command I used to sort it:

```
pnpm --package=json-sort-cli dlx jsonsort assets/icons/file_icons/file_types.json
```

Release Notes:

- N/A
2024-05-30 11:26:52 -04:00
Kirill Bulatov
3c5d141a04
Force 60 minutes timeout for all regular CI jobs (#12486)
After gazing at
https://github.com/zed-industries/zed/actions/runs/9296132630/job/25596939148
for some time, I've decided to add a hard limit on every test-related CI
job.

Release Notes:

- N/A
2024-05-30 18:17:03 +03:00
Marshall Bowers
bf7c6a676a
rustdoc_to_markdown: Recognize code blocks in other languages (#12484)
This PR updates `rustdoc_to_markdown` to be able to recognize code
blocks using non-Rust languages.

Release Notes:

- N/A
2024-05-30 10:50:27 -04:00
Antonio Scandurra
a259042f92
Make slash commands more discoverable (#12480)
<img width="648" alt="image"
src="https://github.com/zed-industries/zed/assets/482957/a63df904-fbbe-4e0a-80b2-c98ebee90690">

Release Notes:

- N/A

Co-authored-by: Nathan <nathan@zed.dev>
2024-05-30 16:45:05 +02:00
Sean Washington
436a8fa0ce
php: Update Pest tree-sitter queries to capture single quotes (#12467)
Improved PHP Pest outline and runnables to support single quoted
arguments
([#12461](https://github.com/zed-industries/zed/issues/12461)).

Release Notes:

- N/A

| Before | After |
|--------|--------|
|
![image](https://github.com/zed-industries/zed/assets/428033/e0966510-da11-4a80-8901-7dba541ab721)
| ![CleanShot 2024-05-29 at 20 13
00@2x](https://github.com/zed-industries/zed/assets/428033/5f7ab492-2791-4a04-9ec3-f0adfa9b2986)
|
| ![CleanShot 2024-05-29 at 20 18
11@2x](https://github.com/zed-industries/zed/assets/428033/ac6bf58b-4e7d-410d-af51-328c41a76ba0)
| ![CleanShot 2024-05-29 at 20 14
35@2x](https://github.com/zed-industries/zed/assets/428033/1d226bb8-f102-4171-906d-e122ab8299cf)
|
2024-05-30 16:37:41 +02:00
Antonio Scandurra
55c47305c8
Align the inline assistant correctly (#12478)
Release Notes:

- Fixed the the alignment for the inline assistant.
2024-05-30 14:29:17 +02:00
Antonio Scandurra
6ff01b17ca
Improve model selection in the assistant (#12472)
https://github.com/zed-industries/zed/assets/482957/3b017850-b7b6-457a-9b2f-324d5533442e


Release Notes:

- Improved the UX for selecting a model in the assistant panel. You can
now switch model using just the keyboard by pressing `alt-m`. Also, when
switching models via the UI, settings will now be updated automatically.
2024-05-30 12:36:07 +02:00
Mikayla Maki
5a149b970c
Make tests less noisy (#12463)
When running the tests for linux, I found a lot of benign errors getting
logged. This PR cuts down some of the noise from unnecessary workspace
serialization and SVG renders

Release Notes:

- N/A
2024-05-29 18:06:45 -07:00
Marshall Bowers
bdf627ce07
rustdoc_to_markdown: Fix code blocks (#12460)
This PR fixes an issue in `rustdoc_to_markdown` with code blocks being
trimmed incorrectly.

We were erroneously popping from the current element stack even if we
didn't push an element onto the stack.

Added test coverage for this case as well, so we don't regress.

Release Notes:

- N/A
2024-05-29 19:23:06 -04:00
Marshall Bowers
a5011996fb
rustdoc_to_markdown: Recognize Rust code blocks (#12458)
This PR makes it so Rust code blocks are recognized and
syntax-highlighted when converting from rustdoc to Markdown.

Release Notes:

- N/A
2024-05-29 18:57:20 -04:00
Nathan Sobo
b8d9713b4f
Make prompt library icon in context panel staff-only for now (#12457)
This is still pretty raw, so I'd like to hold off on shipping it to all
users.

Release Notes:

- Hide the prompt library for non-staff until it is in a more complete
state.
2024-05-29 16:53:45 -06:00
Marshall Bowers
abec028e58
rustdoc_to_markdown: Clean up heading spacing (#12456)
This PR cleans up the spacing around the Markdown headings in the output
so that they are consistent.

Release Notes:

- N/A
2024-05-29 18:39:51 -04:00
Marshall Bowers
08881828ce
assistant: Add /rustdoc slash command (#12453)
This PR adds a `/rustdoc` slash command for retrieving and inserting
rustdoc docs into the Assistant.

Right now the command accepts the crate name as an argument and will
return the top-level docs from `docs.rs`.

Release Notes:

- N/A
2024-05-29 18:14:29 -04:00
Max Brunsfeld
dd328efaa7
Compute git statuses using the bundled git executable, not libgit2 (#12444)
I realized that somehow, the `git` executable is able to compute `git
status` much more quickly than libgit2, so I've switched our git status
logic to use `git`. Follow-up to
https://github.com/zed-industries/zed/pull/12266.

Release Notes:

- Improved the performance of git status updated when working in large
git repositories.
2024-05-29 14:31:24 -07:00
Joshua Ferguson
6294a3b80b
Add xdg trash support (#12391)
- Added support for xdg trash when deleting files on linux
- moved ashpd depency to toplevel to use it in both fs and gpui

If I need to add test, or change anything, please let me know. I tested
locally by creating and deleting a file and confirming it showed up in
my trashcan, but that probably a less than ideal method of confirming
correct behavior

Also, I could remove the delete directory function for linux, and change
the one configured for macos to compile for both macos and linux (they
are the same, the version of the function they are calling is
different).

Release Notes:

- N/A
2024-05-29 14:15:29 -07:00
Kirill Bulatov
0f927fa6fb
One less unwrap (#12448)
Fixes
https://zed-industries.slack.com/archives/C04S6T1T7TQ/p1717011343884699

Release Notes:

- N/A
2024-05-29 23:44:56 +03:00
Marshall Bowers
5bcb9ed017
Add rustdoc_to_markdown crate (#12445)
This PR adds a new crate for converting rustdoc output to Markdown.

We're leveraging Servo's `html5ever` to parse the Markdown content, and
then walking the DOM nodes to convert it to a Markdown string.

The Markdown output will be continued to be refined, but it's in a place
where it should be reasonable.

Release Notes:

- N/A
2024-05-29 16:05:16 -04:00
Bennet Bo Fenner
a22cd95f9d
Fix deleted hunk offset when zooming (#12442)
Release Notes:

- Fixed an issue where expanded hunks could be rendered at the wrong
position when zooming
- Fixed an issue where expanded hunks could be rendered at the wrong
position when toggling git blame
([#11941](https://github.com/zed-industries/zed/issues/11941))
2024-05-29 20:06:10 +02:00
Dzmitry Malyshau
44c50da94f
blade: Use BufferBelt from blade-utils (#12411)
Release Notes:

- N/A

Follow-up to #12340
Carries https://github.com/kvark/blade/pull/122 and
https://github.com/kvark/blade/pull/119
2024-05-29 09:50:45 -07:00
Joseph T. Lyons
c34d36161d v0.139.x dev 2024-05-29 12:15:12 -04:00
Max Brunsfeld
2772f87198
Make sure not to signal the main thread on fs events in ignored directories (#12436)
Release Notes:

- N/A
2024-05-29 09:11:28 -07:00
Antonio Scandurra
66affa969a
Show recently-opened files when autocompleting /file without arguments (#12434)
<img width="1588" alt="image"
src="https://github.com/zed-industries/zed/assets/482957/ea63b046-64d6-419e-8135-4863748b58fa">


Release Notes:

- N/A
2024-05-29 17:46:18 +02:00
Bennet Bo Fenner
dca5bc5986
Fix editor scrolling when closing tab using middle mouse button (#12429)
#12005 introduced a side effect, that would cause the editor to react to
a scroll event when using the middle mouse button to close a tab

Before:


https://github.com/zed-industries/zed/assets/53836821/46cb2e71-e9d5-477c-b34a-dc9b6bc9b1f1

After:


https://github.com/zed-industries/zed/assets/53836821/6ada7985-97c9-4b52-848f-c7f9461c5216

Release Notes:

- Fixed an issue where the editor would scroll upwards if other tabs
were closed using the middle mouse button
2024-05-29 16:07:59 +02:00
Antonio Scandurra
1db33b5f4e
Always include context when performing inline transformation (#12426)
Release Notes:

- Improved clarity for inline transformations by always including the
active assistant context.
2024-05-29 15:17:01 +02:00
Bennet Bo Fenner
16745542b5
Fix hunk diff hitbox (#12425)
You can see in the video that hunks were getting toggled even when
clicking on the scrollbar.


https://github.com/zed-industries/zed/assets/53836821/11f201e8-c5f1-49c8-a4d2-ac3b3343b5a8

This happened because the hitbox was actually extended to the left of
the hunk indicator, I believe that was done so that "Removed" hunk
indicators rendered correctly (Red triangles)

Fixed:


https://github.com/zed-industries/zed/assets/53836821/7b451b37-da85-4e56-9127-2a5512bd9e7a

Release Notes:

- Fixed hunk indicators getting expanded when clicking near them (but
not on them)
2024-05-29 14:45:27 +02:00
Antonio Scandurra
a0644ac601
Allow specifying a custom limit for /search results (#12423)
<img width="497" alt="image"
src="https://github.com/zed-industries/zed/assets/482957/94e94326-fb3c-4f9b-b4d9-7dd6f6f8d537">


e.g.

```
/search --9 foobar
```

Release Notes:

- N/A
2024-05-29 14:11:05 +02:00
Piotr Osiewicz
f3e6a0beab
project panel: Copy dragged entry when opt is pressed (#12348)
Partially fixes #5119 
TODO:
- [ ] Change cursor style to Copy when dragging an entry with opt
pressed.

Release Notes:

- Drag-and-dropping a project panel entry with opt modifier pressed now
copies the entry instead of moving it.
2024-05-29 12:34:58 +02:00
Antonio Scandurra
4acfab689e
Fix logic errors in RateLimiter (#12421)
This pull request fixes two issues in `RateLimiter` that caused
excessive rate-limiting to take place:

- c19083a35c fixes a mistake that caused
us to load buckets from the database incorrectly and set the
`refill_time_per_token` to equal the `refill_duration`. This was the
primary reason why rate limiting was acting oddly.
- 34b88d14f6 fixes another slight logic
error that caused tokens to be underprovisioned. This was minor compared
to the bug above.

Release Notes:

- N/A
2024-05-29 12:05:40 +02:00
Jason Lee
3c6c850390
task: Add re-run task button to terminal title (#12379)
Release Notes:

- Added re-run task button to terminal title.

Close #12277

## Demo


https://github.com/zed-industries/zed/assets/5518/4cd05fa5-4255-412b-8583-68e22f86561e

---------

Co-authored-by: Piotr Osiewicz <piotr@zed.dev>
2024-05-29 11:40:43 +02:00
Piotr Osiewicz
36d0b71f27
project panel: adjust right border and make active entry more prominent when panel is not focused (#12420)
Release Notes:

- N/A
2024-05-29 11:34:59 +02:00
Kirill Bulatov
ef58509797
Show symlink tooltip on icon hover only (#12419)
Small follow-up of https://github.com/zed-industries/zed/pull/12263 

Release Notes:

- N/A
2024-05-29 12:05:53 +03:00
Bennet Bo Fenner
cad3d2d355
inline assistant: Fix overlapping wrap/indent guides (#12417)
Before:

<img width="603" alt="image"
src="https://github.com/zed-industries/zed/assets/53836821/08b7566c-4afa-40b6-8e73-4b03d26572b7">

After:

<img width="539" alt="image"
src="https://github.com/zed-industries/zed/assets/53836821/ebd69e15-c1e1-485e-9c11-35b4316ede40">


Fixes #9819

Release Notes:

- Fix wrap guides overlapping with the inline assistant
([#9819](https://github.com/zed-industries/zed/issues/9819)).
2024-05-29 10:05:41 +02:00
Nathan Sobo
c03600c55e
Stop silently appending a system prompt for edit formatting (#12407)
We should reintroduce this as part of the prompt library.

Release Notes:

- Removed an over-eager system prompt from the assistant that was
causing misbehavior. Going forward, our intent is to always let you
observe and edit text before we send it.

---------

Co-authored-by: Marshall <marshall@zed.dev>
2024-05-28 20:31:58 -06:00
Joseph T. Lyons
30e498a1c1 Fix GitHub Issue-creation commands 2024-05-28 21:51:24 -04:00
Marshall Bowers
82a57a121a
Disable calls.share_on_join by default (#12401)
This PR changes the default value of the `calls.share_on_join` setting
from `true` to `false`.

Nathan mentioned that project sharing should be opt-in so that projects
aren't shared unless you intend for them to be.

Release Notes:

- Changed the default `calls.share_on_join` value to `false`.
2024-05-28 19:28:07 -04:00
Danielle Maywood
7969a10643
Support setting custom background color for syntax highlighting (#12400)
Release Notes:

- Added support for `background_color` in `syntax` map in `theme.json`.

This adds support for setting a `background_color` for styles inside the
`syntax` map for themes defined in `theme.json`. The field is optional
so there should be no backwards compatibility issues.

It is worth noting that the current behaviour for selecting text is that
the background colours will mix/blend (I'm not sure the correct term
here). Changing this behaviour, or making it configurable, looks to be a
far more complex issue and I'm not sure I know how to do it.
2024-05-28 19:25:09 -04:00
barseek
fcb4abf18b
Update Elixir docs (#12349)
This PR updates the Elixir docs with a note on how to switch to using
other language server.

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-05-28 18:52:22 -04:00
Marshall Bowers
cd77e72479
docs: Demonstrate disabling solargraph when enabling ruby-lsp (#12399)
This PR fixes a small issue in the Ruby docs, where we weren't properly
demonstrating that `solargraph` should be disabled when enabling
`ruby-lsp`.

Release Notes:

- N/A
2024-05-28 18:50:00 -04:00
Nathan Sobo
bde3056e84
Increase rate limit on LLM requests to 1000/hr (via env var) (#12396)
Release Notes:

- N/A

Co-authored-by: Marshall <marshall@zed.dev>
2024-05-28 14:20:25 -06:00
moshyfawn
6a48e3b8c6
ruby: Bump to v0.0.6 (#12395)
Release Notes:

- N/A

Related: #12392
2024-05-28 16:14:38 -04:00
moshyfawn
fb911bc478
ruby: Add Podfile as Ruby extension language path suffix (#12392)
Release Notes:

- N/A

Closes zed-industries/extensions#803
2024-05-28 15:58:48 -04:00
Max Brunsfeld
726026a267
Tweak client reconnect timing (#12393)
* Start with a longer duration
* Widen the range used for randomizing the duration between retries
* Increase the maximum duration between retries

Release Notes:

- N/A
2024-05-28 12:42:10 -07:00
Raunak Raj
da70741ece
linux: Implement should_auto_hide_scrollbars (#12366)
Implemented the should_auto_hide_scrollbars method for Linux using
`xdg_desktop_portal` approach

Release Notes:

- N/A
2024-05-28 11:50:14 -07:00
Dzmitry Malyshau
08e3840379
Update blade to pick up the descriptor initialization changes (#12340)
Release Notes:

- N/A

Picks up https://github.com/kvark/blade/pull/118
Fixes #10351

Seeing that Zed loaded with Blade repository is consuming 260Mb of RAM.
We can tune this to be lower, but ultimately it doesn't matter: this
memory isn't wasted, it's just pools for memory and descriptors, which
may be used by bigger and more complex views of Zed.
2024-05-28 11:41:46 -07:00
Piotr Osiewicz
ff9d6cc512
project panel: Remove active selection border when project panel is not focused (#12385)
This should make it less attention-grabbing.

Release Notes:

- N/A
2024-05-28 19:12:28 +02:00