Skip to content

Commit 4bebff2

Browse files
authored
Generate Zed theme (#20)
* Update to generate a Zed theme * Updates * Separate Zed themes in prep for publishing, rebuild and update * Bump to v0.0.21 for releasing Zed theme
1 parent 7b712a4 commit 4bebff2

11 files changed

Lines changed: 1669 additions & 16 deletions

File tree

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Pierre Theme
22

3-
Light and dark themes for Visual Studio Code, Cursor, and Shiki. Built for [Diffs.com](https://diffs.com) by [The Pierre Computer Company](https://pierre.computer).
3+
Light and dark themes for Visual Studio Code, Cursor, Zed, and Shiki. Built for [Diffs.com](https://diffs.com) by [The Pierre Computer Company](https://pierre.computer).
44

55
## Preview
66

@@ -29,6 +29,14 @@ From the menu in Cursor:
2929

3030
You can also install or download from the [Open VSX registry](https://open-vsx.org/extension/pierrecomputer/pierre-theme).
3131

32+
### Zed
33+
34+
From the menu in Zed:
35+
36+
- Zed > Extensions (or hit Command+Shift+X or Control+Shift+X)
37+
- Search for `Pierre`
38+
- Click install
39+
3240
## Vibrant themes (Display P3)
3341

3442
> [!NOTE]

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@pierre/theme",
33
"displayName": "Pierre Theme",
44
"description": "Pierre theme for Shiki, VS Code, and more",
5-
"version": "0.0.20",
5+
"version": "0.0.21",
66
"publisher": "pierrecomputer",
77
"icon": "icon.png",
88
"galleryBanner": {

src/build.ts

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,38 @@
22
import { writeFileSync, mkdirSync } from "node:fs";
33
import { light as rolesLight, dark as rolesDark } from "./palette";
44
import { makeTheme } from "./theme";
5+
import { makeZedThemeFamily } from "./zed-theme";
56
import { convertRolesToP3 } from "./color-p3";
67

78
mkdirSync("themes", { recursive: true });
9+
mkdirSync("zed/themes", { recursive: true });
810

911
// Convert palettes to Display P3 color space
1012
const rolesLightP3 = convertRolesToP3(rolesLight);
1113
const rolesDarkP3 = convertRolesToP3(rolesDark);
1214

13-
const out = [
15+
// ============================================
16+
// VS Code Themes
17+
// ============================================
18+
const vscodeThemes = [
1419
{ file: "themes/pierre-light.json", theme: makeTheme("Pierre Light", "light", rolesLight) },
1520
{ file: "themes/pierre-dark.json", theme: makeTheme("Pierre Dark", "dark", rolesDark) },
1621
{ file: "themes/pierre-light-vibrant.json", theme: makeTheme("Pierre Light Vibrant", "light", rolesLightP3) },
1722
{ file: "themes/pierre-dark-vibrant.json", theme: makeTheme("Pierre Dark Vibrant", "dark", rolesDarkP3) }
1823
];
1924

20-
for (const {file, theme} of out) {
25+
for (const {file, theme} of vscodeThemes) {
2126
writeFileSync(file, JSON.stringify(theme, null, 2), "utf8");
2227
console.log("Wrote", file);
2328
}
29+
30+
// ============================================
31+
// Zed Theme Family
32+
// ============================================
33+
const zedTheme = makeZedThemeFamily("Pierre", "pierrecomputer", [
34+
{ name: "Pierre Light", appearance: "light", roles: rolesLight },
35+
{ name: "Pierre Dark", appearance: "dark", roles: rolesDark },
36+
]);
37+
38+
writeFileSync("zed/themes/pierre.json", JSON.stringify(zedTheme, null, 2), "utf8");
39+
console.log("Wrote zed/themes/pierre.json");

src/palette.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,11 +318,11 @@ export const dark: Roles = {
318318
},
319319
border: {
320320
window: gray["1040"],
321-
editor: gray["920"],
322-
indentGuide: gray["940"],
321+
editor: gray["980"],
322+
indentGuide: gray["980"],
323323
indentGuideActive: gray["960"],
324-
inset: gray["920"],
325-
elevated: gray["960"]
324+
inset: gray["980"],
325+
elevated: gray["980"]
326326
},
327327
accent: {
328328
primary: blue["500"],

0 commit comments

Comments
 (0)