Kanoniq for VS Code
Extension ID extenza-works.kanoniq.
Part of Kanoniq, by Extenza Works.
Kanoniq is an architecture repository built on a unified canonical model: one source of truth for elements and relationships, where every diagram is a projection of that model rather than a drawing that owns its own data. Models are stored as files in git, and the metamodel is a superset of ArchiMate — so ArchiMate is one language to author and export in, not the boundary.
Repository: https://github.com/Extenza-Works/kanoniq
This package
The VS Code extension. Today it claims the .kq extension and colours it: keywords, kinds, modifiers, strings, descriptions, comments, literals and Codes each get their own TextMate scope, so any theme can tell them apart.
The TextMate grammar is generated from the Kanoniq grammar in @extenza-works/kanoniq-core, not written by hand. Every keyword is classified by where the grammar uses it — a kind vocabulary, a flag, or a plain keyword — so a keyword added to the language is coloured correctly on the next regeneration with no edit here. The notation itself is specified in spec/tool/dsl.md.
Highlighting is lexical: a Code being declared and a Code being referenced look the same.
Layout
| Path |
Contents |
package.json |
The extension manifest: the kanoniq language and its grammar |
language-configuration.json |
Comments, brackets, auto-closing quotes |
syntaxes/kanoniq.tmLanguage.json |
Generated. The TextMate grammar — never edit it |
scripts/ |
The generator that writes it |
test/ |
Vitest suite: the committed grammar is current, and it scopes the ecommerce example the way the parser classifies it |
.vscode/launch.json |
F5 opens an Extension Development Host on the ecommerce example |
.vscodeignore |
What stays out of the .vsix |
Commands
| Command |
What it does |
pnpm generate:grammar |
Regenerate the TextMate grammar; commit the result |
pnpm package |
Build kanoniq-<version>.vsix in this directory |
pnpm test |
Run the suite once |
pnpm typecheck |
Typecheck scripts/ and test/ |
To try it, open this directory in VS Code and press F5.
© 2026 Extenza Works. All rights reserved.