Skip to main content
Version: 0.3.3

zed

Generates a complete theme file for the Zed editor — a fast Rust-based collaborative code editor. The output is a single JSON file conforming to Zed's v0.2.0 theme schema, mapping tinct's semantic palette onto Zed's UI tokens, syntax highlighting, terminal ANSI block, and diff/diagnostic colours. Zed auto-discovers themes by directory and reloads the active theme live when its file changes on disk.

When tinct is run with both primary and alternate themes (--dual-theme), the plugin emits a single JSON file containing both variants inside the themes array. Zed displays them as separate entries in the theme picker.

Installation

Via the official plugin repository

tinct plugins install zed

Build from source

cd contrib/plugins/output/zed
go build -ldflags "-X main.Version=0.1.0" -o tinct-plugin-zed
install -m 0755 tinct-plugin-zed ~/.local/bin/

Verify

which tinct-plugin-zed
tinct-plugin-zed --plugin-info | jq .

The plugin uses tinct's go-plugin RPC protocol and is discovered automatically once it's on $PATH.

Quick start

tinct generate -i image -p ~/Pictures/wallpaper.jpg -o zed

Generated files

FilePathRole
tinct.json~/.config/zed/themes/tinct.jsonComplete Zed theme — UI tokens, syntax highlighting, terminal ANSI block, diff/diagnostic colours. Wrapped in Zed's v0.2.0 themes array.

The plugin auto-detects Zed's config directory at both ~/.config/zed/themes (native) and ~/.var/app/dev.zed.Zed/config/zed/themes (Flatpak), writing to whichever exists. If both exist, both get the theme.

Integration

No manual configuration required to make the theme available. Zed scans ~/.config/zed/themes/ on startup and watches it for changes. Generating the theme is enough to make it appear in Zed's theme picker.

To activate it, choose one:

Press Cmd+Shift+P (macOS) / Ctrl+Shift+P (Linux), then run:

theme selector: toggle

then select Tinct from the list.

Via Zed's settings file

$EDITOR ~/.config/zed/settings.json
{
"theme": "Tinct"
}

For dual-theme mode, point both light and dark slots:

{
"theme": {
"mode": "system",
"light": "Tinct LIGHT",
"dark": "Tinct DARK"
}
}

Reload behaviour

Automatic

Zed watches its themes directory and reloads the active theme live when its file changes. After the initial selection, regenerating with tinct propagates immediately to any running Zed window — no restart, no re-selection.

Manual fallback

If a regeneration doesn't appear:

  • Confirm Zed has the theme selected (grep theme ~/.config/zed/settings.json).
  • Reload the theme manually via the command palette: theme selector: toggle → select Tinct again.
  • Restart Zed if all else fails.

Uninstall / revert

  1. Remove the config line from ~/.config/zed/settings.json if you set "theme": "Tinct" — pick a different theme, or remove the key to fall back to Zed's default:

    $EDITOR ~/.config/zed/settings.json
  2. Delete the generated file:

    rm ~/.config/zed/themes/tinct.json
    # also remove from Flatpak install if present:
    rm -f ~/.var/app/dev.zed.Zed/config/zed/themes/tinct.json
  3. Reload: Zed picks up the file deletion live via its themes-dir watcher. If the active theme was Tinct, Zed will switch to its default — re-select your preferred theme via the command palette.

  4. External state: this plugin only writes to Zed's themes/ directory. To also remove the plugin binary:

    tinct plugins uninstall zed
    # or, for a source build:
    rm ~/.local/bin/tinct-plugin-zed

Flags

FlagDefaultDescription
--zed.output-dir / -oauto-detected (~/.config/zed/themes)Override the output directory

Colour role mapping

Zed's v0.2.0 theme schema is large — ~100 tokens covering editor chrome, syntax, terminal, diagnostics, diffs, and Git status. Selected mappings:

UI chrome

Zed tokenTinct role
backgroundbackground
surface.background / elevated_surface.backgroundsurface
element.backgroundsurfaceContainer
element.hoversurfaceContainerHigh
element.active / element.selectedsurfaceContainerHighest
borderoutline
border.variantoutlineVariant
border.focusedaccent1
border.disabledborderMuted
textforeground
text.mutedforegroundMuted
text.accentaccent1
panel.background / tab_bar.backgroundsurfaceContainerLowest
tab.active_background / toolbar.backgroundsurfaceContainerLow

Diagnostics & status

Zed tokenTinct role
errordanger
warningwarning
successsuccess
info / hintinfo

Terminal ANSI

All 16 ANSI colours (terminal.ansi.blackwhite and bright_*) use tinct's perceptual ANSI matcher so terminal output sits close to standard expectations regardless of palette source.

Syntax highlighting

Zed tokenTinct role
commentforegroundMuted (italic)
keywordaccent4
functionaccent1
stringsuccess
typeaccent2
constantaccent3
operatoronSurface
variableforeground

Customising the template

mkdir -p ~/.config/tinct/templates/zed
tinct plugins templates dump -o zed -l ~/.config/tinct/templates/zed
$EDITOR ~/.config/tinct/templates/zed/theme.json.tmpl

Tinct prefers your version over the embedded default. See the templating reference for available functions.

Troubleshooting

Plugin skipped: "Zed not installed (config directory does not exist)"

ls ~/.config/zed 2>/dev/null
ls ~/.var/app/dev.zed.Zed/config/zed 2>/dev/null

The plugin requires either the native or Flatpak Zed config directory to exist. If you've installed Zed in a non-standard location, pass --zed.output-dir explicitly.

Theme not appearing in Zed's picker

ls -l ~/.config/zed/themes/tinct.json
jq '.themes[].name' ~/.config/zed/themes/tinct.json

If the file exists and is valid JSON, the picker scans on each toggle — open theme selector: toggle again. If the file is missing, the plugin was skipped: run with --verbose to see detection logs.

JSON parse errors in Zed

jq . ~/.config/zed/themes/tinct.json

A template syntax error from a custom override is the usual cause. Remove the override or fix it; if you didn't customise the template, file an issue with the verbose output.

  • opencode — AI-assisted coding agent themed the same way.
  • neovim, helix — other editors tinct themes.