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.
**This PR also bumps wasmtime version from 0.38 to 2.0 as 0.38 does not
build with Rust 1.75**. I did not test the plugin runtime as (AFAIK) we
intend to deprecate it; also, wasmtime's most recent version is 16.0, so
it'd make sense to bump the version at some point anyways. I did not
bump the version to 16.0 straight away as that'd require code changes in
`plugin_runtime`.
Release Notes:
- N/A
This PR fixes the names of the Rosé Pine themes.
We want to keep the Unicode "é" in the theme name, both because this is
the actual name of the theme, and also to maintain parity with Zed1.
Release Notes:
- N/A
This PR adds the ability to warn in the `theme_importer` when a theme is
missing values.
Providing the `--warn-on-missing` flag to the `theme_importer` will
print a warning for missing theme value when printing the theme.
```sh
cargo run -p theme_importer -- --warn-on-missing
```
Release Notes:
- N/A
This PR builds on top of #3652 by adding a selection prompt to the
storybook to allow you to choose from the available list of stories if
you don't provide one explicitly:
<img width="1387" alt="Screenshot 2023-12-14 at 12 00 26 PM"
src="https://github.com/zed-industries/zed/assets/1486634/640d62a3-1340-45f1-9746-69b513faff62">
This way we don't have to keep generating the `script/storybook` script
whenever stories are added/removed.
#### Usage (through `cargo`):
```sh
# Select from the available stories
cargo run -p storybook2
# Run a specific story
cargo run -p storybook2 -- components/list_item
```
#### Usage (through `script/storybook`):
```sh
# Select from the available stories
./script/storybook
# Run a specific story
./script/storybook list_item
```
Release Notes:
- N/A
Header and footer are gonna be added in a separate PR as they require
changes to Picker trait that I feel are separate from the contents of
this PR.
Release Notes:
- N/A
This was broken because of the async hop introduced by should_dismiss.
Change that API to instead be syncronous, and require that implementors
(of which there is only one) to call dismiss again if they want to.
We can also use these maps and sets in place of `SeaHasher` because
they are also deterministic. Note that we're not swapping std's
`HashMap` and `HashSet` wholesale inside of `collections` because
on the server we need cryptographically secure collections.
This PR wires up clicks on the breadcrumb to toggle the symbol outline.
Note that the behavior of the symbol outline is a little wonky at the
moment, due to the issues with pane focus.
Release Notes:
- N/A
This PR fixes an issues where the hex colors in the generated themes
were not correct.
We're using the [`palette`](https://crates.io/crates/palette) crate to
perform the conversions, as this gives us accurate hex codes that match
the VS Code source themes.
Release Notes:
- N/A
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
This PR fixes the layout for terminal tabs.
We need to use an `h_stack` here to get the icon and the label to
position themselves next to each other instead of one on top of the
other.
Release Notes:
- N/A
* Current Call section of the collab panel
* Improve the collab titlebar
* Add basic UI for following
Following only partially works, but the UI for following is now in
place.
- +language_selector2
- Language Selector 2 working!
- Prevent languages showing in wrong order first
- copilot_menu2 (though only tested offling, which is insufficient)
- Dismiss tooltips at capture
- Get ChannelModal opening
[[PR Description]]
Release Notes:
- N/A
This PR decouples `call2` from `workspace2` in order to improve our
compile times.
Why pick such a small, innocent crate as `call`? It depends on
`live_kit_client`, which is not-so-innocent and is in fact stalling our
clean builds.
In this PR, `call2` depends on `workspace2`; workspace crate defines a
`CallHandler` trait for which the implementation resides in `call`; it
it then all tied together in `zed`, which passes a factory of `Box<dyn
CallHandler>` into workspace's `AppState`.
Clean debug build before this change: ~1m45s
Clean debug build after this change: ~1m25s
Clean release build before this change: ~6m30s
Clean release build after this change: ~4m30s
~Gonna follow up with release timings where I expect the change to be
more impactful (as this allows 2/3 of the infamous trio of
"project-workspace-editor" long pole to proceed quicker, without being
blocked on live-kit-client build script)~.
This should have little effect (if any) in incremental scenarios, where
live_kit_client is already built.
[release
timings.zip](https://github.com/zed-industries/zed/files/13431121/release.timings.zip)
Release Notes:
- N/A
This PR extracts the `Story` component into a separate `story` crate so
that it can be shared among various crates that define stories.
Release Notes:
- N/A
---------
Co-authored-by: Nate Butler <iamnbutler@gmail.com>
When running `script/bundle` with the new `-2` flag, we needed to adjust
the fat-binary creation step to look for the binary called `Zed2`.
We also fixed a source of intermittent build failures in `script/bundle`
due to running multiple `swift build` processes concurrently for the
`live_kit_client2` crate, building for the two architectures.
Release Notes:
NA
- [X] assistant_events
- [X] call_events
- [X] copilot_events
- [X] cpu_events
- [X] download_events
- [X] editor_events
- [X] memory_events
- [X] page_events
- [X] panic_events
---
- [X] For each of the previous tables:
- [X] backup events to comp
- [X] make new table (changing any time fields to be datetime64)
- [X] copy data
- [X] rename old table
- [X] rename new table
---
- [ ] Delete all old tables once (going to hold off on this for some
time - want to make sure things are working correctly)
- [X] we see new data coming in on new tables
- [X] old times truncate correctly
- [X] new times show millisecond values
---
- [X] check dashboards to make sure queries didn't get broken from
changing time data type
- [X] Fix broken charts
- [X] monitor vercel for runtime errors
---
- [X] zed.dev changes
- [X] chrono changes to panicked_on
- [X] Make sure new panics are good
- [X] remove commented out code and dbg code
- [X] triple check that both crate versions have the changes
- [X] make sure all event function calls use the same original arguments
- [X] Finish testing version 2
Release Notes:
- N/A
Previously text that was rendered in a flex-column would reserve the
correct
amount of space during layout, and then paint itself incorrectly.
Release Notes:
- N/A
I'm gonna land what I have, even though some features aren't ported yet,
since we're working on all of this code so actively.
* [x] get the basic structure compiling
* [x] get the panel laying out correctly
* [ ] rename / new file editor
* [ ] enable the tests
* [ ] drag and drop
* [ ] context menu