VS Code extension
The workspace package packages/vscode-tokiforge provides editor support for TokiForge-style token files without loading the full @tokiforge/core bundle inside the extension host (parsing uses jsonc-parser and the same leaf shape as core: objects with value and optional type).
Features
- Hover on dotted token paths (e.g.
color.brand) when the path matches a leaf in the open file. - Completions for token paths inside quoted strings (including
$resolvetargets). - Diagnostics for invalid hex colors when
typeiscolor. - Quick fix to expand shorthand
#RGBto#RRGGBB.
Files are treated as token files when the path matches tokens, theme, toki, or token (case-insensitive).
Build and run locally
From the repo root:
pnpm install
pnpm --filter tokiforge-vscode run compileOpen packages/vscode-tokiforge in VS Code and press F5 to launch an Extension Development Host.
Configuration
| Setting | Default | Description |
|---|---|---|
tokiforge.enable | true | Enable TokiForge language features. |
tokiforge.tokenFilePattern | **/{tokens,tokens.*,theme,toki,tokiforge}.json | Reserved for future workspace-wide indexing. |
Marketplace publishing
Set publisher in packages/vscode-tokiforge/package.json, install @vscode/vsce, then run vsce package from that directory. The package is marked private until you choose to publish.
Relation to IDESupport
IDESupport in @tokiforge/core powers programmatic hover/completions in tools and CLIs. The VS Code extension mirrors the same token path semantics for JSON editors.