A lightweight VS Code extension for exploring Catala catala-metadata declarations in a normal VS Code session.
- Website: https://intelligent-advisor.com
- Repository: https://github.com/Intelligent-Advisor/catala-model-tree-vscode
It displays a tree of:
- Enumerations (value lists)
- Structures (data fields)
- Scopes (inputs/outputs/internals)
This extension can be built as a local .vsix and installed into your regular VS Code instance. Publishing to the Marketplace is not required.
- Open
tools/catala-model-tree-vscode. - Install dependencies:
npm install
- Build the extension:
npm run package
- Install the generated
.vsixinto your normal VS Code:Or use VS Code → Extensions →code --install-extension catala-model-tree-0.2.1.vsix
...→Install from VSIX... - In the Catala workspace where you want to use it, run
Catala Model Tree: Openfrom the Command Palette.
Use the Rebuild button to re-parse files after model changes.
- The
packagescript uses a pinned localvscedependency instead ofnpx, so packaging is reproducible once dependencies are installed. - The default package path uses
--no-dependencies, which is appropriate here because the shipped extension runtime is the compiledout/bundle plus static assets, not the development toolchain. npm run package:fullis available if you ever want to test the standard dependency-traversal path.
catalaModelTree.modelFiles: glob patterns (workspace relative) for Catala files to parse.- Default:
src/**/*.catala_en
- Default:
catalaModelTree.includeScopes: include scope declarations (defaulttrue).catalaModelTree.includeStructures: include structure declarations (defaulttrue).catalaModelTree.includeEnums: include enumeration declarations (defaulttrue).catalaModelTree.rootScopes: optional list of scope names to include. Empty = all.catalaModelTree.theme:auto,dark, orlight.
- This parser is intentionally simple and relies on regexes. It is meant to be fast and easy to extend.
- It only reads
catala-metadatadeclarations (declaration enumeration/structure/scope).