A VS Code extension for C4 DSL Models
This is a VS Code extension for specifying software architecture models with the Structurizr DSL.
Structurizr DSL, known as diagram as text, is the textual representation of the C4 model.
This extension is backed by an Xtext grammar, which is used to represent the Structurizr DSL language reference in a formal way.
A generator creates PlantUML diagrams on-the-fly, while editing. The diagrams are located in a sub-folder named plantuml-gen. The PlantUML extension will be installed automatically as dependency, if not yet already installed.
Beside that it provides all typical language editor features like:
- syntax highlighting
- syntax validation
- code completion
- code lenses
- semantic validation
Xtext requires a Java VM for running the language server.
:warning: There seems to be runtime issues with Java 11 or higher. Please use Java 8 instead.
The PlantUML extension requires Graphviz for layouting the diagrams. See the section requirements for more information, how to install it for your OS.
Your models must have the file extension *.c4.
The goal is, that the Xtext grammar (used in this extension) is compliant to the origin language reference.
However the Xtext grammar is a bit more strict in some points:
- Double quote characters ("...") are mandatory, even when a property does not contain whitespaces
- You can't use keywords like person or container as variable names
Unsupported DSL Elements
As of now following DSL elements from the language reference are not yet supported:
- url and properties
- !include for importing re-usable model fragments
- !adr for refering to architecture decision records
- !docs for refering to additional markdown/asciidoc documentation
- filtered diagrams
Those elements will be provided in subsequent releases.