Repository navigation
Extension Development
Kodo is extended with .kox packages. A .kox file is just a ZIP archive with a different
extension - there is no proprietary format, no signing, and no installer.
This page tells you which kind of extension to build and gets you started. Each guide below then covers its area in full.
| You want to addโฆ | Build aโฆ | Guide |
|---|---|---|
| Colors, editor appearance, light/dark themes | Theme extension | Theme extensions |
| Syntax highlighting and editor intelligence for a language | Language extension | Language extensions |
| Panels, commands, menus, previews, or any host integration | Plugin | Plugins |
| A toolchain Kodo can run or build with | Compiler entry | Compilers |
| Understanding what goes inside the package | - | Kodo file format |
Everything is declared with a type field in manifest.json:
type |
What Kodo loads |
|---|---|
language |
A language association plus an engine (see below) |
theme |
theme.json - colors |
plugin |
A .NET assembly implementing IKodoPlugin
|
Compilers are not .kox extensions. They are separate command-line tools registered in a
central index. See Compilers.
A language extension always does two things:
-
Claims file extensions - so Kodo knows that
.mylis a MyLang file. - Provides an engine - so Kodo knows what to do with it.
Pick an engine for the capabilities you need. language.json can provide base highlighting alongside
either LangRules or LSP; avoid implementing the same capability in more than one place.
| Engine | Use it when | You write | Server needed? |
|---|---|---|---|
| Legacy | You only need syntax highlighting. Smallest possible effort. |
language.json only |
No |
| LangRules | It is a community or smaller language and no language server exists for it. | A .NET assembly implementing ILangRulesProvider
|
No |
| LSP | It is an established language with a real language server. | Manifest JSON only | Yes |
Guidance on choosing:
-
Start with Legacy. If
language.jsongets you highlighting you are happy with, stop there. It is pure data, has no build step, and cannot crash the editor. - Use LangRules for a language nobody has written a server for. You own the parsing, so you own the bugs - see the honest trade-offs before committing to it.
- Use LSP whenever a server exists. You write configuration, not a parser, and the server is maintained by the language's community.
Legacy, LangRules, and LSP can coexist in one package when they handle different concerns (for example,
language.jsonfor token colors and LSP for diagnostics). Keep one clear source of truth for each capability so duplicate diagnostics or token colors do not compete.
Full detail, including every engine's API and worked examples, is in Language extensions.
Kodo scans these locations:
| Location | Purpose |
|---|---|
%LocalAppData%\Kodo\Extensions\ |
Installed extensions (Windows). The normal install target. |
Extensions/ next to the Kodo source |
Local development. Live-reloads while you work. |
%LocalAppData%\Kodo\PluginCache\ |
Where plugin DLLs from .kox packages are extracted. Do not write here. |
%LocalAppData%\Kodo\Compilers\ |
Where managed compilers are installed. Do not write here. |
Note: Kodo used to keep extensions in
%AppData%\Kodo\Extensions\. That path is still read as a fallback, but only when%LocalAppData%\Kodo\Extensions\does not exist - and Kodo creates that folder on first launch, so in practice the old path is ignored. If you installed extensions before the move, copy them across once:%LocalAppData%\Kodo\Extensions\is the path that counts.
Both extension folders are watched with a FileSystemWatcher for created, deleted, and renamed
files, so dropping in a new .kox picks it up without restarting Kodo. Two consequences:
- The watcher does not recurse (
IncludeSubdirectories = false). Keep packages flat. - The watcher does not fire on in-place content changes. If your editor rewrites a file rather than creating a new one, delete and re-add it, or restart Kodo.
Develop against %LocalAppData%\Kodo\Extensions\, not the repo folder, unless you are working on
Kodo itself. The repo folder is for testing changes to Kodo.
This is a complete, installable theme. No build step, no compiler.
Create a folder and add manifest.json:
{
"id": "my-first-theme",
"version": "1.0.0",
"name": "My First Theme",
"type": "theme",
"author": "Your Name",
"description": "A simple dark theme."
}Add theme.json beside it:
{
"themeId": "my-first",
"displayName": "My First Theme",
"baseTheme": "Dark",
"windowBackground": "#10131A",
"topBar": "#1C2330",
"sidebar": "#121722",
"card": "#202938",
"primaryText": "#F2F5FA",
"mutedText": "#A8B2C2",
"surfaceBorder": "#354154",
"accent": "#6EA8FE",
"button": "#29364B",
"buttonHover": "#38506F",
"editorBackground": "#151A24"
}Drop the folder into %LocalAppData%\Kodo\Extensions\, and it appears in Kodo's theme list
immediately. That is a working extension. Theme extensions covers every
supported color key.
A first language extension is nearly as quick - see the Legacy walkthrough.
An unpacked folder works for development. To distribute, zip it and rename:
# Windows, from the folder containing your package folder
Compress-Archive -Path .\my-theme\* -DestinationPath .\my-theme-1.0.0.zip
Rename-Item .\my-theme-1.0.0.zip .\my-theme-1.0.0.kox# Linux / macOS
(cd my-theme && zip -r ../my-theme-1.0.0.kox . -x "*.pdb" "*.tmp")
unzip -l ../my-theme-1.0.0.kox | head # manifest.json must be at the rootThe * / . is the important part: it puts manifest.json at the archive root rather than
nesting it inside a folder. Kodo does not search subdirectories.
Full packaging rules and the complete manifest reference: Kodo file format.
Real, complete packages live in two sibling repositories:
-
Kodo-Extensions - the published marketplace.
Contains 29 shipped
.koxfiles covering every type: theme packs, Legacy-only packages (Shine, HolyC), LangRules packages (Python, Rust, TOMLโฆ), LSP packages, and the marketplace index files. -
Kodo-Extension-Template - small,
deliberately minimal examples of each type, plus two example plugins and a reusable
LangRules.Conformancetool that validates a provider against fixture files. Start here.
Reading a real package is the fastest way to learn. Any .kox is a ZIP:
unzip -o Python-Kodo-Extension-v2.1.0.kox -d /tmp/python-extRead Testing and pull requests. The short version: install your own package into a clean Kodo profile and use it. A package that only works from your development folder is not finished.
To submit to the official marketplace, open a pull request against
Kodo-Extensions adding your .kox to Extensions/
and an entry to the matching index file. See
Kodo file format#submitting-to-the-marketplace.
| Guide | Covers |
|---|---|
| Kodo file format |
.kox anatomy, every manifest.json field, packaging, marketplace submission |
| Language extensions | Legacy, LangRules, and LSP engines in full |
| Theme extensions | Every theme color key, multi-theme packages |
| Plugins |
IKodoPlugin, project setup, lifecycle, debugging |
| Compilers | Registering a run/build toolchain and its resolver |
| Testing and pull requests | checklists, common failures, submitting |
For building Kodo itself, see Getting started.
Kodo is licensed under the GNU GPL-v3.0. Extension developers: see the EXTENSIONS_LICENSE in the main repository.