In this PR, we've added two new methods that LSP extensions can call:
* `shell_env()`, for retrieving the environment variables set in the
user's default shell in the worktree
* `which(command)`, for looking up paths to an executable (accounting
for the user's shell env in the worktree)
To test this out, we moved the `uiua` language support into an
extension. We went ahead and removed the built-in support, since this
language is extremely obscure. Sorry @mikayla-maki. To continue coding
in Uiua in Zed, for now you can `Add Dev Extension` from the extensions
pane, and select the `extensions/uiua` directory in the Zed repo. Very
soon, we'll support publishing these extensions so that you'll be able
to just install it normally.
Release Notes:
- N/A
---------
Co-authored-by: Marshall <marshall@zed.dev>
This PR provides WASM extensions with write access to their own specific
working directory under the Zed `extensions` dir. This directory is set
as the extensions `current_dir` when they run. Extensions can return
relative paths from the `Extension::language_server_command` method, and
those relative paths will be interpreted relative to this working dir.
With this functionality, most language servers that we currently build
into zed can be installed using extensions.
Release Notes:
- N/A
This reduces the server time to compute the hash from 40ms to 5µs,
which should remove this as a noticable chunk of CPU time in production.
(An attacker who has access to our database will now need only 10^54
years of CPU time instead of 10^58 to brute force a token).
Release Notes:
- Improved sign in latency by 40ms.
This PR adds an `zed: Install Local Extension` action, which lets you
select a path to a folder containing a Zed extension, and install that .
When you select a directory, the extension will be compiled (both the
Tree-sitter grammars and the Rust code for the extension itself) and
installed as a Zed extension, using a symlink.
### Details
A few dependencies are needed to build an extension:
* The Rust `wasm32-wasi` target. This is automatically installed if
needed via `rustup`.
* A wasi-preview1 adapter WASM module, for building WASM components with
Rust. This is automatically downloaded if needed from a `wasmtime`
GitHub release
* For building Tree-sitter parsers, a distribution of `wasi-sdk`. This
is automatically downloaded if needed from a `wasi-sdk` GitHub release.
The downloaded artifacts are cached in a support directory called
`Zed/extensions/build`.
### Tasks
UX
* [x] Show local extensions in the Extensions view
* [x] Provide a button for recompiling a linked extension
* [x] Make this action discoverable by adding a button for it on the
Extensions view
* [ ] Surface errors (don't just write them to the Zed log)
Packaging
* [ ] Create a separate executable that performs the extension
compilation. We'll switch the packaging system in our
[extensions](https://github.com/zed-industries/extensions) repo to use
this binary, so that there is one canonical definition of how to
build/package an extensions.
### Release Notes:
- N/A
---------
Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
### Description
This is a part of #8809 , impl the following functions:
- `os_version`
- `local_timezone`
- `double_click_interval`
- `set_cursor_style`
- `open_url`
- `reveal_path`
Release Notes:
- N/A
---------
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
This PR moves the Clippy configuration up to the workspace level.
We're using the [`lints`
table](https://doc.rust-lang.org/cargo/reference/workspaces.html#the-lints-table)
to configure the Clippy ruleset in the workspace's `Cargo.toml`.
Each crate in the workspace now has the following in their own
`Cargo.toml` to inherit the lints from the workspace:
```toml
[lints]
workspace = true
```
This allows for configuring rust-analyzer to show Clippy lints in the
editor by using the following configuration in your Zed `settings.json`:
```json
{
"lsp": {
"rust-analyzer": {
"initialization_options": {
"check": {
"command": "clippy"
}
}
}
}
```
Release Notes:
- N/A
This PR sets up a `cargo xtask clippy` command for running `cargo
clippy` with our defined set of options.
The intent is to make this easier to manage as we start enabling more
Clippy rules.
Release Notes:
- N/A
This PR upgrades our [`bitflags`](https://crates.io/crates/bitflags)
dependency to v2.4.2.
This also fixes an error that was seen when running `clippy`:
```
error: &-masking with zero
--> crates/fsevent/src/fsevent.rs:19:1
|
19 | / bitflags! {
20 | | #[repr(C)]
21 | | pub struct StreamFlags: u32 {
22 | | const NONE = 0x00000000;
... |
46 | | }
47 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bad_bit_mask
= note: `#[deny(clippy::bad_bit_mask)]` on by default
= note: this error originates in the macro `__impl_bitflags` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)
```
Fixes#8681.
Release Notes:
- N/A
This PR adds **internal** ability to run arbitrary language servers via
WebAssembly extensions. The functionality isn't exposed yet - we're just
landing this in this early state because there have been a lot of
changes to the `LspAdapter` trait, and other language server logic.
## Next steps
* Currently, wasm extensions can only define how to *install* and run a
language server, they can't yet implement the other LSP adapter methods,
such as formatting completion labels and workspace symbols.
* We don't have an automatic way to install or develop these types of
extensions
* We don't have a way to package these types of extensions in our
extensions repo, to make them available via our extensions API.
* The Rust extension API crate, `zed-extension-api` has not yet been
published to crates.io, because we still consider the API a work in
progress.
Release Notes:
- N/A
---------
Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This lets us run rustc_demangle on the backtrace, which helps the Slack
view significantly.
We're also now uploading files to digital ocean's S3 equivalent (with a
1 month expiry) instead of to Slack.
This PR paves the way for (but does not yet implement) sending this data
to clickhouse too.
Release Notes:
- N/A
This practice makes it difficult to locate todo!s in my code when I'm
working. Let's take out the bang if we want to keep doing this.
Release Notes:
- N/A
After upgrading to Wasmtime 18, we got crashes when running Zed in debug
mode. While bisecting the Wasmtime commits and trying to identify the
source of the crash, we noticed this Wasmtime PR, which increased the
stack size of background threads in an example. This alerted us to the
possibility that a stack overflow might be happening due to a lot of
stack usage by cranelift.
https://github.com/bytecodealliance/wasmtime/pull/7651
Release Notes:
- N/A
Co-authored-by: Marshall <marshall@zed.dev>
This PR introduces a new `command_palette_hooks` crate that contains the
types used to hook into the behavior of the command palette.
The `CommandPaletteFilter` was previously extracted to the `copilot`
crate in #7095, solely because that was the earliest ancestor of the
crates that depended on it.
The `CommandPaletteInterceptor` was still defined in `command_palette`
itself.
Both of these types were consumed by other crates wanting to influence
the behavior of the command palette, but required taking a dependency on
the entire `command_palette` crate in order to gain access to these
hooks.
By moving them out into their own crate, we can improve the compile
order and make crates like `vim` able to begin building sooner without
having to wait for `command_palette` to finish compiling.
Here's a comparison of the compilation graph before and after (ignore
the timings):
#### Before
<img width="332" alt="Screenshot 2024-02-25 at 12 42 29 PM"
src="https://github.com/zed-industries/zed/assets/1486634/a57c662e-fbc2-41ab-9e30-cca17afa6c73">
#### After
<img width="362" alt="Screenshot 2024-02-25 at 12 51 15 PM"
src="https://github.com/zed-industries/zed/assets/1486634/c1a6d29c-b607-4604-8f1b-e5d318bf8849">
Release Notes:
- N/A
This PR removes the unused crates for plugin support.
We're currently exploring Wasm-based extensions, and it's unlikely that
we'll be reusing any of this existing work.
Release Notes:
- N/A
This is a follow up to #7945. The current behaviour reads the locale and
infers from that which type of time format should be used (12 hour/24
hour).
However, in macOS you can override this behaviour, e.g. you can use
en_US locale but still use the 24 hour clock format (Can be customized
under Settings > General > Date & Format > 24-hour time). You can even
customize the date format.
This PR uses the macOS specific `CFDateFormatter` API, which outputs
time format strings, that respect those settings.
Partially fixes#7956 (as its not implemented for linux)
Release Notes:
- Added localization support for all macOS specific date and time
configurations in chat
- Moves languages module from `zed` into a separate crate. That way we
have less of a long pole at the end of compilation.
- Removes moot dependencies on editor/picker. This is totally harmless
and might help in the future if we decide to decouple picker from
editor.
Before:
```
Number of crates that depend on 'picker' but not on 'editor': 1
Total number of crates that depend on 'picker': 13
Total number of crates that depend on 'editor': 30
```
After:
```
Number of crates that depend on 'picker' but not on 'editor': 5
Total number of crates that depend on 'picker': 12
Total number of crates that depend on 'editor': 26
```
The more crates depend on just picker but not editor, the better in that
case.
Release Notes:
- N/A
After a lot of back-and-forth, this is a small attempt to implement
solutions (1) and (3) in
https://github.com/zed-industries/zed/issues/7902. The goal is to have a
minimal change that helps users get started with Zed, until we have
extensions ready.
Release Notes:
- Added detection of user-installed `gopls` to Go language server
adapter. If a user has `gopls` in `$PATH` when opening a worktree, it
will be used.
- Added detection of user-installed `zls` to Zig language server
adapter. If a user has `zls` in `$PATH` when opening a worktree, it will
be used.
Example:
I don't have `go` installed globally, but I do have `gopls`:
```
~ $ which go
go not found
~ $ which gopls
/Users/thorstenball/code/go/bin/gopls
```
But I do have `go` in a project's directory:
```
~/tmp/go-testing φ which go
/Users/thorstenball/.local/share/mise/installs/go/1.21.5/go/bin/go
~/tmp/go-testing φ which gopls
/Users/thorstenball/code/go/bin/gopls
```
With current Zed when I run `zed ~/tmp/go-testing`, I'd get the dreaded
error:
![screenshot-2024-02-23-11 14
08@2x](https://github.com/zed-industries/zed/assets/1185253/822ea59b-c63e-4102-a50e-75501cc4e0e3)
But with the changes in this PR, it works:
```
[2024-02-23T11:14:42+01:00 INFO language::language_registry] starting language server "gopls", path: "/Users/thorstenball/tmp/go-testing", id: 1
[2024-02-23T11:14:42+01:00 INFO language::language_registry] found user-installed language server for Go. path: "/Users/thorstenball/code/go/bin/gopls", arguments: ["-mode=stdio"]
[2024-02-23T11:14:42+01:00 INFO lsp] starting language server. binary path: "/Users/thorstenball/code/go/bin/gopls", working directory: "/Users/thorstenball/tmp/go-testing", args: ["-mode=stdio"]
```
---------
Co-authored-by: Antonio <antonio@zed.dev>
[Profiling](https://crates.io/crates/profiling) crate allows easy
integration with various profiler tools. The best thing is - annotations
compile to nothing unless you request a specific feature.
For example, I used this command to enable Tracy support:
```bash
cargo run --features profiling/profile-with-tracy
```
At the same time I had Tracy tool open and waiting for connection. It
gathered nice stats from the run:
![zed-profiler](https://github.com/zed-industries/zed/assets/107301/5233045d-078c-4ad8-8b00-7ae55cf94ebb)
Release Notes:
- N/A
This PR bumps the tree-sitter-nu commit to the latest supported by the
nushell team. It also includes the latest highlights.scm
Release Notes:
Bumped `nu` tree sitter dependency and highlights.scm
@ConradIrwin here's our current implementation for auto detecting links
in the chat.
We also fixed an edge case where the close reply to preview button was
cut off (rendered off screen).
Release Notes:
- Added auto detection for links in the chat panel.
---------
Co-authored-by: Remco Smits <62463826+RemcoSmitsDev@users.noreply.github.com>
This is a compilation of fixes for errors that appeared in dependent
crates in Windows.
- wezterm (zed-industries/wezterm#1)
- tree-sitter-svelte (Himujjal/tree-sitter-svelte#54)
- tree-sitter-uiua (shnarazk/tree-sitter-uiua#25)
- tree-sitter-haskell (I sent a PR, but upstream source is regenerated
and no longer errors.)
Release Notes:
- N/A
Part of #7108
This PR includes just the static runnables part. We went with **not**
having a dedicated panel for runnables.
This is just a 1st PR out of N, as we want to start exploring the
dynamic runnables front. Still, all that work is going to happen once
this gets merged.
Release Notes:
- Added initial, static Runnables support to Zed. Such runnables are defined in
`runnables.json` file (accessible via `zed: open runnables` action) and
they can be spawned with `runnables: spawn` action.
---------
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Co-authored-by: Pitor <pitor@zed.dev>
Co-authored-by: Beniamin <beniamin@zagan.be>
This commit addresses the issue of time formats displayed in the chat
panel. Previously, the time was always displayed in a 12-hour format,
regardless of the user's locale. The `format_timestamp` function has
been updated to check the system locale and format the time accordingly.
Release Notes:
- Fixed time formatting in the chat panel to be locale based.
This PR upgrades our `toml` dependency to v0.8.
I noticed that our current version of `toml` wasn't able to parse
certain kinds of documents involving enums, whereas the newer version
can.
Release Notes:
- N/A
Depends on https://github.com/zed-industries/font-kit/pull/2 and
https://github.com/kvark/blade/pull/77
This change enables Blade to be also used on MacOS. It will also make it
easier to use it on Windows.
What works: most of the things. Zed loads as fast and appears equally
responsive to the current renderer.
<img width="306" alt="Screenshot 2024-02-11 at 12 09 15 AM"
src="https://github.com/zed-industries/zed/assets/107301/66d82f45-5ea2-4e2b-86c6-5b3ed333c827">
Things missing:
- [x] video streaming. ~~Requires a bit of plumbing on both Blade and
Zed sides, but all fairly straightforward.~~
- verified with a local setup
- [x] resize. ~~Not sure where exactly to hook up the reaction on the
window size change. Once we know where, the fix is one line.~~
- [ ] fine-tune CA Layer
- this isn't a blocker for merging the PR, but it would be a blocker if
we wanted to switch to the new path by default
- [ ] rebase on latest, get the dependency merged (need review/merge of
https://github.com/zed-industries/font-kit/pull/2!)
Update: I implemented resize support as well as "surface" rendering on
the Blade path (which will be useful on Linux/Windows later on). I
haven't tested the latter though - not sure how to get something
streaming. Would appreciate some help! I don't think this should be a
blocker to this PR, anyway.
The only little piece that's missing for the Blade on MacOS path to be
full-featured is fine-tuning the CALayer configuration. Zed does a lot
of careful logic in configuring the layer, such as switching the
"present with transaction" on/off intermittently, which Blade path
doesn't have yet.
Release Notes:
- N/A
---------
Co-authored-by: Mikayla <mikayla@zed.dev>
This PR disables the formatting for `.toml` files within the Zed repo,
as the formatter provided by the TOML language server messes things up.
Release Notes:
- N/A
This PR adds a REST API to the collab server for searching and
downloading extensions. Previously, we had implemented this API in
zed.dev directly, but this implementation is better, because we use the
collab database to store the download counts for extensions.
Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Conrad <conrad@zed.dev>
This PR adds a view for installing extensions within Zed.
My subtasks:
- [X] Page Extensions and assign in App Menu
- [X] List extensions
- [X] Button to Install/Uninstall
- [x] Search Input to search in extensions registry API
- [x] Get Extensions from API
- [x] Action install to download extension and copy in /extensions
folder
- [x] Action uninstall to remove from /extensions folder
- [x] Filtering
- [x] Better UI Design
Open to collab!
Release Notes:
- Added an extension installation view. Open it using the `zed:
extensions` action in the command palette
([#7096](https://github.com/zed-industries/zed/issues/7096)).
---------
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Carlos <foxkdev@gmail.com>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Co-authored-by: Max <max@zed.dev>
Current limitations:
* Not able to navigate into JAR files
Release Notes:
- Added Clojure language support
---------
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
This PR adds the initial support for loading extensions in Zed.
### Extensions Directory
Extensions are loaded from the extensions directory.
The extensions directory has the following structure:
```
extensions/
installed/
extension-a/
grammars/
languages/
extension-b/
themes/
manifest.json
```
The `manifest.json` file is used internally by Zed to keep track of
which extensions are installed. This file should be maintained
automatically, and shouldn't require any direct interaction with it.
Extensions can provide Tree-sitter grammars, languages, and themes.
Release Notes:
- N/A
---------
Co-authored-by: Marshall <marshall@zed.dev>
Terraform and HCL are almost the same language, but not quite so
proposing them as separate languages within Zed. (Terraform is an
extension of HCL, with a different formatter.)
This is just adding the language definition, parsing and highlighting
functionality, not any LSP or formatting beyond that for either
language.
I've taken a bunch of inspiration from Neovim for having the separate
languages, and also lifted some of their `scm` files (with attribution
comments in this codebase) as the tree-sitter repo doesn't contain them.
(Neovim's code is Apache-2.0 licensed, so should be fine here with
attribution from reading Zed's licenses files.) I've then amended to
make sure the capture groups are named for things Zed understands. I'd
love someone from Zed to confirm that's okay, or if I should clean-room
implement the `scm` files.
Highlighting in Terraform & HCL with a moderate amount of syntax in a
file (Terraform on left, HCL on right.)
<img width="1392" alt="Screenshot 2024-01-31 at 18 07 45"
src="https://github.com/zed-industries/zed/assets/696/1d3c9a08-588e-4b8f-ad92-98ce1e419659">
Release Notes:
- (|Improved) ...
([#5098](https://github.com/zed-industries/zed/issues/5098)).
Adds a "markdown: open preview" action to open a markdown preview.
https://github.com/zed-industries/zed/assets/18583882/6fd7f009-53f7-4f98-84ea-7dd3f0dd11bf
This PR extends the work done in `crates/rich_text` to render markdown
to also support:
- Variable heading sizes
- Markdown tables
- Code blocks
- Block quotes
## Release Notes
- Added `Markdown: Open preview` action to partially close
([#6789](https://github.com/zed-industries/zed/issues/6789)).
## Known issues that will not be included in this PR
- Images.
- Nested block quotes.
- Footnote Reference.
- Headers highlighting.
- Inline code highlighting (this will need to be implemented in
`rich_text`)
- Checkboxes (`- [ ]` and `- [x]`)
- Syntax highlighting in code blocks.
- Markdown table text alignment.
- Inner markdown URL clicks
Part of https://github.com/zed-industries/zed/issues/7096
* [x] Load all queries for language plugins, not just highlight query
* [x] Auto-reload languages when changing the `plugins` directory
* [x] Bump Tree-sitter for language loading and unloading fixes
* [x] Figure out code signing
Release Notes:
- N/A
---------
Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This PR sorts the dependency lists in our `Cargo.toml` files so that
they are in alphabetical order.
This should make them easier to visually scan when looking for a
dependency.
Apologies in advance for any merge conflicts 🙈
Release Notes:
- N/A
This PR adds the ability to copy the permalink to a line from within
Zed.
This functionality is available through the `editor: copy permalink to
line` action in the command palette:
<img width="589" alt="Screenshot 2024-01-30 at 7 07 46 PM"
src="https://github.com/zed-industries/zed/assets/1486634/332282cb-211f-4f16-9eb1-415bcfee9b7b">
Executing this action will create a permalink to the currently selected
line(s) and copy it to the clipboard.
Here is an example line:
```
56c80e8011/src/lib.rs (L25)
```
Currently, both GitHub and GitLab are supported.
### Notes and known limitations
- In order to determine where to permalink to, we read the URL of the
`origin` remote in Git. This feature will not work if the `origin`
remote is not present.
- Attempting to permalink to a ref that is not pushed to the origin will
result in the link 404ing.
- Attempting to permalink when Git is in a dirty state may not generate
the right link.
- For instance, modifying a file (e.g., adding new lines) and grabbing a
permalink to it will result in incorrect line numbers.
Release Notes:
- Added the ability to copy a permalink to a line
([#6777](https://github.com/zed-industries/zed/issues/6777)).
- Available via the `editor: copy permalink to line` action in the
command palette.
This should prevent a class of bugs where one queries the wrong type of
global, which results in oddities at runtime.
Release Notes:
- N/A
---------
Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This PR upgrades `tree-sitter-php` to v0.21.1.
Here is the diff between our current version and this version:
d43130fd15...29a49d3a53
The primary impetus for this change is to get this change that adds the
`license` field to the `Cargo.toml`:
https://github.com/tree-sitter/tree-sitter-php/pull/193
This will silence the warning that is shown when running
`script/generate-licenses`.
Release Notes:
- Upgraded `tree-sitter-php` to v0.21.1.
This PR bumps our version of `tree-sitter-haskell` for the addition of
the `license` field in
https://github.com/tree-sitter/tree-sitter-haskell/pull/112.
This will silence the warning that is shown when running
`script/generate-licenses`.
Release Notes:
- N/A
This reduces size of release binary by ~20% from 134MB to 107MB without noticeable slowdown on startup. Assets are decompressed granularly, on first access
This essentially shaves off about 10% off of an incremental build after
project change and potentially more if you're changing stuff like
`welcome` that's very close to the `zed` crate in the dep graph. That's
because macro expansion takes place even in incremental builds it seems?
And zed (lib) + zed (bin) could take up to 4 seconds out of an
incremental build, which is a *lot* in a 10s build. In reality though it
shaves 1 second off of 5 seconds incremental 'welcome'/ 1s off of 10s
'project' builds.
Note that we had `assets` crate in the past (removed in #2575 /cc
@maxbrunsfeld), but this is a bit different, because `assets` is a
dependency of *just* zed and nothing else. We essentially cache macro
expansion results ourselves.
Release Notes:
- N/A
This PR upgrades our version of `ctor` to v0.2.6.
We were previously using a fork that contained this fix:
https://github.com/mmastrac/rust-ctor/pull/295.
A new version of `ctor` has now been released with that change, so we
can switch back to the mainline version.
I scanned through the diff between versions (since we're upgrading from
effectively v0.1.20) and didn't notice anything that seemed obviously
breaking:
564b87f1dc...ee6b4b1c7b
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 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 one does not contain variable-level debug info; since we mostly rely on backtraces though, this should be fine. It also improves compile times a bunch for both incremental and clean scenarios.
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>
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
This PR switches us over to a fork of `ctor` that contains the fixes
from https://github.com/mmastrac/rust-ctor/pull/295, backported to our
current version of `ctor` (v0.1.20).
Once 1) the `ctor` maintainer publishes a new version with that change
and 2) we're ready to upgrade to the latest version of `ctor` we can
switch back to the mainline version.
Release Notes:
- N/A
Vue.js defined a bunch of symbols in it's scanner that collided with those defined in HTML Tree-sitter grammar. I simply removed them as they were meant for consumption by the external parties interested in HTML parser with Vue support - since we handle that ourselves this is not really necessary to preserve anymore. cc was firing up a bunch of warnings about unused symbols, so yeah.
This PR removes the old `Theme` definition in favor of the new
`ThemeVariant`s.
The new `SyntaxStyles` have been reverted to the old `SyntaxTheme` that
operates by storing the syntax styles as a vector of
`gpui2::HighlightStyle`s.
This is necessary for the intended usage by `language2`, where we find
the longest key in the theme's syntax styles that matches the capture
name:
18431051d9/crates/language2/src/highlight_map.rs (L15-L41)