dcb8dc1
editor: Update insert_text_format based on resolved completion (#13041)
Click to expand commit body
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
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.

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

Release Notes:
- N/A
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>
Mikayla Maki
and
Conrad Irwin
created
066cdc2
Fix panic when doing various cursor movements with a pending mouse selection (#13016)
Click to expand commit body
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
https://github.com/zed-industries/zed/commit/53b0720d546b6541fbf236d2f9d2dadbce6f126e,
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.
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
Marshall Bowers
created
8616713
rustdoc: Automatically index crates (#13014)
Click to expand commit body
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
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
Piotr Osiewicz
created
6181ac6
rustdoc: Index crates progressively (#13011)
Click to expand commit body
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
This PR removes the `CollapsibleContainer` component, as it wasn't used
anywhere.
Release Notes:
- N/A
Marshall Bowers
created
042be35
Add affordance for retry and button to visit Ollama library (#13003)
Kyle Kelley
created
1a40e98
Render editor fold indicators using `Disclosure`s (#13008)
Click to expand commit body
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
Marshall Bowers
created
af8e7af
Keep symbol names in bundled linux binaries (#13006)
Click to expand commit body
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
Release Notes:
- N/A
PS: :wave: Congrats on the release :confetti_ball: 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 :clap:
Philip Schatz
created
702fd8f
ui: Render disclosures with `IconButtonShape::Square` (#13004)
Click to expand commit body
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.
Marshall Bowers
created
2e758dc
X11: Fix black flashes on boot and while resizing (#13002)
Click to expand commit body
Release Notes:
- N/A
Conrad Irwin
created
38d9ee3
project panel: Support dropping files from finder (#12880)
Click to expand commit body
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
5991025
windows: Implement `window_appearance()` and `should_auto_hide_scrollbars()` (#12527)
Click to expand commit body
Release Notes:
- N/A
张小白
created
da281d6
Fix issues where screen and window sizes contained Pixels, but were declared as DevicePixels (#12991)
Click to expand commit body
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>
Max Brunsfeld
,
Conrad Irwin
, and
Mikayla
created
3c03102
Add missing Linux build dependencies (#12972)
Click to expand commit body
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>
DocKDE
and
Marshall Bowers
created
14bf07c
worktree: Fix race condition when a root of worktree is .git directory (#12995)
Click to expand commit body
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.
Piotr Osiewicz
created
2845597
Disable mic and screenshare buttons on non-macOS platforms (#12994)
Click to expand commit body
Release Notes:
- N/A
Mikayla Maki
created
85acc2b
Persist index for `/rustdoc` in LMDB (#12988)
Click to expand commit body
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
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.

### Or...
Release Notes:
- N/A
Inam Ul Haq
created
a35947c
Add dependencies for Ubuntu/Debian (#12959)
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
Conrad Irwin
created
0a13b9e
lsp: Provide completion reason in the request (#12893)
Click to expand commit body
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
Piotr Osiewicz
created
eb7b5a7
project panel: Improve performance in worktrees with lots of files. (#12980)
Click to expand commit body
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
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
9e3c5f3
Docs to help people find their way back (#12958)
Click to expand commit body
Release Notes:
- N/A
Conrad Irwin
created
f780504
zed.desktop.in: Don't hardcode executable name due to binary conflicts (#12951)
Click to expand commit body
> * 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
Joey Riches
created
76b0120
Reveal the selected item when cycling a picker's selection (#12950)
Click to expand commit body
Release Notes:
- Fixed a bug where the selected tab was not always shown when cycling
between tabs with `ctrl-tab`.
Max Brunsfeld
created
0ac9af9
assistant: Add MVP for `/rustdoc` using indexed docs (#12952)
Click to expand commit body
This PR adds an MVP of retrieving docs using the `/rustdoc` command from
an indexed set of docs.
To try this out:
1. Build local docs using `cargo doc`
2. Index the docs for the crate you want to search using `/rustdoc
--index <CRATE_NAME>`
- Note: This may take a while, depending on the size of the crate
3. Search for docs using `/rustdoc my_crate::path::to::item`
- You should get completions for the available items
Here are some screenshots of it in action:
<img width="640" alt="Screenshot 2024-06-12 at 6 19 20 PM"
src="https://github.com/zed-industries/zed/assets/1486634/6c49bec9-d084-4dcb-a92c-1b4c557ee9ce">
<img width="636" alt="Screenshot 2024-06-12 at 6 52 56 PM"
src="https://github.com/zed-industries/zed/assets/1486634/636a651c-7d02-48dc-b05c-931f33c49f9c">
Release Notes:
- N/A
Adds a new panel: `OutlinePanel` which looks very close to project
panel:
<img width="256" alt="Screenshot 2024-06-10 at 23 19 05"
src="https://github.com/zed-industries/zed/assets/2690773/c66e6e78-44ec-4de8-8d60-43238bb09ae9">
has similar settings and keymap (actions work in the `OutlinePanel`
context and are under `outline_panel::` namespace), with two notable
differences:
* no "edit" actions such as cut/copy/paste/delete/etc.
* directory auto folding is enabled by default
Empty view:
<img width="841" alt="Screenshot 2024-06-10 at 23 19 11"
src="https://github.com/zed-industries/zed/assets/2690773/dc8bf37c-5a70-4fd5-9b57-76271eb7a40c">
When editor gets active, the panel displays all related files in a tree
(similar to what the project panel does) and all related excerpts'
outlines under each file.
Same as in the project panel, directories can be expanded or collapsed,
unfolded or folded; clicking file entries or outlines scrolls the buffer
to the corresponding excerpt; changing editor's selection reveals the
corresponding outline in the panel.
The panel is applicable to any singleton buffer:
<img width="1215" alt="Screenshot 2024-06-10 at 23 19 35"
src="https://github.com/zed-industries/zed/assets/2690773/a087631f-5c2d-4d4d-ae25-30ab9731d528">
<img width="1728" alt="image"
src="https://github.com/zed-industries/zed/assets/2690773/e4f8082c-d12d-4473-8500-e8fd1051285b">
or any multi buffer:
(search multi buffer)
<img width="1728" alt="Screenshot 2024-06-10 at 23 19 41"
src="https://github.com/zed-industries/zed/assets/2690773/60f768a3-6716-4520-9b13-42da8fd15f50">
(diagnostics multi buffer)
<img width="1728" alt="image"
src="https://github.com/zed-industries/zed/assets/2690773/64e285bd-9530-4bf2-8f1f-10ee5596067c">
Release Notes:
- Added an outline panel to show a "map" of the active editor
Kirill Bulatov
created
7f56f4e
Add libgit2 build dependency to Arch-based distros (#12924)
Click to expand commit body
Release Notes:
- N/A
DocKDE
created
6fa347d
Move rustdoc-related code to `rustdoc` crate (#12945)
Click to expand commit body
This PR moves the rustdoc-related code out of `html_to_markdown` and
into the `rustdoc` crate.
Release Notes:
- N/A