Commit Graph

20247 Commits

Author SHA1 Message Date
Marshall Bowers
6c28b7e8b8
danger: Check PR titles (#13053)
This PR sets up Danger to check PR titles for consistency, using
[`danger-plugin-pr-hygiene`](https://github.com/maxdeviant/danger-plugin-pr-hygiene).

<img width="919" alt="Screenshot 2024-06-14 at 11 16 31 AM"
src="https://github.com/zed-industries/zed/assets/1486634/167fe698-2505-422b-8e41-e121d9fe933f">

Release Notes:

- N/A
2024-06-14 11:18:41 -04:00
Bennet Bo Fenner
0d8e6e6b12
assistant: Add diagnostics slash command (#12998)
This adds a `diagnostics` command to the assistant which allows to
inject compile errors/warnings into the context.

Release Notes:

- N/A
2024-06-14 17:14:50 +02:00
Marshall Bowers
bf03f66d02
danger: Upgrade to pnpm v9 (#13051)
This PR upgrades Danger to use pnpm v9.

Release Notes:

- N/A
2024-06-14 11:08:15 -04:00
Peter Tripp
0f59607100
docs: wrap_guides (#12992)
- Add 'wrap_guides' to website config docs.
- Add the word 'ruler' to improve searchability.
2024-06-14 09:48:25 -04:00
Piotr Osiewicz
902d7150fe
collab_ui: Re-enable deafening and screen share on Mac (#13040)
Fixes regression from https://github.com/zed-industries/zed/pull/12994
Release Notes:

- N/A
2024-06-14 15:47:53 +02:00
Piotr Osiewicz
55ba80ddd1
lsp: Add support for label_details in completions (#13043)
This fixes an issue reported by @Spoutnik97 in
https://github.com/zed-industries/zed/issues/12711#issuecomment-2163785111
- vtsls returns auxiliary docs via .label_details and not plain .details
field.

Release Notes:

- Improved quality of auxiliary details in completions returned by VTSLS
2024-06-14 13:49:08 +02:00
Piotr Osiewicz
dcb8dc16ca
editor: Update insert_text_format based on resolved completion (#13041)
Fixes #12920

VTSLS does not mark snippet completions as such in the initial
completion response - not until we resolve them; however, we do not
touch initial contents of completion during resolution, which led to us
not treating a snippet as such.

Release Notes:

- Fixed snippet completions sometimes being treated as plain text
completions when using VTSLS
2024-06-14 13:31:02 +02:00
Kirill Bulatov
eb7a09b459
Add excerpts into outline panel (#13034)
Follow-up of https://github.com/zed-industries/zed/pull/12637

Adds excerpt items into the outline panel: now all outline items are
initially hidden under excerpt items that could be toggled open/closed
similar to directories.


![Screenshot 2024-06-14 at 10 45
04](https://github.com/zed-industries/zed/assets/2690773/9c9ef91b-1666-43c3-acc4-96f850098a28)

On active editor's selection change, a corresponding outline will be
revealed still, expanding the corresponding excerpt

![Screenshot 2024-06-14 at 10 45
13](https://github.com/zed-industries/zed/assets/2690773/7dfd14f7-4aca-48f2-8760-8e1362b9a043)

Release Notes:

- N/A
2024-06-14 12:03:16 +03:00
Kirill Bulatov
1248788780 Add a new show whitespaces config option 2024-06-14 09:25:25 +03:00
Angelo.Mateus
64bb79b71d
Allow held key events if key is modifier (#13000)
Release Notes:

- (Fixed) Allows held down key events for modifier keys.
([#12566](https://github.com/zed-industries/zed/issues/12566))

---------

Co-authored-by: Angelo <>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-06-13 20:54:59 -06:00
Conrad Irwin
a5af5b2883
Multicursor vim registers (#13025)
Release Notes:

- vim: Added support for multicursor registers (#11687)
- vim: Added support for the `"/` register
2024-06-13 20:32:58 -06:00
Winston Hoy
068b1c235c
Add elfutils dep for Debian (#13023)
Release Notes:

- Fixed https://github.com/zed-industries/zed/issues/13021
2024-06-13 20:05:58 -06:00
Yan Qian
8edfd0a963
ui: Fix doctest (#12985)
Fix the documentation tests failed when running `cargo test --workspace`

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-06-13 20:32:41 -04:00
Owen Law
0ed5327b1c
Fix Flatpak desktop entry (#13019)
Fixes a problem where the env variable was being set in the wrong spot
in #12951

Release Notes:

- N/A
2024-06-13 20:23:49 -04:00
Mikayla Maki
10d3ad4e33
Enable linux tests (#12493)
Note:
- We have disabled all tests that rely on Postgres in the Linux CI. We
only really need to test these once, and as macOS is our team's primary
platform, we'll only enable them on macOS for local reproduction.
- We have disabled all tests that rely on the font metrics. We
standardized on Zed Mono in many fonts, but our CoreText Text System and
Cosmic Text System proved to be very different in effect. We should
revisit if we decide to standardize our text system across platforms
(e.g. using Harfbuzz everywhere)
- Extended the condition timeout significantly. Our CI machines are slow
enough that this is causing spurious errors in random tests.

Release Notes:

- N/A

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-06-13 16:38:53 -07:00
Max Brunsfeld
066cdc2297
Fix panic when doing various cursor movements with a pending mouse selection (#13016)
This fixes a panic in the `SelectionsCollection::first_anchor` when
there was a pending mouse selection and no other selections. Until
recently, this method was only used in vim mode, but as of
53b0720d54,
it's also used in the normal `move_up` and `move_down` actions.

So until recently, the panic that this fixes could only happen in vim
mode.

Release Notes:

- Fixed a crash that could happen when using certain cursor-motion
bindings with a pending mouse selection.
2024-06-13 16:22:45 -07:00
Marshall Bowers
01ba1ddef7
gpui_macros: Disable doctests (#13015)
This PR disables the doctests in the `gpui_macros` crate, as they depend
on `gpui` to run.

Since `gpui` depends on `gpui_macros`, we don't really want to add a
dependency on `gpui` (even though it _appears_ to work as a dev
dependency).

Also did some minor stylistic cleanup of some doc comments.

Release Notes:

- N/A
2024-06-13 18:45:28 -04:00
Marshall Bowers
86167138a9
rustdoc: Automatically index crates (#13014)
This PR removes the need to use `/rustdoc --index <CRATE_NAME>` and
instead indexes the crates once they are referenced.

As soon as the first `:` is added after the crate name, the indexing
will kick off in the background and update the index as it goes.

Release Notes:

- N/A
2024-06-13 18:30:15 -04:00
Marshall Bowers
e0c1ab650e
rustdoc: Fix duplicated item path (#13013)
This PR fixes a bug that was introduced in #13011 where the item path
would get duplicated twice in the database key.

Release Notes:

- N/A
2024-06-13 18:21:52 -04:00
Piotr Osiewicz
407188f816
chore: Bump Rust version to 1.79 (#12987)
This is blocked on a release of new Docker image for 1.79
(https://github.com/docker-library/official-images/pull/16981)

Release Notes:

- N/A
2024-06-13 23:05:25 +02:00
Marshall Bowers
6181ac6bad
rustdoc: Index crates progressively (#13011)
This PR updates the rustdoc indexing to be more progressive.

Rather than waiting until we've crawled the entire crate to begin
writing to the database, we instead start writing the docs as we go.

This makes it so you can start getting completions while the indexing is
still running.

Release Notes:

- N/A
2024-06-13 16:40:06 -04:00
Marshall Bowers
0705fb9b97
ui: Remove unused CollapsibleContainer component (#13009)
This PR removes the `CollapsibleContainer` component, as it wasn't used
anywhere.

Release Notes:

- N/A
2024-06-13 16:30:11 -04:00
Kyle Kelley
042be3529d
Add affordance for retry and button to visit Ollama library (#13003) 2024-06-13 13:25:24 -07:00
Marshall Bowers
1a40e98413
Render editor fold indicators using Disclosures (#13008)
This PR updates the spots where we render the fold indicators in editors
to use the `Disclosure` component instead of re-implementing similar UI.

This makes this UI more consistent across Zed.

Release Notes:

- N/A
2024-06-13 16:05:47 -04:00
Max Brunsfeld
af8e7af265
Keep symbol names in bundled linux binaries (#13006)
This ensures that linux panics still contain symbol names. It also
allows us to profile Zed on linux with `perf` and get symbol names.

Release Notes:

- N/A
2024-06-13 12:40:52 -07:00
Philip Schatz
ce51c264a6
Add libstdc++-12-dev for linux (#12962)
Release Notes:

- N/A

PS: 👋 Congrats on the release 🎊 and hey from
discussing CRDTs at the [GitPod/DevX conference last
year](https://www.youtube.com/watch?v=wXT73bBr83s)! Just read the [blog
post](https://zed.dev/blog/zed-decoded-linux-when) and thought I'd
finally try zed out (I have a linux laptop). This was the only snag I
ran into 👏
2024-06-13 12:39:58 -07:00
Marshall Bowers
702fd8f168
ui: Render disclosures with IconButtonShape::Square (#13004)
This PR adjusts the `Disclosure` component to render using
`IconButtonShape::Square`.

This tightens up the hover styles so they aren't quite so massive.

### Before

<img width="116" alt="Screenshot 2024-06-13 at 3 22 43 PM"
src="https://github.com/zed-industries/zed/assets/1486634/dea8f8fb-a041-4aa7-89be-0cd2d7889955">

### After

<img width="113" alt="Screenshot 2024-06-13 at 3 23 02 PM"
src="https://github.com/zed-industries/zed/assets/1486634/7682cce6-4f83-4f3e-b91f-3023849bd314">

Release Notes:

- Tweaked the style of disclosure controls throughout the UI.
2024-06-13 15:39:06 -04:00
Conrad Irwin
2e758dcb64
X11: Fix black flashes on boot and while resizing (#13002)
Release Notes:

- N/A
2024-06-13 13:35:38 -06:00
Bennet Bo Fenner
38d9ee3731
project panel: Support dropping files from finder (#12880)
Partially addresses #7386 



https://github.com/zed-industries/zed/assets/53836821/fc2e9864-40a8-4ada-ac95-a76a31c44437



Release Notes:

- Added support for dropping files from the finder onto the project
panel
2024-06-13 20:48:28 +02:00
Conrad Irwin
95c69d0696
Fix git watching on linux (#12989)
Release Notes:

- N/A

Co-authored-by: Nathan <nathan@zed.dev>
2024-06-13 11:59:57 -06:00
张小白
599102573a
windows: Implement window_appearance() and should_auto_hide_scrollbars() (#12527)
Release Notes:

- N/A
2024-06-13 10:52:53 -07:00
Max Brunsfeld
da281d6d8f
Fix issues where screen and window sizes contained Pixels, but were declared as DevicePixels (#12991)
On most platforms, things were working correctly, but had the wrong
type. On X11, there were some problems with window and display size
calculations.

Release Notes:

- Fixed issues with window positioning on X11

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-06-13 10:48:37 -07:00
张小白
22dc88ed3d
windows: Fix scrolling bug (#12431)
Closes #12369 



https://github.com/zed-industries/zed/assets/14981363/14df820e-9be3-4b89-882b-a083ea42d59e



Release Notes:

- N/A
2024-06-13 10:48:20 -07:00
DocKDE
3c0310273b
Add missing Linux build dependencies (#12972)
I found that builds failed on Arch and OpenSUSE so I added missing
dependencies. I also found that OpenSUSE Leap is currently not able to
install the required dependencies so I added a check to limit the
supported distros to Tumbleweed.

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-06-13 10:45:39 -07:00
Piotr Osiewicz
14bf07c916
worktree: Fix race condition when a root of worktree is .git directory (#12995)
It was possible to unload a root of worktree when it was a .git
directory; due to that, test_fs_events_in_dot_git_worktree was sometimes
stuck in an infinite loop on CI.

The gist of an issue is that when .git dir is a root dir, then modifying
a file within this directory could sometimes unload the .git dir; the
test went into an infinite loop when the first event in an filesystem
stream was not the event for the file creation, but for a dir
modification. In that case we'd unload the root directory and a
subsequent event for file creation would never be registered, leading to
the test being stuck waiting for it to happen.

This commit alleviates it by special-casing worktrees rooted in .git
directories.



Release Notes:

- Fixed a possible hang when opening a worktree in .git directory.
2024-06-13 19:24:41 +02:00
Mikayla Maki
284559742d
Disable mic and screenshare buttons on non-macOS platforms (#12994)
Release Notes:

- N/A
2024-06-13 10:16:10 -07:00
Marshall Bowers
85acc2be44
Persist index for /rustdoc in LMDB (#12988)
This PR updates the `/rustdoc` command with persistence for the
documented rustdoc items.

Now when you run `/rustdoc --index <CRATE_NAME>` it will index the crate
and store the results in LMDB.

The documented items will then be read from the database when searching
using `/rustdoc` and persist across restarts of Zed.

Release Notes:

- N/A
2024-06-13 12:07:26 -04:00
Inam Ul Haq
6c70a809ec
Update linux keybinds (#12822)
Release Notes:
- Add `ctrl-y` for Redo.
- Reorder bindings for copy/paste Fixes #11912
- Update `ctrl-b` to show hide left dock. This is the default behavior
in VSCode.


![image](https://github.com/zed-industries/zed/assets/22079654/e0cc6c0e-81df-443f-b77c-9a96370b6cb4)

### Or...

Release Notes:

- N/A
2024-06-13 08:38:27 -06:00
Joel Tony
a35947c883
Add dependencies for Ubuntu/Debian (#12959)
Release Notes:

- Fixed #12890
2024-06-13 08:36:18 -06:00
Conrad Irwin
f8ad5fe3e9
Arm builds (#12961)
Release Notes:

- N/A
2024-06-13 08:00:15 -06:00
Conrad Irwin
e2cfbc54ad
Fix headless mode (#12960)
This was broken by two things:
1. A merge conflict in the install.sh script leading to bad sh syntax
2. A return removed by accident when we refactored main

Release Notes:

- N/A
2024-06-13 07:59:28 -06:00
Piotr Osiewicz
0a13b9ee01
lsp: Provide completion reason in the request (#12893)
This should help LS make a better call about the completions it should
return back to the caller. For example, it speeds up import completions
for typescript.
Before: 


https://github.com/zed-industries/zed/assets/24362066/b38fd565-f9ff-4db7-a87f-c3b31a9fdc96

after: 


https://github.com/zed-industries/zed/assets/24362066/d4fbc9ae-9aab-4543-b9f6-16acf1619576


This should be merged after 06.12 Preview to give it some time on
Nightly.

Release Notes:

- N/A
2024-06-13 14:38:34 +02:00
Piotr Osiewicz
eb7b5a7131
project panel: Improve performance in worktrees with lots of files. (#12980)
When working on a repro for a different issue that involved a worktree
with lots of files (100k to be precise), UI became pretty unresponsive.
I pinned it down to us repeatedly preparing a HashSet of all paths in
the currently-scrolled-to worktree, once per each entry in the range
passed to for_each_visible_range (which is e.g. called during
rendering).

This PR makes that hashing happen just once per worktree. Additionally,
we no longer iterate over (potentially) all entries in a given worktree
when calculating the depth of a given entry.

Note that we could probably be smarter about this still; instead of
recalculating the hashset per each call to for_each_visible_entry, we
could do it whenever we update entries in the project panel. However,
with this PR I wanted to get a quick bang for a small buck; I'm pretty
confident in the change as is, it is relatively straightforward and
messing with worktree updates is more involved.



Release Notes:

- Improvement performance of project panel in large worktrees
2024-06-13 14:20:38 +02:00
Piotr Osiewicz
7798f64d1b
chore: Bump lsp-types to 0.97.0 (#12928)
This also includes https://github.com/gluon-lang/lsp-types/pull/287,
which should significantly reduce the time it takes for us to
deserialize completion lists.


Release Notes:
- N/A
2024-06-13 13:48:12 +02:00
yodatak
21764c38dd
Fix typo error in flatpak script (#12978)
Fix https://github.com/zed-industries/zed/issues/12977

Release Notes:

- N/A
2024-06-13 07:40:34 -04:00
Subodh Upreti
cfbf5dca7a
Add mold package for opensuse, arch, void and gentoo (#12964)
Release Notes:

- N/A
2024-06-13 10:47:37 +03:00
Kirill Bulatov
2f43d52e7e
A set of outline panel fixes (#12965)
Follow-up of https://github.com/zed-industries/zed/pull/12637

* Wrong font size for the outline items (fixes
https://github.com/zed-industries/zed/pull/12637#issuecomment-2164084021)
* Duplicate context menu item (fixes
https://github.com/zed-industries/zed/issues/12957)
* Missing `space` keybinding for item opening (fixes
https://github.com/zed-industries/zed/issues/12956)
* Adds 60px more to the default width (fixes
https://github.com/zed-industries/zed/issues/12955)
* Incorrect scroll for singleton buffers (fixes
https://github.com/zed-industries/zed/issues/12953)

Release Notes:

- N/A
2024-06-13 10:46:51 +03:00
Antonio Scandurra
e1f4dfc068
Refine inline transformation UX (#12939)
https://github.com/zed-industries/zed/assets/482957/1790e32e-1f59-4831-8a4c-722cf441e7e9



Release Notes:

- N/A

---------

Co-authored-by: Richard <richard@zed.dev>
Co-authored-by: Nathan <nathan@zed.dev>
2024-06-13 08:35:22 +02:00
Conrad Irwin
9e3c5f3e12
Docs to help people find their way back (#12958)
Release Notes:

- N/A
2024-06-12 22:10:49 -06:00
Joey Riches
f780504b68
zed.desktop.in: Don't hardcode executable name due to binary conflicts (#12951)
> * There are a couple of other `zed` binaries that may be present on
linux systems
    ([1](https://openzfs.github.io/openzfs-docs/man/v2.2/8/zed.8.html),
[2](https://zed.brimdata.io/docs/commands/zed)). If you want to rename
our CLI
binary because of these issues, we suggest `zedit`, `zeditor`, or
`zed-cli`.

Due to aformentioned issue don't hardcode the executable name in the
.desktop file so envsubst can change it in accordance with the
distributor's requirement.

Resolves #12290.

Release Notes:

- N/A
2024-06-12 17:41:25 -07:00