Commit Graph
71 Commits
Author SHA1 Message Date
Antonio Scandurra ccdb5b2857 Merge remote-tracking branch 'origin/main' into editor2-paint 2023-11-07 13:09:48 +01:00
Antonio Scandurra 0dbb8f8b4d Paint lines 2023-11-07 12:25:33 +01:00
Nate Butler b2c874f0d7 Add theme importer (#3246)
[[PR Description]]

Thanks @maxdeviant for all the help with this one 🫂 

- Adds the `theme_importer` crate
- Adds the ability to import themes in VSCode Format.
- Adds the `assets/themes/src` folder with source files for imported
themes
- Adds an initial set of themes: `andromeda`, `ayu`, `dracula`,
`gruvbox`, `night-owl`, `noctis`, `palenight`, `rose-pine`, `solarized`,
`synthwave-84`.

From the README:

## Usage

- `cargo run -p theme_importer` - Import the context of
`assets/themes/src`

---

## Troubleshooting

As the importer generates rust files, you may need to manually do some
cleanup in `registry.rs` and `themes/mod.rs` if you remove themes or
delete the `themes` folder in the theme crate.

---

## Required Structure

To import a theme or series of themes 3 things are required:

- `family.json`: A JSON file containing the theme family metadata and
list of theme variants
- `{theme_name}.json`: One theme json for each theme variant
- `LICENSE`: A license file for the theme family

### `family.json`

#### `name`

The name of the theme family. Avoid special characters.

This will be used for the theme family directory name (lowercased) and
the theme family name in the Zed UI.

Good:

- `Rose Pine`
- `Synthwave 84`
- `Monokai Solarized`

Bad:

- `Rosé Pine`
- `Synthwave '84`
- `Monokai (Solarized)`

#### `author`

The author of the theme family. This can be a name or a username.

This will be used for the theme family author in the Zed UI.

#### `themes`

A list of theme variants.

`appearance` can be either `light` or `dark`. This will impact which
default fallback colors are used, and where the theme shows up in the
Zed UI.

### `{theme_name}.json`

Each theme added to the family must have a corresponding JSON file. This
JSON file can be obtained from the VSCode extensions folder (once you
have installed it.) This is usually located at `~/.vscode/extensions`
(on macOS).

You can use `open ~/.vscode/extensions` to open the folder in Finder
directly.

Copy that json file into the theme family directory and tidy up the
filenames as needed.

### `LICENSE`

A LICENSE file is required to import a theme family. Failing to provide
a complete text license will cause it to be skipped when the import is
run.

If the theme only provices a license code (e.g. MIT, Apache 2.0, etc.)
then put that code into the LICENSE file.

If no license is provided, either contact the theme creator or don't add
the theme.

---

### Complete Example:

An example family with multiple variants:

```json
{
  "name": "Ayu",
  // When both name and username are available
  // prefer the `username (name)` format
  "author": "dempfi (Ike Ku)",
  "themes": [
    {
      "name": "Ayu Light",
      "file_name": "ayu-light.json",
      "appearance": "light"
    },
    {
      "name": "Ayu Mirage",
      "file_name": "ayu-mirage.json",
      "appearance": "dark"
    },
    {
      "name": "Ayu Dark",
      "file_name": "ayu-dark.json",
      "appearance": "dark"
    }
  ]
}
```

An example single variant family:

```json
{
  "name": "Andromeda",
  "author": "Eliver Lara (EliverLara)",
  "themes": [
    {
      "name": "Andromeda",
      "file_name": "andromeda.json",
      "appearance": "dark"
    },
    {
      "name": "Andromeda Bordered",
      "file_name": "andromeda-bordered.json",
      "appearance": "dark"
    }
  ]
}
```


Release Notes:

- N/A
2023-11-06 16:08:05 -05:00
Conrad Irwin a914935a6e Use gpui instead of gpui2 consistenytly 2023-11-06 11:50:33 -07:00
Conrad Irwin 20eb31b450 Merge branch 'main' into editor2-rendering 2023-11-06 11:06:43 -07:00
Marshall Bowers 31cfb83723 Merge branch 'main' into import-theme 2023-11-06 12:08:46 -05:00
Julia 97445f3fc3 zed2: Actually find downloaded binary in Elixir cached binary method 2023-11-06 11:31:31 -05:00
Marshall Bowers f9701564ce Merge branch 'main' into import-theme 2023-11-03 15:41:12 -04:00
Conrad Irwin 48800ad097 Add PointingHand on tabs 2023-11-03 11:30:15 -06:00
Marshall Bowers 9b1559bada Exclude source themes from Zed2 binary 2023-11-03 11:11:10 -04:00
Antonio Scandurra 305c7b29a2 Merge remote-tracking branch 'origin/main' into editor2 2023-11-03 14:47:49 +01:00
Kirill Bulatov 574176ae6d Remove and add more todosmerge . 2023-11-03 13:22:11 +02:00
Kirill Bulatov 5b401b32e9 Move journal2 to workspace2 2023-11-03 12:55:06 +02:00
Kirill Bulatov 24a215e4fd Uncomment persistence tests 2023-11-03 12:38:09 +02:00
Antonio Scandurra 2a74c3967f Remove unused code 2023-11-03 10:11:13 +01:00
Antonio Scandurra 252bac2e2e Uncomment more editor code 2023-11-03 10:09:00 +01:00
Antonio Scandurra f2d987c0ee Call editor::init 2023-11-03 09:06:25 +01:00
Nathan Sobo 63d08003aa Merge remote-tracking branch 'origin/rich_text2' into editor2 2023-11-02 20:34:52 -06:00
Conrad IrwinandNathan 2e06b2586a Fix error handling of open_path
Co-Authored-By: Nathan <nathan@zed.dev>
2023-11-02 14:34:43 -06:00
Marshall Bowers 5bb88445e5 Make the Zed2 window movable (#3218)
This PR makes the Zed2 window movable and fixes a crash related to a
`todo!()` that wasn't necessary.

Release Notes:

- N/A
2023-11-02 16:17:31 -04:00
Conrad Irwin 13b85165d3 Disable selective warnings to make cargo check happy 2023-11-02 13:28:58 -06:00
Conrad Irwin fdeff77625 Merge remote-tracking branch 'origin/main' into zed2-workspace 2023-11-02 13:16:24 -06:00
Mikayla d8b8390702 Remove the 2s from source code 2023-11-02 10:55:02 -07:00
Conrad IrwinandAntonio 64ddd2696e Add back some window events for workspace
Co-Authored-By: Antonio <me@as-cii.com>
2023-11-02 10:03:03 -06:00
Nathan Sobo ed895ca952 WIP 2023-11-02 07:46:49 -06:00
Antonio Scandurra 89ba26eab3 Checkpoint 2023-11-02 11:05:24 +01:00
Nathan Sobo 8582cb05c8 WIP: Merge branch 'main' into zed2-workspace 2023-11-01 22:35:02 -06:00
Nathan Sobo 8b342b1332 Split out a foreground and background executor 2023-11-01 13:53:45 -06:00
455983d912 Start removing the Send impl for App
Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Nathan <nathan@zed.dev>
2023-11-01 13:53:45 -06:00
Mikayla 432f10621c WIP 2023-11-01 11:45:31 -07:00
Kirill Bulatov 0bb1b28bd5 WIP 2023-11-01 15:37:51 +02:00
Kirill Bulatov 880f5f278b WIP
Uncomment more methods in workspace2.rs
2023-11-01 14:47:29 +02:00
Nathan Sobo 3a939de217 WIP 2023-10-31 22:32:18 -06:00
Nathan Sobo a8afca8ad8 Checkpoint 2023-10-31 11:16:08 -06:00
Nathan Sobo 80996e6b64 WIP 2023-10-31 11:03:01 -06:00
KCaverly 8dcbe21096 wip 2023-10-31 12:00:45 -04:00
KCaverly db2190a3fc Merge branch 'zed2' of github.com:zed-industries/zed into zed2-workspace 2023-10-31 11:39:34 -04:00
KCaverly 52a4261de9 wip 2023-10-31 11:32:56 -04:00
Antonio Scandurra c50d9d1b4e Merge branch 'zed2' into zed2-workspace 2023-10-31 10:20:03 +01:00
Julia 6e45e454ff Port zed/src/languages to zed2 2023-10-30 21:52:29 -04:00
Mikayla 0244be8819 Merge branch 'zed2' into zed2-workspace 2023-10-30 16:53:21 -07:00
Antonio Scandurra 3895aba120 Rename Handle to Model 2023-10-30 19:44:01 +01:00
Antonio Scandurra 4ec2b9a12c Merge branch 'zed2' into zed2-workspace 2023-10-30 12:16:34 +01:00
Joseph T. Lyons 02a7548566 Port journal to GPUI2 2023-10-28 11:37:25 -04:00
Joseph T. Lyons 315c1e6022 Revert "Add activity_indicator2"
This reverts commit 456c659c2a.
2023-10-26 17:13:40 +02:00
Joseph T. Lyons 456c659c2a Add activity_indicator2 2023-10-26 16:49:39 +02:00
Antonio Scandurra c5fb0e6c1f Merge branch 'zed2' into zed2-workspace 2023-10-26 15:34:55 +02:00
Max BrunsfeldandJospeh bcfa9b7b9c Fix compile errors with lsp2
Co-authored-by: Jospeh <joseph@zed.dev>
2023-10-26 14:48:04 +02:00
Antonio Scandurra 7e8f0bb328 WIP 2023-10-26 12:27:20 +02:00
Antonio Scandurra cef3c660b9 Merge branch 'zed2-room' into zed2 2023-10-26 11:57:11 +02:00