Structurizr DSL for C4 Modelling
Support for Structurizr used to describe C4 architecture models.
How to install
With Forge Super installed, the button above opens the app on this extension, where you press Install. Nothing is installed until you do.
You can also open the Extensions panel in the app and search for Structurizr DSL for C4 Modelling. The extension's id is structurizr.
Don't have Forge Super yet? Download it here.
README
From the extension's repository, written by its authors and not by Mentenaz. See the source.
[!WARNING] This is an unreleased Zed extension under active development. Currently it needs to be manually installed.
Structurizr DSL for Zed
Zed exention for the Structurizr DSL, a text-based DSL commonly used to describe C4 architecture models.
What this extension provides
- syntax highlighting for the currently supported Structurizr DSL surface
- block-aware indentation for core workspace, model, deployment, view, and style constructs
- bracket matching for Structurizr block delimiters
- outline support for workspaces, model elements, views, styles, and configuration blocks
- folding queries for the major block forms supported by the grammar
- text objects for block and comment navigation in Zed's Vim mode
- local language-server launching for
strz-lspvia Zedlsp.strz-lsp.binary.path,STRZ_LSP_BIN, orPATH.
Language naming and discoverability
The extension is published as Structurizr DSL and is intended for users working with Structurizr and C4-style architecture modelling in .dsl files.
If Zed does not automatically detect a file, select Structurizr DSL from the language picker.
Repository structure
extension.tomlcontains the extension manifest and the pinned upstream grammar reference.languages/structurizr/contains the Zed-specific language config and Tree-sitter query files that shape the editor experience.src/lib.rscontains the extension code for registering thestrzLSP with Zed.
Development
To install the extension locally in Zed:
- Clone this repo
git clone git@github.com:sinon/zed-structurizr.git - Open the command palette in Zed and run
zed: install dev extension. - Select the directory where project was cloned to e.g
~/dev/zed-structurizr. - Open a
.dslfile in your editor once extension has finished installing.
To test the local LSP integration:
- Build
strzfrom https://github.com/sinon/tree-sitter-structurizr - In Zed user settings or the target worktree's
.zed/settings.json, configure:
{
"lsp": {
"strz-lsp": {
"binary": {
"path": "~/path-to/strz",
"args": ["server"]
}
}
}
}
- Launch Zed, optionally
--foregroundcan be set when launching from CLI to help with debugging.
For one-shot terminal launches, the extension also honors
STRZ_LSP_BIN from Zed's shell environment when you start a fresh Zed
instance:
STRZ_LSP_BIN=~/path-to/strz zed --foreground
If no explicit override is configured, the extension will look for
strz on PATH.
If Zed is already running, prefer lsp.strz-lsp.binary.path; launching
zed again from a shell does not reliably replace the environment of the
already-running app.
Also useful for debugging is zed: open log from the Command Palette.
When updating editor support, keep the extension-side query files in languages/structurizr/ aligned with the grammar's supported syntax and bump the pinned grammar revision in extension.toml when the extension should consume newer grammar behavior.