Commit Graph

34 Commits

Author SHA1 Message Date
Marshall Bowers
05003ed4c5
Hoist strum to workspace level (#15243)
This PR hoists `strum` up to a workspace dependency.

Release Notes:

- N/A
2024-07-25 21:30:48 -04:00
Conrad Irwin
b87d1eabcc
linux: Panic less on window init (#14255)
This change pulls in https://github.com/kvark/blade/pull/135 and updates
the simplelog dependency for compatibility with that.


Release Notes:

- linux: Show link to troubleshooting docs when we can't open a window
2024-07-11 16:04:46 -06:00
Marshall Bowers
57b87be3a0
Hoist indexmap to workspace level (#12901)
This PR hoists `indexmap` up to a workspace dependency.

Release Notes:

- N/A
2024-06-11 15:31:55 -04:00
Marshall Bowers
22fe03913c
Move Clippy configuration to the workspace level (#8891)
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
2024-03-05 12:01:17 -05:00
Marshall Bowers
c9a509c805
Add cargo xtask clippy (#8722)
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
2024-03-02 14:46:02 -05:00
Conrad Irwin
9765260567
Upgrade palette (#8506)
This fixes the compilation stck overflow here:
https://ogeon.github.io/2024/02/25/palette-0.7.5.html



Release Notes:

- N/A
2024-02-27 14:29:27 -07:00
Dzmitry Malyshau
cb75c57fc0
Cleanup dependencies (part 4) (#8468)
Follow-up to #8425 . Final part - adds the CI check.

Release Notes:
- N/A
2024-02-27 20:41:49 +02:00
Piotr Osiewicz
743f9b345f
chore: Move workspace dependencies to workspace.dependencies (#7454)
We should prefer referring to local deps via `.workspace = true` from
now on.

Release Notes:

- N/A
2024-02-06 20:41:36 +01:00
Marshall Bowers
5360c0ea28
theme_importer: Make VS Code theme parsing more lenient (#7292)
This PR updates the `theme_importer` to use `serde_json_lenient` to
parse VS Code themes.

This should allow us to parse themes that have trailing commas and such,
in addition to the comment support that we already had.

Release Notes:

- N/A
2024-02-02 12:09:05 -05:00
Marshall Bowers
e5fe811d7a
theme_importer: Add ability to print theme JSON schema (#7129)
This PR adds a quick subcommand to the `theme_importer` to facilitate
printing out the JSON schema for a theme.

Note that you do need to pass a `<PATH>` to the subcommand still, even
though it will be ignored. I'll rework the CLI to this at some point.

The JSON schema for the current version of the theme can also be found
at
[`https://zed.dev/schema/themes/v0.1.0.json`](https://zed.dev/schema/themes/v0.1.0.json).

Release Notes:

- N/A
2024-01-30 23:33:54 -05:00
Marshall Bowers
0cb8b0e451
Clean up Cargo.toml files (#7044)
This PR cleans up some inconsistencies in the `Cargo.toml` files that
were driving me crazy.

Release Notes:

- N/A
2024-01-29 23:47:20 -05:00
Marshall Bowers
5d0c144ce7
theme_importer: Define more colors in VsCodeTheme (#6960)
This PR extends the `VsCodeTheme` struct with more of the colors
available on a VS Code theme.

Release Notes:

- N/A
2024-01-28 21:55:40 -05:00
Marshall Bowers
9b453d2cbc
Remove old themes using UserTheme constructs (#6897)
This PR removes the themes defined using the `UserTheme` types, as we're
now loading the themes via JSON.

The `theme_importer` has also been reworked to read in a VS Code theme
and output a new JSON theme.

Release Notes:

- N/A
2024-01-27 16:55:37 -05:00
Marshall Bowers
0fe0683ef4
Add serialized versions of themes (#6885)
This PR adds serialized versions of each of the themes that currently
ship with Zed.

In a future PR we'll be looking to make these the canonical
representations of the built-in themes.

Note that we're intentionally repurposing the `theme_importer` to do
this, so that crate is a bit rough-and-ready at the moment.

Release Notes:

- N/A
2024-01-27 13:35:43 -05:00
Piotr Osiewicz
0a0a866dd5
Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535)
Release Notes:
- N/A
2024-01-27 13:51:16 +01:00
Piotr Osiewicz
f2ff7fa4d5
chore: Change AGPL-licensed crates to GPL (except for collab) (#4231)
- [x] Fill in GPL license text.
- [x] live_kit_client depends on live_kit_server as non-dev dependency,
even though it seems to only be used for tests. Is that an issue?

Release Notes:
- N/A
2024-01-24 00:26:58 +01:00
Piotr Osiewicz
21e6b09361
Remove license-file from Cargo.toml as it is apparently redundant (#4218)
Release Notes:

- N/A
2024-01-23 17:40:30 +01:00
Piotr Osiewicz
678bdddd7d
chore: Add crate licenses. (#4158)
- GPUI and all dependencies: Apache 2
- Everything else: AGPL

Here's a script that I've generated for it:
https://gist.github.com/osiewicz/6afdd6626e517da24a2092807e6f0b6e

Release Notes:
- N/A

---------

Co-authored-by: David <david@zed.dev>
2024-01-23 16:56:22 +01:00
Piotr Osiewicz
d475f1373a
gpui: Further docs refinement & moved some reexports into 'private' module (#3935)
This commit mostly fixes invalid URLs in docstrings. It also
encapsulates crates we reexport (serde stuff + linkme) into a public
module named "private" in order to reduce the API surfaced through docs.
Moreover, I fixed up a bunch of crates that were pulling serde_json in
through gpui explicitly instead of using Cargo manifest.

Release Notes:
- N/A
2024-01-07 14:14:21 +01:00
Marshall Bowers
c7c874a371
Decouple theme license generation from TypeScript theme definitions (#3917)
This PR decouples the generation of licenses for the themes we ship from
the TypeScript theme definitions.

For now, we are embedding the license information for the themes in the
`theme_importer`, and emit a combined `LICENSES` file in the `theme`
crate whenever we import themes. This is also where we check that each
theme has a valid license.

We then use this `LICENSES` file when building up the global license
file for Zed.

This decoupling is one step towards us being able to delete the old Zed1
styles.

Release Notes:

- N/A
2024-01-05 13:38:12 -05:00
Max Brunsfeld
f5ba22659b Remove 2 suffix from gpui
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:59:39 -08:00
Max Brunsfeld
dfcb17fe74 Remove 2 suffix for theme
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:41:01 -08:00
Marshall Bowers
6cb913d8af Decouple theme_importer from old GPUI 1 crates (#3866)
This PR decouples the `theme_importer` from the `theme` and `gpui`
crates.

We achieve this by inlining all of the relevant bits needed to
deserialize Zed1 themes.

This will allow us to continue to import Zed1 themes after we land
#3862.

Release Notes:

- N/A
2024-01-03 15:03:52 -05:00
Marshall Bowers
dc64411cca
Extend theme_importer in preparation for importing Zed1 themes (#3791)
This PR extends the `theme_importer` with the overall structure required
to support importing themes from Zed1.

Release Notes:

- N/A
2023-12-22 13:47:30 -05:00
Marshall Bowers
80143b2571
Fix names for Rosé Pine themes (#3771)
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
2023-12-21 22:45:29 -05:00
Marshall Bowers
912f7e6c1a
Add ability to warn on missing theme values (#3705)
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
2023-12-18 17:18:49 -05:00
Marshall Bowers
7a9f764aa0
Add support for theme family-specific syntax mapping overrides (#3551)
This PR adds support for adding a specific set of mappings from Zed
syntax tokens to VS Code scopes for a particular theme family.

We can use this as a fallback when we aren't otherwise able to rely on
the mappings in the theme importer, as sometimes it isn't possible to
make a specific enough matcher that works across all of the themes.

Release Notes:

- N/A
2023-12-07 23:37:49 -05:00
Marshall Bowers
c7e19c0bcd
Emit accurate hex colors in generated themes (#3547)
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
2023-12-07 18:34:03 -05:00
Marshall Bowers
cb8c534dac
theme_importer: Support importing themes containing comments (#3298)
This PR updates the `theme_importer` with support for parsing theme
files containing comments.

Up until now we've been manually removing comments from the VS Code
theme files.

Release Notes:

- N/A
2023-11-09 19:22:15 -05:00
Nate Butler
54157eb99a Finish passing Syntax from VSCode themes to Zed Themes
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-11-09 14:41:26 -05:00
Marshall Bowers
978cff8095 Use IndexMap for a deterministic order when importing syntax colors 2023-11-09 13:12:36 -05:00
Marshall Bowers
ff19a0ca18 Add importing-themes feature flag to theme2 crate
When this feature is set the `themes` module won't be compiled.
This allows us to run the `theme_importer` even when the `themes` module
has compile errors in it.
2023-11-09 12:49:16 -05:00
Nate Butler
eac7c3cea9 Update Cargo.toml 2023-11-06 16:02:21 -05:00
Nate Butler
058981350c Scaffold out new theme-importer crate
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-11-02 17:21:11 -04:00