Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>CadastreNew to Visual Studio Code? Get it now.
Cadastre

Cadastre

Cadastre

|
1 install
| (0) | Free
Cadastre language support: highlighting, diagnostics, outline, go to definition, hover, live preview and build of views.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Cadastre for VS Code

Language support for Cadastre registries (.ca), plans (.cav) and checks (.cac):

  • Syntax highlighting, immediately, from a TextMate grammar (syntaxes/cadastre.tmLanguage.json).
  • Semantic highlighting from the language server, computed with the Tree-sitter grammar and its highlights.scm: the same coloring as the playground.
  • Diagnostics for the whole project as you type: errors, warnings and incomplete elements, as cadastre check reports them.
  • Outline (and breadcrumbs, Ctrl+Shift+O): resources nested as written, links, views and style blocks.
  • Go to definition (F12, Ctrl+click) on any reference: on:, link ends, carries, names in plans such as follow(data, from: app). Names are resolved like the compiler does (suffixes, scope by system, expected kind); an ambiguous name lists its candidates.
  • Formatting (Format Document, Shift+Alt+F, or on save with editor.formatOnSave): the canonical form of cadastre fmt: one statement per line, short blocks on one line and long ones one item per line, canonical indentation and spacing, links, single-line declarations and style rules aligned in columns; comments stay in place.
  • Find references (Shift+F12, Alt+Shift+F12) of a resource: its declaration and every name that designates it, in the registry and in the plans (link ends, on:, follow, names in where filters such as name in [datacore01]); the occurrences of the name under the cursor are highlighted in the file.
  • Rename (F2) a resource, on its declaration or on any name designating it: the declaration and every reference change, in the registry and the plans. A qualified name keeps its prefix (middleware.esb → middleware.broker), a short name stays short; renaming a system or a site changes its segment in the names of its descendants. The new name is checked first (valid, not taken by a sibling), then the project compiled again: a renaming that would give an error, or leave a name it cannot follow (a for_each, a host name), is refused with the reason, and nothing changes.
  • Hover on a resource or a reference: kind, qualified name, description, attributes (with the inherited owner / operator), contents, incoming and outgoing flows.
  • Views: a code lens above each view of a .cav file, Preview, Build and Compose.
  • Checks: above each check, its result, kept up to date as you type: Passed · no node selected, none expected, Failed · 3 nodes selected, none expected, or Not run while the project has errors. A click writes the detail to the Cadastre checks output: the expectation, the message, the nodes or edges selected and those failing it, each with the file and line it is declared at (a click opens it).
    • Preview opens a panel rendering the view as you type, one tab per format: the diagrams (SVG and DOT laid out by a WebAssembly build of Graphviz, no dot needed; Mermaid drawn with its ELK layout), the tables (HTML, and Markdown rendered by VS Code) and the text outputs; Source shows what a rendered format is written as. A click on a resource opens its url or console outside VS Code; on a resource without one, or with Ctrl (Cmd on macOS), its declaration in the editor; on an edge, the line of its link (a list to choose from when the edge draws several links). The tooltips are bubbles shown at once, telling where the data of an edge go; a node pointed at lights up with its edges and neighbours. While the project has errors, the last rendering stays, dimmed, under the error messages. The wheel zooms a diagram around the cursor and a drag moves it (or the buttons of its corner: zoom in, out, fit, 1:1, full screen), kept as you type. Move by hand draws the diagram with Cytoscape.js, laid out like the SVG: its nodes and frames dragged, its edges bent (drag an edge, or right click to add or remove a bend), kept as you type; nothing goes back to the files.
    • Build runs cadastre build --view <name> and writes the renderings to out/. Without Graphviz, the extension lays out the SVG itself.
    • Compose opens the composer of views on the view, in a panel: the view as a sentence, its diagram, and the words proposed to change it, each showing what it changes in the diagram before it is taken (see the guide, § The composer of views); Finish… saves the view into its .cav file. Cadastre: Compose a view, from the command palette or the editor title bar, starts a new one from a recipe. The extension runs cadastre serve --edit on the project for it, on a port of its own, on this machine only, stopped with the last panel; the page reads the files on disk: save a .cav being edited before composing its views.
    • Also from the command palette (Cadastre: Preview view, Build view, Build all views), the editor title bar and the explorer context menu.
  • Completion (Ctrl+Space, and after :, ->, [, ,): resource kinds that fit where you are (and virtual before a machine), the keys of the enclosing resource (with their type), closed values (hosting: on-prem…), the resources a reference expects (on:, carries:, link targets, host names of virtual IPs) by their shortest unambiguous name, protocols and layers used in the project; in plans, keywords, kinds, formats, render options and style properties with their values.
  • Comment toggling, bracket matching and auto-closing.

A project is the workspace folder containing the file (or, outside any workspace folder, the file's directory): all its .ca, .cav and .cac files are compiled together.

Installation

Install Cadastre from the Visual Studio Marketplace or Open VSX (VSCodium, Cursor…): code --install-extension cadastre.cadastre. Or download the .vsix of your platform from the releases (cadastre-0.6.0-win32-x64.vsix, linux-x64, darwin-arm64, darwin-x64) and install it with Extensions: Install from VSIX…. It ships the cadastre executable, started as cadastre lsp.

The executable is looked up in this order: the cadastre.server.path setting, the CADASTRE_SERVER environment variable, the executable shipped with the extension, then cadastre from the PATH (a .vsix built locally has none). Without it, highlighting still works.

cargo install cadastre

Settings

Setting Default
cadastre.server.path "" Path of the cadastre executable; empty: the one shipped, or from the PATH
cadastre.diagnostics.incomplete hint hint, information, warning or off
cadastre.diagnostics.strict false Incomplete elements are errors, like cadastre check --strict
cadastre.trace.server off Traces the LSP messages in the output panel

Command: Cadastre: Restart language server.

Development

npm install
npm run compile
npm test

npm run compile also bundles Mermaid and its ELK layout into media/mermaid.js (from media-src/), loaded by the preview when a Mermaid tab is shown, and Cytoscape.js with the drawing of a view to move by hand (compiler/crates/cadastre-core/src/render/movable.js) into media/movable.js; the zoom of the diagrams (render/zoom.js, shared with the site and the playground) goes to media/zoom.js. npm test tokenizes snippets with VS Code's TextMate engine; node test/grammar.test.js file.ca prints the scopes of a file.

To try the extension, open this folder in VS Code and run Run extension (examples/retail) (F5): it uses the debug build of the compiler (cargo build in compiler/). npm run package builds a .vsix, installed with Extensions: Install from VSIX…; with an executable copied to bin/ (cadastre or cadastre.exe), it ships it, as the releases do (npx vsce package --target win32-x64).

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft