Commit graph

89 commits

Author SHA1 Message Date
Marshall Bowers
acf37804eb
Use a fork of ctor to silence warnings generated by macro (#3275)
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
2023-11-08 15:05:19 -05:00
Marshall Bowers
fe28d8faea Merge branch 'main' into picker 2023-11-08 11:18:54 -05:00
Nathan Sobo
814e62050c Register actions globally before main 2023-11-07 20:58:37 -07:00
Max Brunsfeld
d690fb038d Merge branch 'main' into picker 2023-11-07 11:27:14 -08:00
Antonio Scandurra
4bf3a4e3d4
Implement movement in editor2 (#3256)
Release Notes:

- N/A
2023-11-07 19:12:09 +01:00
Max Brunsfeld
69eb49a2ed Merge branch 'main' into picker 2023-11-07 09:34:57 -08:00
Antonio Scandurra
82a018996b WIP 2023-11-07 17:54:14 +01:00
Conrad Irwin
a2a28af052 Add Modals
P.S. this is all completely different now

Co-Authored-By: Marshall <marshall@zed.dev>
Co-Authored-By: Julia <julia@zed.dev>
2023-11-07 09:18:34 -07:00
Antonio Scandurra
bdf6e8bcc7 Merge remote-tracking branch 'origin/main' into editor2-paint 2023-11-07 13:09:48 +01:00
Antonio Scandurra
a866370dc1 Paint lines 2023-11-07 12:25:33 +01:00
Mikayla
85000eba81
wip: picker
co-authored-by: nathan <nathan@zed.dev>
co-authored-by: max <max@zed.dev>
2023-11-06 17:09:38 -08:00
Nate Butler
99a57d922f
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
496518f3e8 Use gpui instead of gpui2 consistenytly 2023-11-06 11:50:33 -07:00
Conrad Irwin
c59817cd72 Merge branch 'main' into editor2-rendering 2023-11-06 11:06:43 -07:00
Marshall Bowers
f8504c349c Merge branch 'main' into import-theme 2023-11-06 12:08:46 -05:00
Julia
66b967532f zed2: Actually find downloaded binary in Elixir cached binary method 2023-11-06 11:31:31 -05:00
Marshall Bowers
12500364b4 Merge branch 'main' into import-theme 2023-11-03 15:41:12 -04:00
Conrad Irwin
d73c54f604 Add PointingHand on tabs 2023-11-03 11:30:15 -06:00
Marshall Bowers
363d7c6634 Exclude source themes from Zed2 binary 2023-11-03 11:11:10 -04:00
Antonio Scandurra
097171b9b8 Merge remote-tracking branch 'origin/main' into editor2 2023-11-03 14:47:49 +01:00
Kirill Bulatov
1a0cd3e09b Remove and add more todosmerge . 2023-11-03 13:22:11 +02:00
Kirill Bulatov
f1fc07de94 Move journal2 to workspace2 2023-11-03 12:55:06 +02:00
Kirill Bulatov
eb8a0e7148 Uncomment persistence tests 2023-11-03 12:38:09 +02:00
Antonio Scandurra
2fccde5ab6 Remove unused code 2023-11-03 10:11:13 +01:00
Antonio Scandurra
efa27cf9b8 Uncomment more editor code 2023-11-03 10:09:00 +01:00
Antonio Scandurra
cdc82d01f7 Call editor::init 2023-11-03 09:06:25 +01:00
Nathan Sobo
2a12e8f307 Merge remote-tracking branch 'origin/rich_text2' into editor2 2023-11-02 20:34:52 -06:00
Conrad Irwin
583c36e24b WIP 2023-11-02 15:27:49 -06:00
Conrad Irwin
9e5275cc18 Fix error handling of open_path
Co-Authored-By: Nathan <nathan@zed.dev>
2023-11-02 14:34:43 -06:00
Marshall Bowers
54969877a4
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
8283909dfd Disable selective warnings to make cargo check happy 2023-11-02 13:28:58 -06:00
Conrad Irwin
269a72464d Merge remote-tracking branch 'origin/main' into zed2-workspace 2023-11-02 13:16:24 -06:00
Mikayla
d11ff14b57
Remove the 2s from source code 2023-11-02 10:55:02 -07:00
Conrad Irwin
634aba89d2 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
52e195b47c WIP 2023-11-02 07:46:49 -06:00
Antonio Scandurra
32dded551c Checkpoint 2023-11-02 11:05:24 +01:00
Nathan Sobo
3e7df82977 WIP: Merge branch 'main' into zed2-workspace 2023-11-01 22:35:02 -06:00
Nathan Sobo
db9ccd7f34 Merge remote-tracking branch 'origin/main' into gpui2-no-send 2023-11-01 21:10:31 -06:00
KCaverly
77dbb15aa3 port text2 to zed2 2023-11-01 16:13:53 -04:00
Nathan Sobo
11b6d9e33a Split out a foreground and background executor 2023-11-01 13:53:45 -06:00
Max Brunsfeld
57ffa8201e 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
1c1b53ecf6
WIP 2023-11-01 11:45:31 -07:00
Kirill Bulatov
a9d7c86307 WIP 2023-11-01 15:37:51 +02:00
Kirill Bulatov
73c97d0c10 WIP
Uncomment more methods in workspace2.rs
2023-11-01 14:47:29 +02:00
Nathan Sobo
d47ef6470b WIP 2023-10-31 22:32:18 -06:00
Nathan Sobo
90601fe4fd Checkpoint 2023-10-31 11:16:08 -06:00
Nathan Sobo
0a2fde8707 WIP 2023-10-31 11:03:01 -06:00
KCaverly
fed391fe6b wip 2023-10-31 12:00:45 -04:00
KCaverly
551171a339 Merge branch 'zed2' of github.com:zed-industries/zed into zed2-workspace 2023-10-31 11:39:34 -04:00
KCaverly
68a1c7ce4c wip 2023-10-31 11:32:56 -04:00