Commit Graph
262 Commits
Author SHA1 Message Date
Max Brunsfeld b594e59134 Lay some groundwork for language plugins (#3837)
This PR adds undocumented functionality for loading custom language
plugins at runtime. I don't intend to expose the functionality to end
users yet, but this will allow the team to test the capability
internally.

### Implementation

There isn't much new code in Zed. Most of the work here is within
Tree-sitter, in PRs https://github.com/tree-sitter/tree-sitter/pull/1864
and https://github.com/tree-sitter/tree-sitter/pull/2840, which allow
Tree-sitter to load languages from WASM blobs. I've tested the
functionality in Tree-sitter's test suite and via its CLI, but having it
wired into Zed allows us to test the functionality more fully.

### Details

Now, on startup, Zed will look for subdirectories inside of
`~/Application Support/plugins`. These subdirectories are expected to
look similar to the per-language subdirectories in
[`crates/zed2/src/languages`](https://github.com/zed-industries/zed/tree/main/crates/zed2/src/languages),
except that they also contain a `.wasm` file for the parser itself.

I'll add more details here as I go.
2024-01-03 09:37:42 -08:00
Joseph T. Lyons 3dd5641d2b Add settings events 2024-01-02 17:02:53 -05:00
Max Brunsfeld 64e512232d Start work on supporting custom languages 2024-01-02 08:01:59 -08:00
Nathan Sobo db1cf8f6e1 Rename build_view to new_view and build_model to new_model
The word "new" is shorter and blends in with `new` constructors that are common
in Rust. Been meaning to do this for a while.
2024-01-01 17:42:01 -07:00
Joseph T. Lyons 41fb29bc5a Tidy up main (#3812)
Release Notes:

- N/A
2023-12-25 07:45:39 -05:00
Piotr Osiewicz ee57658abe Fix up superfluous mod declaration 2023-12-25 13:30:27 +01:00
Joseph T. Lyons 12fe64b177 Fix more warnings 2023-12-25 07:02:19 -05:00
Piotr Osiewicz 904358263c Remove #[allow(unused)] annotations in zed2 crates (#3798)
Release Notes:

- N/A
2023-12-25 12:23:44 +01:00
Joseph T. Lyons 8f3ea6ccb3 Remove silencing of warnings and fix warnings 2023-12-25 03:47:28 -05:00
Joseph T. Lyons ada1da48ca Remove already-implemented comment 2023-12-25 03:47:03 -05:00
Joseph T. Lyons 88d05fd814 Wire up journal 2023-12-25 03:36:54 -05:00
Joseph T. Lyons 81ed861288 Migrate from device_id to installation_id key 2023-12-23 22:26:00 -05:00
Joseph T. Lyons b1870af386 Add project open event
Give the caller of report_app_event() the choice of whether to immediately flush the queue or not.
2023-12-22 20:23:55 -05:00
Kirill Bulatov b14c07ca54 Fix Zed cli actions: opening notes and joining calls 2023-12-21 14:27:13 +02:00
Max Brunsfeld afbc655100 Ensure that views' on_release callbacks are always called (#3747)
* Ensure that views' on_release callbacks are always called (even if
their window is gone), by passing them a `AppContext`, not a
`WindowContext`.
* Fix leaked handles to `CollabPanel`, `NotificationPanel`, and
`ChatPanel` caused by captures in a `ListState` render callback.

This fixes two issues we were seeing with following:
* inability to rejoin a remote project after you closed it
* following not working if a window had previously been closed
2023-12-20 16:45:37 -08:00
Max Brunsfeld 5e7c74c7b6 Ensure that on_release callbacks are called even if view outlives its window 2023-12-20 16:01:52 -08:00
Kirill Bulatov 2cd7d2db46 Remove nightly from zed1 and use proper namespaces for nightly in zed2 manifest 2023-12-21 01:18:00 +02:00
Kirill Bulatov 3586bf8b6b Display something 2023-12-20 18:23:08 +02:00
Kirill Bulatov c1f8929e43 Add new panels into zed2 2023-12-20 18:23:08 +02:00
Conrad Irwin 7e1d61d116 Merge branch 'main' into user-menu 2023-12-14 20:18:20 -07:00
Kirill Bulatov cfe7336519 Return include warnings toggle to the diagnostics panel 2023-12-14 10:00:31 +02:00
Conrad Irwin 3094cb749e Implement user menu 2023-12-13 14:14:03 -07:00
Conrad Irwin 9ff73d3a0a Port project_symbols 2023-12-13 13:43:39 -07:00
Julia 2e00da5a79 zed2 notification panel (#3603)
Release Notes:

- N/A
2023-12-12 18:04:47 -05:00
Max Brunsfeld b3e1514b00 Avoid caching zed build script if git state has changed (#3610)
@as-cii and @SomeoneToIgnore noticed a bug where Zed nightly would
continuously report that an update was available. This nightly
auto-update logic depends on the `ZED_COMMIT_SHA` constant, which is
compiled into the app via an rustc environment variable that is assigned
in the `zed2` build script.

I think the bug was caused by the `zed2` build script's output being
cached on our CI, when building the nightly app bundle. The result was
that the `publish-nightly` action updated the "current SHA" for nightly,
but uploaded an artifact whose `ZED_COMMIT_SHA` was cached from an
earlier version.

I've added a line to the `build.rs` that triggers a rerun if the
`.git/logs/HEAD` file has been changed. I think this should prevent the
unwanted caching.
2023-12-12 10:27:57 -08:00
Julia 52e72d9648 Builds and runs 2023-12-12 13:07:17 -05:00
Max Brunsfeld e3ed3b8c1c Avoid caching zed build script if git state has changed 2023-12-12 09:55:56 -08:00
JuliaandAntonio Scandurra 44d40625fe Start changing Avatar to use URI
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-12-12 11:27:40 -05:00
Kirill Bulatov 27d6432c84 Rework the way project panel auto reveals entries
* gitignored entries are never auto revealed
* `project_panel::auto_reveal_entries = true` settings entry was added,
setting it to `false` will disable the auto reveal
* `pane::RevealInProjectPanel` action was added that activates the project panel and reveals the entry it got triggered on (including the gitignored ones)
2023-12-12 11:38:51 +02:00
Max Brunsfeld bb5fa6bc13 Implement welcome view in zed2.
Still needs styling.
2023-12-11 14:48:42 -08:00
Conrad Irwin 8ed642dc16 Clear out easy todo!()s 2023-12-11 11:00:55 -07:00
Conrad Irwin b66b4915cf Merge branch 'main' into vim2 2023-12-11 09:38:23 -07:00
Piotr Osiewicz ddbd5cf2cb Merge branch 'main' into project_search2 2023-12-11 16:47:48 +01:00
Antonio Scandurra e7c14dacae Show the correct outline when clicking on a breadcrumb 2023-12-11 14:01:16 +01:00
Conrad Irwin 4290c67b6a Restore namespace parameter to actions!
This does not yet fix `derive(Action)`, but will conflict with a lot so
wanted to merge quickly.
2023-12-09 15:18:31 -07:00
Max Brunsfeld c7d8169cab Get the chat panel wired up again 2023-12-08 12:31:07 -08:00
Kirill Bulatov 0dc02b8354 Log Zed build sha in release builds.
Also ensure that curl commands for nightly uploads return 200 (fail otherwise).
2023-12-08 21:38:28 +02:00
Conrad Irwin 32837d67be vim2 compiling (but mostly commented out) 2023-12-08 18:47:14 +00:00
Piotr Osiewicz b04838c23a WIP, search bar looks kinda okay 2023-12-07 16:26:40 +01:00
Joseph T. Lyons 2a68a6171a Remove remnants from conflict resolution (#3528)
Fixes a couple of things that slipped through when going through the
last merge conflict

Release Notes:

- N/A
2023-12-06 23:44:49 -05:00
Joseph T. Lyons d2362d7f12 Merge branch 'main' into feedback-2 2023-12-06 23:16:54 -05:00
Marshall Bowers a4b271e063 Port recent_projects to Zed2 (#3525)
This PR ports the `recent_projects` crate to Zed2 (`recent_projects2`).

Absent from this PR is wiring up the "Recent Projects" item in the title
bar. We'll come back to that soon.

Release Notes:

- N/A
2023-12-06 18:41:50 -05:00
Max Brunsfeld 2d18b949ad Upgrade async-compression dep 2023-12-06 14:29:09 -08:00
Joseph T. Lyons 46c998ca8d WIP 2023-12-06 17:27:10 -05:00
Max BrunsfeldandNathan 89c8a7c242 Enable buffer font size adjustment in zed2
Co-authored-by: Nathan <nathan@zed.dev>
2023-12-06 13:52:33 -08:00
Joseph T. Lyons f4c7b13397 temp 2023-12-06 16:15:44 -05:00
Kirill Bulatov 9e1d797445 Use distinct version for zed2, append git hash to its nightly version 2023-12-06 22:04:45 +02:00
Joseph T. Lyons 4863c9ac25 WIP 2023-12-06 14:13:44 -05:00
Antonio Scandurra 14def2a1a3 Merge remote-tracking branch 'origin/main' into assistant-2
# Conflicts:
#	crates/ui2/src/components/icon.rs
2023-12-06 18:18:58 +01:00
Antonio Scandurra 7c9e2f6b7d Introduce app menus in zed2 (#3511)
Release Notes:

- N/A
2023-12-06 18:17:02 +01:00