diff --git a/.gitignore b/.gitignore index 5a93c08..dadd854 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,6 @@ out/ sketchybar borders skhd + +# Local handoff docs (working context, not repo history) +.handoff/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 84969ce..3e4097f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,15 @@ All notable changes to Human++ will be documented in this file. +## [1.6.0] - 2026-04-26 + +### Added + +- **Zed theme extension package** with `extension.toml`, MIT license, and packaged Human++ theme JSON ready for submission to the Zed extensions registry. +- **Zed theme generator** that emits both `dist/zed/human-plus-plus.json` and the packaged extension theme from the shared Base24 palette. + +--- + ## [1.5.0] - 2026-03-05 ### Added diff --git a/packages/zed-extension/LICENSE b/packages/zed-extension/LICENSE new file mode 100644 index 0000000..90ddc9d --- /dev/null +++ b/packages/zed-extension/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Fielding Johnston + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/zed-extension/extension.toml b/packages/zed-extension/extension.toml new file mode 100644 index 0000000..106d850 --- /dev/null +++ b/packages/zed-extension/extension.toml @@ -0,0 +1,7 @@ +id = "human-plus-plus" +name = "Human++" +schema_version = 1 +version = "1.6.0" +authors = ["Fielding Johnston"] +description = "A Base24 dark theme for the post-artisanal coding era. Code is cheap. Intent is scarce." +repository = "https://github.com/fielding/human-plus-plus" diff --git a/packages/zed-extension/themes/human-plus-plus.json b/packages/zed-extension/themes/human-plus-plus.json new file mode 100644 index 0000000..5daa105 --- /dev/null +++ b/packages/zed-extension/themes/human-plus-plus.json @@ -0,0 +1,411 @@ +{ + "$schema": "https://zed.dev/schema/themes/v0.2.0.json", + "name": "Human++", + "author": "Fielding Johnston", + "themes": [ + { + "name": "Human++", + "appearance": "dark", + "style": { + "border": "#3a3d42ff", + "border.variant": "#282b31ff", + "border.focused": "#458ae2ff", + "border.selected": "#458ae233", + "border.transparent": "#00000000", + "border.disabled": "#3a3d42ff", + "elevated_surface.background": "#282b31ff", + "surface.background": "#282b31ff", + "background": "#282b31ff", + "element.background": "#282b31ff", + "element.hover": "#3a3d42ff", + "element.active": "#3a3d42ff", + "element.selected": "#3a3d42ff", + "element.disabled": "#282b31ff", + "drop_target.background": "#82807980", + "ghost_element.background": "#00000000", + "ghost_element.hover": "#3a3d4266", + "ghost_element.active": "#3a3d42ff", + "ghost_element.selected": "#3a3d42ff", + "ghost_element.disabled": "#282b31ff", + "text": "#dbd6ccff", + "text.muted": "#828079ff", + "text.placeholder": "#5a5d62ff", + "text.disabled": "#5a5d62ff", + "text.accent": "#458ae2ff", + "icon": "#dbd6ccff", + "icon.muted": "#828079ff", + "icon.disabled": "#5a5d62ff", + "icon.placeholder": "#5a5d62ff", + "icon.accent": "#458ae2ff", + "status_bar.background": "#282b31ff", + "title_bar.background": "#282b31ff", + "title_bar.inactive_background": "#1a1c22ff", + "toolbar.background": "#1a1c22ff", + "tab_bar.background": "#282b31ff", + "tab.inactive_background": "#282b31ff", + "tab.active_background": "#1a1c22ff", + "search.match_background": "#f2a63340", + "search.active_match_background": "#458ae240", + "panel.background": "#282b31ff", + "panel.focused_border": null, + "pane.focused_border": null, + "scrollbar.thumb.background": "#8280794c", + "scrollbar.thumb.hover_background": "#82807980", + "scrollbar.thumb.border": "#3a3d42ff", + "scrollbar.track.background": "#00000000", + "scrollbar.track.border": "#282b31ff", + "editor.foreground": "#dbd6ccff", + "editor.background": "#1a1c22ff", + "editor.gutter.background": "#1a1c22ff", + "editor.subheader.background": "#282b31ff", + "editor.active_line.background": "#282b31bf", + "editor.highlighted_line.background": "#282b31ff", + "editor.line_number": "#5a5d62ff", + "editor.active_line_number": "#f8f6f2ff", + "editor.hover_line_number": "#828079ff", + "editor.invisible": "#3a3d42ff", + "editor.wrap_guide": "#3a3d420d", + "editor.active_wrap_guide": "#3a3d421a", + "editor.document_highlight.read_background": "#458ae21a", + "editor.document_highlight.write_background": "#3a3d4266", + "terminal.background": "#1a1c22ff", + "terminal.foreground": "#f8f6f2ff", + "terminal.bright_foreground": "#f8f6f2ff", + "terminal.dim_foreground": "#5a5d62ff", + "terminal.ansi.black": "#1a1c22ff", + "terminal.ansi.bright_black": "#5a5d62ff", + "terminal.ansi.dim_black": "#282b31ff", + "terminal.ansi.red": "#e7349cff", + "terminal.ansi.bright_red": "#c8518fff", + "terminal.ansi.dim_red": "#c8518f99", + "terminal.ansi.green": "#04b372ff", + "terminal.ansi.bright_green": "#61b186ff", + "terminal.ansi.dim_green": "#61b18699", + "terminal.ansi.yellow": "#f2a633ff", + "terminal.ansi.bright_yellow": "#dfb683ff", + "terminal.ansi.dim_yellow": "#dfb68399", + "terminal.ansi.blue": "#458ae2ff", + "terminal.ansi.bright_blue": "#5e84b6ff", + "terminal.ansi.dim_blue": "#5e84b699", + "terminal.ansi.magenta": "#9871feff", + "terminal.ansi.bright_magenta": "#8f72e3ff", + "terminal.ansi.dim_magenta": "#8f72e399", + "terminal.ansi.cyan": "#1ad0d6ff", + "terminal.ansi.bright_cyan": "#91cbcdff", + "terminal.ansi.dim_cyan": "#91cbcd99", + "terminal.ansi.white": "#dbd6ccff", + "terminal.ansi.bright_white": "#f8f6f2ff", + "terminal.ansi.dim_white": "#828079ff", + "link_text.hover": "#458ae2ff", + "version_control.added": "#04b372ff", + "version_control.modified": "#f2a633ff", + "version_control.deleted": "#e7349cff", + "version_control.word_added": "#04b37259", + "version_control.word_deleted": "#e7349ccc", + "version_control.conflict_marker.ours": "#04b3721a", + "version_control.conflict_marker.theirs": "#458ae21a", + "conflict": "#f2a633ff", + "conflict.background": "#f2a6331a", + "conflict.border": "#f26c3333", + "created": "#04b372ff", + "created.background": "#04b3721a", + "created.border": "#04b37233", + "deleted": "#e7349cff", + "deleted.background": "#e7349c1a", + "deleted.border": "#e7349c33", + "error": "#e7349cff", + "error.background": "#e7349c1a", + "error.border": "#e7349c33", + "hidden": "#828079ff", + "hidden.background": "#8280791a", + "hidden.border": "#5a5d62ff", + "hint": "#5e84b6ff", + "hint.background": "#5e84b61a", + "hint.border": "#5e84b626", + "ignored": "#5a5d62ff", + "ignored.background": "#5a5d621a", + "ignored.border": "#3a3d42ff", + "info": "#1ad0d6ff", + "info.background": "#1ad0d61a", + "info.border": "#1ad0d626", + "modified": "#f2a633ff", + "modified.background": "#f2a6331a", + "modified.border": "#f2a63333", + "predictive": "#5e84b6ff", + "predictive.background": "#5e84b61a", + "predictive.border": "#5e84b61a", + "renamed": "#458ae2ff", + "renamed.background": "#458ae21a", + "renamed.border": "#458ae226", + "success": "#04b372ff", + "success.background": "#04b3721a", + "success.border": "#04b37233", + "unreachable": "#828079ff", + "unreachable.background": "#8280791a", + "unreachable.border": "#3a3d42ff", + "warning": "#f26c33ff", + "warning.background": "#f26c331a", + "warning.border": "#f26c3333", + "players": [ + { + "cursor": "#458ae2ff", + "background": "#458ae2ff", + "selection": "#458ae23d" + }, + { + "cursor": "#e7349cff", + "background": "#e7349cff", + "selection": "#e7349c3d" + }, + { + "cursor": "#f26c33ff", + "background": "#f26c33ff", + "selection": "#f26c333d" + }, + { + "cursor": "#9871feff", + "background": "#9871feff", + "selection": "#9871fe3d" + }, + { + "cursor": "#1ad0d6ff", + "background": "#1ad0d6ff", + "selection": "#1ad0d63d" + }, + { + "cursor": "#04b372ff", + "background": "#04b372ff", + "selection": "#04b3723d" + }, + { + "cursor": "#f2a633ff", + "background": "#f2a633ff", + "selection": "#f2a6333d" + }, + { + "cursor": "#bbff00ff", + "background": "#bbff00ff", + "selection": "#bbff003d" + } + ], + "syntax": { + "attribute": { + "color": "#91cbcdff", + "font_style": "italic", + "font_weight": null + }, + "boolean": { + "color": "#dfb683ff", + "font_style": null, + "font_weight": null + }, + "comment": { + "color": "#5a5d62ff", + "font_style": "italic", + "font_weight": null + }, + "comment.doc": { + "color": "#5a5d62ff", + "font_style": "italic", + "font_weight": null + }, + "constant": { + "color": "#dfb683ff", + "font_style": null, + "font_weight": null + }, + "constructor": { + "color": "#5e84b6ff", + "font_style": null, + "font_weight": null + }, + "embedded": { + "color": "#dbd6ccff", + "font_style": null, + "font_weight": null + }, + "emphasis": { + "color": "#5e84b6ff", + "font_style": "italic", + "font_weight": null + }, + "emphasis.strong": { + "color": "#458ae2ff", + "font_style": null, + "font_weight": 700 + }, + "enum": { + "color": "#91cbcdff", + "font_style": null, + "font_weight": null + }, + "function": { + "color": "#5e84b6ff", + "font_style": null, + "font_weight": null + }, + "hint": { + "color": "#5e84b6ff", + "font_style": null, + "font_weight": null + }, + "keyword": { + "color": "#c8518fff", + "font_style": null, + "font_weight": null + }, + "label": { + "color": "#8f72e3ff", + "font_style": null, + "font_weight": null + }, + "link_text": { + "color": "#d2fc91ff", + "font_style": "normal", + "font_weight": null + }, + "link_uri": { + "color": "#5a5d62ff", + "font_style": null, + "font_weight": null + }, + "namespace": { + "color": "#91cbcdff", + "font_style": null, + "font_weight": null + }, + "number": { + "color": "#dfb683ff", + "font_style": null, + "font_weight": null + }, + "operator": { + "color": "#828079ff", + "font_style": null, + "font_weight": null + }, + "predictive": { + "color": "#5e84b6ff", + "font_style": "italic", + "font_weight": null + }, + "preproc": { + "color": "#c8518fff", + "font_style": null, + "font_weight": null + }, + "primary": { + "color": "#dbd6ccff", + "font_style": null, + "font_weight": null + }, + "property": { + "color": "#dbd6ccff", + "font_style": null, + "font_weight": null + }, + "punctuation": { + "color": "#828079ff", + "font_style": null, + "font_weight": null + }, + "punctuation.bracket": { + "color": "#828079ff", + "font_style": null, + "font_weight": null + }, + "punctuation.delimiter": { + "color": "#828079ff", + "font_style": null, + "font_weight": null + }, + "punctuation.list_marker": { + "color": "#828079ff", + "font_style": null, + "font_weight": null + }, + "punctuation.markup": { + "color": "#828079ff", + "font_style": null, + "font_weight": null + }, + "punctuation.special": { + "color": "#c8518fff", + "font_style": null, + "font_weight": null + }, + "selector": { + "color": "#61b186ff", + "font_style": null, + "font_weight": null + }, + "selector.pseudo": { + "color": "#91cbcdff", + "font_style": "italic", + "font_weight": null + }, + "string": { + "color": "#d2fc91ff", + "font_style": null, + "font_weight": null + }, + "string.escape": { + "color": "#dfb683ff", + "font_style": null, + "font_weight": null + }, + "string.regex": { + "color": "#d2fc91ff", + "font_style": null, + "font_weight": null + }, + "string.special": { + "color": "#d68c6fff", + "font_style": null, + "font_weight": null + }, + "string.special.symbol": { + "color": "#d68c6fff", + "font_style": null, + "font_weight": null + }, + "tag": { + "color": "#c8518fff", + "font_style": null, + "font_weight": null + }, + "text.literal": { + "color": "#f2a633ff", + "font_style": null, + "font_weight": null + }, + "title": { + "color": "#e7349cff", + "font_style": null, + "font_weight": 700 + }, + "type": { + "color": "#91cbcdff", + "font_style": null, + "font_weight": null + }, + "variable": { + "color": "#dbd6ccff", + "font_style": null, + "font_weight": null + }, + "variable.special": { + "color": "#8f72e3ff", + "font_style": "italic", + "font_weight": null + }, + "variant": { + "color": "#91cbcdff", + "font_style": null, + "font_weight": null + } + } + } + } + ] +} diff --git a/pyproject.toml b/pyproject.toml index de31c1b..2ef8d7b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "humanplusplus" -version = "1.5.0" +version = "1.6.0" description = "Human++ - A Base24 color scheme for the post-artisanal coding era" readme = "README.md" license = {text = "MIT"} diff --git a/templates/zed/human-plus-plus.json.tmpl b/templates/zed/human-plus-plus.json.tmpl new file mode 100644 index 0000000..d39e539 --- /dev/null +++ b/templates/zed/human-plus-plus.json.tmpl @@ -0,0 +1,411 @@ +{ + "$schema": "https://zed.dev/schema/themes/v0.2.0.json", + "name": "Human++", + "author": "Fielding Johnston", + "themes": [ + { + "name": "Human++", + "appearance": "dark", + "style": { + "border": "{{base02}}ff", + "border.variant": "{{base01}}ff", + "border.focused": "{{base0D}}ff", + "border.selected": "{{base0D}}33", + "border.transparent": "#00000000", + "border.disabled": "{{base02}}ff", + "elevated_surface.background": "{{base01}}ff", + "surface.background": "{{base01}}ff", + "background": "{{base01}}ff", + "element.background": "{{base01}}ff", + "element.hover": "{{base02}}ff", + "element.active": "{{base02}}ff", + "element.selected": "{{base02}}ff", + "element.disabled": "{{base01}}ff", + "drop_target.background": "{{base04}}80", + "ghost_element.background": "#00000000", + "ghost_element.hover": "{{base02}}66", + "ghost_element.active": "{{base02}}ff", + "ghost_element.selected": "{{base02}}ff", + "ghost_element.disabled": "{{base01}}ff", + "text": "{{base05}}ff", + "text.muted": "{{base04}}ff", + "text.placeholder": "{{base03}}ff", + "text.disabled": "{{base03}}ff", + "text.accent": "{{base0D}}ff", + "icon": "{{base05}}ff", + "icon.muted": "{{base04}}ff", + "icon.disabled": "{{base03}}ff", + "icon.placeholder": "{{base03}}ff", + "icon.accent": "{{base0D}}ff", + "status_bar.background": "{{base01}}ff", + "title_bar.background": "{{base01}}ff", + "title_bar.inactive_background": "{{base00}}ff", + "toolbar.background": "{{base00}}ff", + "tab_bar.background": "{{base01}}ff", + "tab.inactive_background": "{{base01}}ff", + "tab.active_background": "{{base00}}ff", + "search.match_background": "{{base0A}}40", + "search.active_match_background": "{{base0D}}40", + "panel.background": "{{base01}}ff", + "panel.focused_border": null, + "pane.focused_border": null, + "scrollbar.thumb.background": "{{base04}}4c", + "scrollbar.thumb.hover_background": "{{base04}}80", + "scrollbar.thumb.border": "{{base02}}ff", + "scrollbar.track.background": "#00000000", + "scrollbar.track.border": "{{base01}}ff", + "editor.foreground": "{{base05}}ff", + "editor.background": "{{base00}}ff", + "editor.gutter.background": "{{base00}}ff", + "editor.subheader.background": "{{base01}}ff", + "editor.active_line.background": "{{base01}}bf", + "editor.highlighted_line.background": "{{base01}}ff", + "editor.line_number": "{{base03}}ff", + "editor.active_line_number": "{{base07}}ff", + "editor.hover_line_number": "{{base04}}ff", + "editor.invisible": "{{base02}}ff", + "editor.wrap_guide": "{{base02}}0d", + "editor.active_wrap_guide": "{{base02}}1a", + "editor.document_highlight.read_background": "{{base0D}}1a", + "editor.document_highlight.write_background": "{{base02}}66", + "terminal.background": "{{base00}}ff", + "terminal.foreground": "{{base07}}ff", + "terminal.bright_foreground": "{{base07}}ff", + "terminal.dim_foreground": "{{base03}}ff", + "terminal.ansi.black": "{{base00}}ff", + "terminal.ansi.bright_black": "{{base03}}ff", + "terminal.ansi.dim_black": "{{base01}}ff", + "terminal.ansi.red": "{{base08}}ff", + "terminal.ansi.bright_red": "{{base10}}ff", + "terminal.ansi.dim_red": "{{base10}}99", + "terminal.ansi.green": "{{base0B}}ff", + "terminal.ansi.bright_green": "{{base13}}ff", + "terminal.ansi.dim_green": "{{base13}}99", + "terminal.ansi.yellow": "{{base0A}}ff", + "terminal.ansi.bright_yellow": "{{base12}}ff", + "terminal.ansi.dim_yellow": "{{base12}}99", + "terminal.ansi.blue": "{{base0D}}ff", + "terminal.ansi.bright_blue": "{{base15}}ff", + "terminal.ansi.dim_blue": "{{base15}}99", + "terminal.ansi.magenta": "{{base0E}}ff", + "terminal.ansi.bright_magenta": "{{base16}}ff", + "terminal.ansi.dim_magenta": "{{base16}}99", + "terminal.ansi.cyan": "{{base0C}}ff", + "terminal.ansi.bright_cyan": "{{base14}}ff", + "terminal.ansi.dim_cyan": "{{base14}}99", + "terminal.ansi.white": "{{base05}}ff", + "terminal.ansi.bright_white": "{{base07}}ff", + "terminal.ansi.dim_white": "{{base04}}ff", + "link_text.hover": "{{base0D}}ff", + "version_control.added": "{{base0B}}ff", + "version_control.modified": "{{base0A}}ff", + "version_control.deleted": "{{base08}}ff", + "version_control.word_added": "{{base0B}}59", + "version_control.word_deleted": "{{base08}}cc", + "version_control.conflict_marker.ours": "{{base0B}}1a", + "version_control.conflict_marker.theirs": "{{base0D}}1a", + "conflict": "{{base0A}}ff", + "conflict.background": "{{base0A}}1a", + "conflict.border": "{{base09}}33", + "created": "{{base0B}}ff", + "created.background": "{{base0B}}1a", + "created.border": "{{base0B}}33", + "deleted": "{{base08}}ff", + "deleted.background": "{{base08}}1a", + "deleted.border": "{{base08}}33", + "error": "{{base08}}ff", + "error.background": "{{base08}}1a", + "error.border": "{{base08}}33", + "hidden": "{{base04}}ff", + "hidden.background": "{{base04}}1a", + "hidden.border": "{{base03}}ff", + "hint": "{{base15}}ff", + "hint.background": "{{base15}}1a", + "hint.border": "{{base15}}26", + "ignored": "{{base03}}ff", + "ignored.background": "{{base03}}1a", + "ignored.border": "{{base02}}ff", + "info": "{{base0C}}ff", + "info.background": "{{base0C}}1a", + "info.border": "{{base0C}}26", + "modified": "{{base0A}}ff", + "modified.background": "{{base0A}}1a", + "modified.border": "{{base0A}}33", + "predictive": "{{base15}}ff", + "predictive.background": "{{base15}}1a", + "predictive.border": "{{base15}}1a", + "renamed": "{{base0D}}ff", + "renamed.background": "{{base0D}}1a", + "renamed.border": "{{base0D}}26", + "success": "{{base0B}}ff", + "success.background": "{{base0B}}1a", + "success.border": "{{base0B}}33", + "unreachable": "{{base04}}ff", + "unreachable.background": "{{base04}}1a", + "unreachable.border": "{{base02}}ff", + "warning": "{{base09}}ff", + "warning.background": "{{base09}}1a", + "warning.border": "{{base09}}33", + "players": [ + { + "cursor": "{{base0D}}ff", + "background": "{{base0D}}ff", + "selection": "{{base0D}}3d" + }, + { + "cursor": "{{base08}}ff", + "background": "{{base08}}ff", + "selection": "{{base08}}3d" + }, + { + "cursor": "{{base09}}ff", + "background": "{{base09}}ff", + "selection": "{{base09}}3d" + }, + { + "cursor": "{{base0E}}ff", + "background": "{{base0E}}ff", + "selection": "{{base0E}}3d" + }, + { + "cursor": "{{base0C}}ff", + "background": "{{base0C}}ff", + "selection": "{{base0C}}3d" + }, + { + "cursor": "{{base0B}}ff", + "background": "{{base0B}}ff", + "selection": "{{base0B}}3d" + }, + { + "cursor": "{{base0A}}ff", + "background": "{{base0A}}ff", + "selection": "{{base0A}}3d" + }, + { + "cursor": "{{base0F}}ff", + "background": "{{base0F}}ff", + "selection": "{{base0F}}3d" + } + ], + "syntax": { + "attribute": { + "color": "{{base14}}ff", + "font_style": "italic", + "font_weight": null + }, + "boolean": { + "color": "{{base12}}ff", + "font_style": null, + "font_weight": null + }, + "comment": { + "color": "{{base03}}ff", + "font_style": "italic", + "font_weight": null + }, + "comment.doc": { + "color": "{{base03}}ff", + "font_style": "italic", + "font_weight": null + }, + "constant": { + "color": "{{base12}}ff", + "font_style": null, + "font_weight": null + }, + "constructor": { + "color": "{{base15}}ff", + "font_style": null, + "font_weight": null + }, + "embedded": { + "color": "{{base05}}ff", + "font_style": null, + "font_weight": null + }, + "emphasis": { + "color": "{{base15}}ff", + "font_style": "italic", + "font_weight": null + }, + "emphasis.strong": { + "color": "{{base0D}}ff", + "font_style": null, + "font_weight": 700 + }, + "enum": { + "color": "{{base14}}ff", + "font_style": null, + "font_weight": null + }, + "function": { + "color": "{{base15}}ff", + "font_style": null, + "font_weight": null + }, + "hint": { + "color": "{{base15}}ff", + "font_style": null, + "font_weight": null + }, + "keyword": { + "color": "{{base10}}ff", + "font_style": null, + "font_weight": null + }, + "label": { + "color": "{{base16}}ff", + "font_style": null, + "font_weight": null + }, + "link_text": { + "color": "{{base17}}ff", + "font_style": "normal", + "font_weight": null + }, + "link_uri": { + "color": "{{base03}}ff", + "font_style": null, + "font_weight": null + }, + "namespace": { + "color": "{{base14}}ff", + "font_style": null, + "font_weight": null + }, + "number": { + "color": "{{base12}}ff", + "font_style": null, + "font_weight": null + }, + "operator": { + "color": "{{base04}}ff", + "font_style": null, + "font_weight": null + }, + "predictive": { + "color": "{{base15}}ff", + "font_style": "italic", + "font_weight": null + }, + "preproc": { + "color": "{{base10}}ff", + "font_style": null, + "font_weight": null + }, + "primary": { + "color": "{{base05}}ff", + "font_style": null, + "font_weight": null + }, + "property": { + "color": "{{base05}}ff", + "font_style": null, + "font_weight": null + }, + "punctuation": { + "color": "{{base04}}ff", + "font_style": null, + "font_weight": null + }, + "punctuation.bracket": { + "color": "{{base04}}ff", + "font_style": null, + "font_weight": null + }, + "punctuation.delimiter": { + "color": "{{base04}}ff", + "font_style": null, + "font_weight": null + }, + "punctuation.list_marker": { + "color": "{{base04}}ff", + "font_style": null, + "font_weight": null + }, + "punctuation.markup": { + "color": "{{base04}}ff", + "font_style": null, + "font_weight": null + }, + "punctuation.special": { + "color": "{{base10}}ff", + "font_style": null, + "font_weight": null + }, + "selector": { + "color": "{{base13}}ff", + "font_style": null, + "font_weight": null + }, + "selector.pseudo": { + "color": "{{base14}}ff", + "font_style": "italic", + "font_weight": null + }, + "string": { + "color": "{{base17}}ff", + "font_style": null, + "font_weight": null + }, + "string.escape": { + "color": "{{base12}}ff", + "font_style": null, + "font_weight": null + }, + "string.regex": { + "color": "{{base17}}ff", + "font_style": null, + "font_weight": null + }, + "string.special": { + "color": "{{base11}}ff", + "font_style": null, + "font_weight": null + }, + "string.special.symbol": { + "color": "{{base11}}ff", + "font_style": null, + "font_weight": null + }, + "tag": { + "color": "{{base10}}ff", + "font_style": null, + "font_weight": null + }, + "text.literal": { + "color": "{{base0A}}ff", + "font_style": null, + "font_weight": null + }, + "title": { + "color": "{{base08}}ff", + "font_style": null, + "font_weight": 700 + }, + "type": { + "color": "{{base14}}ff", + "font_style": null, + "font_weight": null + }, + "variable": { + "color": "{{base05}}ff", + "font_style": null, + "font_weight": null + }, + "variable.special": { + "color": "{{base16}}ff", + "font_style": "italic", + "font_weight": null + }, + "variant": { + "color": "{{base14}}ff", + "font_style": null, + "font_weight": null + } + } + } + } + ] +} diff --git a/tools/build.py b/tools/build.py index 9a68950..0ceb58e 100755 --- a/tools/build.py +++ b/tools/build.py @@ -1951,6 +1951,42 @@ def render_mustache(template_content): print(" ✓ tinty ghostty theme") +def generate_zed_theme(colors, meta): + """Generate Zed theme from template. + + Uses mustache-style placeholders ({{base00}}, {{base08}}, etc.) in + templates/zed/human-plus-plus.json.tmpl and renders with current palette. + Colors in Zed use 8-digit RGBA hex; the template appends alpha suffixes + directly (e.g. {{base00}}ff for fully opaque, {{base08}}1a for 10% alpha). + """ + import shutil + + template_path = ROOT / "templates/zed/human-plus-plus.json.tmpl" + + if not template_path.exists(): + print(" ⚠ Zed template not found, skipping") + return + + content = template_path.read_text() + + # Replace all {{baseXX}} placeholders with current palette values + for slot, hex_value in colors.items(): + placeholder = '{{' + slot + '}}' + content = content.replace(placeholder, hex_value.lower()) + + # Write to dist/ + (DIST / "zed").mkdir(parents=True, exist_ok=True) + theme_path = DIST / "zed/human-plus-plus.json" + theme_path.write_text(content) + print(" ✓ dist/zed/human-plus-plus.json") + + # Also copy to zed-extension package + ext_theme_path = PACKAGES / "zed-extension/themes/human-plus-plus.json" + if ext_theme_path.parent.exists(): + shutil.copy(theme_path, ext_theme_path) + print(" ✓ packages/zed-extension/themes/human-plus-plus.json") + + def generate_vscode_theme(colors, meta): """Generate VS Code theme from template. @@ -2315,6 +2351,9 @@ def main(): print("\nGenerating VS Code theme:") generate_vscode_theme(colors, meta) + print("\nGenerating Zed theme:") + generate_zed_theme(colors, meta) + print("\nGenerating Neovim plugin:") generate_neovim(colors, meta)