targets.editors: VSCode, kimi, Sublime, and Vim Targets#

VscodeTarget and KimiTarget are thin wrappers around irix.themecode.generate_vscode and generate_kimi – those generators already produce correct, Semantics-driven theme JSON for both modes, so these targets exist only to give the CLI-only generator a checked-in, golden-tested out/editors/ artifact pair. No color logic is duplicated here.

SublimeTarget is new capability: irix.schemes only adapts foreign .sublime-color-scheme files (rewriting their existing color literals toward the nearest Irix swatch). Nothing in this repo previously generated one from scratch. This target does, resolving every value through irix.semantics.Semantics – the same canon generate_vscode/generate_kimi use – so all four editor artifacts agree on what each role means.

VimTarget rewrites the single hand-authored out/shell/irix.vim with real &background-branching, both branches drawn from the same anchor table (irix/data/anchors/editors.yaml, target vim) resolved through Palette.dark() / Palette.light() – the same shape every other target in this package uses, KittyTarget foremost among them.

Editor targets: VSCode/kimi generate-only mirrors, a native Sublime scheme, and vim.

VscodeTarget and KimiTarget are thin wrappers around irix.themecode.generate_vscode and generate_kimi – those generators already produce correct, Semantics-driven theme JSON for both modes, so these targets exist only to give the CLI-only generator a checked-in, golden-tested out/editors/ artifact pair. No color logic is duplicated here.

SublimeTarget is new capability: irix.schemes only adapts foreign .sublime-color- scheme files (rewriting their existing color literals toward the nearest Irix swatch). Nothing in this repo previously generated one from scratch. This target does, resolving every value through irix.semantics.Semantics – the same canon generate_vscode/ generate_kimi use – so all four editor artifacts agree on what each role means.

VimTarget rewrites the single hand-authored out/shell/irix.vim. That file’s dark half mapped substantially – not entirely, see irix/data/anchors/editors.yaml’s header – to genuine Irix palette addresses; its light half was unreachable dead code (s:style was hardcoded 'dark', so &background was read only to be overwritten right back to 'dark' at end of file) filled with literal third-party Ayu Light hex values. The rewrite is a single file with real &background-branching, both branches drawn from the same anchor table (irix/data/anchors/editors.yaml, target vim) resolved through Palette.dark() / Palette.light() – the same shape every other target in this package uses, KittyTarget foremost among them.

class irix.targets.editors.VscodeTarget(*, name: str = 'vscode', family: str = 'editors')#

Bases: Target

VSCode theme JSON, generated via themecode.generate_vscode for both modes.

render(mode: Mode) → dict[str, str]#

Render the VSCode theme JSON for mode via themecode.generate_vscode.

model_config = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class irix.targets.editors.KimiTarget(*, name: str = 'kimi', family: str = 'editors')#

Bases: Target

kimi-code theme JSON, generated via themecode.generate_kimi for both modes.

render(mode: Mode) → dict[str, str]#

Render the kimi-code theme JSON for mode via themecode.generate_kimi.

model_config = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class irix.targets.editors.SublimeTarget(*, name: str = 'sublime', family: str = 'editors')#

Bases: Target

Native .sublime-color-scheme target.

Resolved directly through Semantics – no anchor table needed (see this module’s docstring): every value fits an existing semantics role.

render(mode: Mode) → dict[str, str]#

Render the native .sublime-color-scheme JSON for mode.

deploy_dest(relpath: str) → Path | None#

Return ~/.config/sublime-text/Packages/User/<basename>.

XDG-independent by design (Sublime Text does not consult XDG_CONFIG_HOME) and resolved live via Path.home() on every call, not cached at import time.

Parameters:

relpath – One of render’s result keys.

model_config = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class irix.targets.editors.VimTarget(*, name: str = 'vim', family: str = 'editors')#

Bases: Target

The single-file irix.vim colorscheme.

Real &background branching over one anchor table (irix/data/anchors/editors.yaml, target vim), replacing a dark half that was mostly-but-not-entirely genuine and a light half that was unreachable Ayu Light contamination (s:style was hardcoded 'dark'). Emits both the load-bearing legacy path (shell/irix.vim) and the new canonical family path (editors/irix.vim) with identical content – see this module’s docstring for the transition rationale.

render(mode: Mode) → dict[str, str]#

Render the single-file colorscheme; identical content for both modes.

Parameters:

mode – Unused – both &background branches are always embedded together.

model_config = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].