31516b7
`TextStyle::default()` ask system for known existing font family
Click to expand commit body
Rather than assuming a specific family exists, try a set of specific
names and if they fail, just grab any old font that the system reports
as existing
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
dc36547
Merge remote-tracking branch 'origin/main' into assistant-2
Antonio Scandurra
created
1fc9103
Remove methods taking `&mut Workspace` from `Pane` (#2540)
Click to expand commit body
This pull request simplifies the `Pane` struct by replacing methods like
`Pane::add_item` that would previously take a `&mut Workspace` with
methods that take a `&mut self`. When access to the workspace is needed,
we now either emit an event from the `Pane` or directly move the method
to the `Workspace` struct.
Antonio Scandurra
created
bd49403
Call `ItemHandle::added_to_pane` when an item is added to a pane
I was having fun, but it was too much. It makes the assistant too
annoying to be useful.
Release Notes:
Use `N/A` in this section if this item should be skipped in the release
notes.
Add release note lines here:
* Dialed back the system prompt on the assistant.
* ESC (project_search::ToggleFocus) toggles focus from include/exclude
fields to the editor
* Cmd+Shift+F (workspace::NewSearch) can be triggered from the editor,
and moves focus to the query editor
Release Notes:
* Improved project search panel shortcut handling, allowing more actions
to trigger from panel elements
* ESC (project_search::ToggleFocus) toggles focus from
include/exclude fields to the editor
* Cmd+Shift+F (workspace::NewSearch) can be triggered from the editor,
and moves focus to the query editor
Current `lsp-types:0.91.1` crate lacks inlay hints' definitions. Crate's
changelog is not very descriptive, but it appears that `0.92.1` could be
used:
https://github.com/gluon-lang/lsp-types/blob/master/CHANGELOG.md#v0921-2022-03-21
The latest is crate version is `0.94.0` (2023-02-08), the PR updates Zed
to the latest version.
Notable changes:
* workspace symbols may arrive unresolved if the corresponding client
capability is enabled:
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#partialResults
Zed has this capability disabled, forcing all symbols to arrive
synchronously (?).
Resolve capabilities are important for inlay hints too, but I've not
found any code in Zed for that outside tests, so I'd love to learn more
and implement the resolution for workspace symbols separately.
* since LSP `3.17` (current), watch file changes can use relative glob
patterns:
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_didChangeWatchedFiles
That seemed just a straightforward extra `match` to use the same Ruse
`Glob` to handle the relative path one.
Release Notes:
N/A
Kirill Bulatov
created
404beba
Set markdown as the assistant's buffer languages
e453047
Make worktree `UpdatedEntries` events fully describe all changes (#2533)
Click to expand commit body
This PR makes the worktree's change events more useful in a few ways:
* The changes are now described by a cheaply clone-able collection, so
that they can be used in background tasks. Right now, I'm using a simple
Arc slice.
* The `UpdatedEntries` event now captures not only changes due to FS
changes, but also newly-loaded paths that are discovered during the
initial scan.
* The `UpdatedGitRepositories` event now includes repositories whose
work-dir changed but git dir didn't change. A boolean flag is included,
to indicate whether the git content changed.
* The `UpdatedEntries` and `UpdatedGitRepositories` events are now
*used* to compute the worktree's `UpdateWorktree` messages, used to sync
changes to guests. This unifies two closely-related code paths, and
makes the host more efficient when collaborating, because the
`UpdateWorktree` message computation used to require walking the entire
`entries` tree on every FS change.
Max Brunsfeld
created
1f42bfc
Include repositories with workdir changes in worktree UpdatedGitRepsositories event
Max Brunsfeld
created
2db57b5
Adjust diagnostic transformation test to not wait for two buffer notifications
Max Brunsfeld
created
02b95ef
Derive worktree update messages from existing change events
Fixes
https://linear.app/zed-industries/issue/Z-1793/file-finder-external-recent-paths-are-not-rendered-properly
Long paths get trimmed, but same do many of our other elements, such as
type definitions, so I think it's ok for now:

Also, we seem to do a lot of odd diagnostics handling on every external
stdlib file opened:

Other external files also emit similar messages, but not that much.
@\mikayla-maki mentioned, that this was happening before, so can be
fixed separately.
The PR adds path printing to these logs.
Release Notes:
* Fixed external files not being displayed properly in the recently
opened list in the file finder panel
6628c4d
Store worktree changes in a sorted arc slice, not a HashMap
Click to expand commit body
We don't need to look-up change types by an arbitrary key, but we
do need to iterate it. It would also be useful to be able to
cheaply clone the changes, to use them in a background task.
Max Brunsfeld
created
59bfd40
Make stricter assertions about change events in random worktree test
Max Brunsfeld
created
f890eef
Include paths loaded during initial scan in worktree UpdatedEntries event
Max Brunsfeld
created
80080a4
Start on an assistant panel based on multi-buffers
Click to expand commit body
Each message is represented as a multibuffer excerpt to allow for
fluid editing of the conversation transcript.
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
128c198
Fix duplicate item creation in project panel (#2532)
Click to expand commit body
Closes
https://linear.app/zed-industries/issue/Z-1760/creating-a-new-file-with-the-same-name-as-an-existing-file-overwrites
Now every rename/creation editor won't do anything if a duplicate name
is submitted.
Release Notes:
* Fixed a bug when created in project panel items with duplicate names
were overwriting the old files
Kirill Bulatov
created
5501dd7
Fix duplicate item creation in project panel
This took so much longer than I wanted, so glad to finally be rid of
this
Release Notes:
* Improved performance when editing many git-tracked files in a
multi-buffer at the same time
Julia
created
5e39ba5
Clean up final remaining code paths calling old diff update method