First-party plugins for Cook Editor, and a reference for writing your own. Each plugin is a standalone npm package in its own folder.
| Plugin | Description |
|---|---|
meal-journal |
Daily meal journal in Cooklang markup. Start here — it demonstrates the most common plugin APIs. |
Cook Editor is built on Eclipse Theia, which runs
VS Code-style extensions: plugins are written against the
VS Code Extension API and declare their
UI contributions (commands, menus, keybindings, settings, snippets, languages)
in package.json. Cook Editor currently supports VS Code API 1.110.
At startup the app loads every plugin found in editor/plugins/ — an unpacked
.vsix layout or a plain folder with a package.json both work. The
meal-journal plugin demonstrates:
- Commands + keybindings + menus —
contributes.commands,keybindings,menus(withwhenclauses scoping buttons to.journalfiles) - Settings —
contributes.configuration, read viaworkspace.getConfiguration(...) - Language association —
contributes.languagesadding.journalto the built-incooklanglanguage, inheriting its grammar and language server - Snippets —
contributes.snippets - Status bar —
window.createStatusBarItem(...)inactivate() - Workspace file access —
workspace.fs(URI-based),workspace.findFiles - Quick-pick UI —
window.showQuickPick
- Copy the
meal-journalfolder structure:package.json(manifest),tsconfig.json,src/extension.tswith an exportedactivate(). - The manifest needs
name,version,publisher,engines.vscode, andmainpointing at the compiled entry point. - Keep logic that doesn't need the
vscodeAPI in separate modules — they can be unit-tested with plain mocha (seesrc/journal-files.spec.ts). - Build and deploy:
npm run deploycopies the plugin into../../editor/plugins/<publisher>.<name>. - Start the editor:
cd ../../editor && npm run start:electron. The app copieseditor/pluginsinto its own plugins folder on every start.
The dev loop is: edit → npm run deploy → restart the editor.
Releases go to the Cook plugins marketplace (an OpenVSX-compatible registry). One-time setup:
-
Sign in at https://plugins.cook.md with GitHub and create a personal access token (PAT) in your dashboard.
-
Create the namespace matching the plugin's
publisher(once per namespace):npx ovsx create-namespace cooklang -r https://plugins.cook.md -p <PAT>
To release a new version:
cd meal-journal
npm version patch # or minor/major — updates package.json
npm run package # builds meal-journal-<version>.vsix
OVSX_PAT=<PAT> npm run publish:marketplaceVerify with curl https://plugins.cook.md/api/cooklang/meal-journal.