Imported from portersky/sonokai-zed (
AGENTS.md). Install upstream withnpx skills add portersky/sonokai-zed. Copyright stays with the author.
AGENTS.md
Guidance for AI agents working in this repository.
Project Summary
A port of the Sonokai Neovim theme to Zed. Seven dark variants (Default, Default Darker, Shusia, Andromeda, Atlantis, Maia, Espresso) are defined as a single Zed extension.
generate.ts is the source of truth. It defines per-variant palettes and
maps them to Zed's theme JSON schema, then writes themes/sonokai.json.
Never edit themes/sonokai.json by hand.
Key Files
| File | Role |
|---|---|
generate.ts |
Palette definitions and theme builder (Deno) |
themes/sonokai.json |
Generated output — do not edit directly |
extension.toml |
Zed extension metadata (id = sonokai-zed) |
Key Constraints
themes/sonokai.jsonis generated. Always regenerate it after editinggenerate.ts; never commit manual edits to it.- The
$schemafield ingenerate.tsmust stay athttps://zed.dev/schema/themes/v0.2.0.json. Update it only when intentionally migrating to a newer Zed schema version. - The extension
idinextension.tomlmust match the folder name under%LOCALAPPDATA%\Zed\extensions\installed\for the dev extension to load.
Build
Regenerate the theme JSON:
deno run --allow-write=themes/sonokai.json generate.ts
Zed picks up changes automatically when the dev extension is installed. If it does not reload, use the Extensions panel to reinstall the dev extension.
Coding Conventions
- Language: TypeScript, runtime Deno
- Indentation: 2 spaces
- Quotes: single quotes for string literals
- Naming:
camelCasefor variables and functions,PascalCasefor types and interfaces,SCREAMING_SNAKE_CASEonly for true constants - Object literals: align values with spaces when entries share a common
structure (palette entries, style keys) — as already done in
generate.ts - Colors are
#rrggbbhex strings. Use thec(hex, alpha?)helper to append an optional two-digit alpha:c(p.blue, '40')→'#76cce040'.
Shell Scripts
- Always use
#!/bin/shshebang for shell scripts - Scripts must be POSIX compliant (no bashisms)
- When providing commands to users:
- Windows/PowerShell: use
`for line continuation - Unix/Linux/macOS: use
\for line continuation
- Windows/PowerShell: use
Commit Messages
- Follow the 50/72 rule:
- Subject line: max 50 characters
- Body lines: wrapped at 72 characters
- Use conventional commit prefixes (
feat:,fix:,docs:,chore:, etc.) - Separate subject from body with a blank line
- Do not add yourself as a co-author (
Co-Authored-By:trailers are forbidden)
Example:
feat: add Espresso variant
Warm brown palette ported from the Neovim Sonokai Espresso variant.
Palette values sourced from the original sainnhe/sonokai repo.
Documentation (Markdown)
- Wrap normal text and lists at max 80 columns.
- Exceptions: tables and code blocks can exceed 80 columns when formatting requires it.
- Use standard Markdown:
**bold**,`inline code`,##headings,-or numbered lists, fenced code blocks with language hints (```ts,```sh). - Keep examples concise, up-to-date, and self-documenting.
- Do not use em dashes (
--). Use a colon or rewrite the sentence. - Each shell command gets its own fenced code block. Precede each block with a short plain-text label describing what the command does.
README.md: installation and development workflow. Keep it in sync when changing the build process.- This file (
AGENTS.md) follows its own rules.