This guide is for domain experts and model authors who want to use CFDL in VSCode.
Documentation: https://cfdl.dev
What you install
-
The extension, from the VS Code Marketplace or Open VSX: search for "CFDL" under publisher
cfdl. A.vsixis also attached to every release on https://github.com/cfdl-dev/cfdl-releases/releases for installing by hand. -
The language server, one
cfdl-lspbinary for your operating system, from the same release:- macOS Apple Silicon:
cfdl-lsp-darwin-arm64 - macOS Intel:
cfdl-lsp-darwin-x64 - Linux x64:
cfdl-lsp-linux-x64 - Windows x64:
cfdl-lsp-windows-x64.exe
On macOS or Linux,
brew install cfdl-dev/tap/cfdlinstallscfdl-lspbesidecfdland puts both on yourPATH, and the extension finds it there with no setting. - macOS Apple Silicon:
-
Optional: the language docs bundle
cfdl-docs-<version>.tar.gzfor offline reading, and the packs bundlecfdl-packs-<version>.tar.gzif you want the pack sources on disk. The extension bundles both.
Step 1: Install the VSCode extension
From the registry: open the Extensions view, search for CFDL, and install
the one published by cfdl.
From the release asset: open the Extensions view, select ..., choose
Install from VSIX..., and pick cfdl-vscode-<version>.vsix.
Step 2: Place the cfdl-lsp binary
Store the binary in a stable location on your machine.
Examples:
- macOS/Linux:
~/bin/cfdl-lsp - Windows:
C:\\Tools\\cfdl\\cfdl-lsp.exe
On macOS/Linux, make it executable:
chmod +x /path/to/cfdl-lspStep 3: Configure the extension
In VSCode settings (settings.json), set:
{
"cfdl.serverPath": "/absolute/path/to/cfdl-lsp",
"cfdl.entryFile": "model.cfdl"
}Optional settings:
cfdl.packsPath: pack directory pathcfdl.enableLoweringValidation: set totrueorfalsecfdl.trace.server:off,messages, orverbose
Step 3.5: Configure packs path (if using packs)
If you downloaded cfdl-packs-<version>.tar.gz, extract it to a stable path.
Example:
mkdir -p ~/.cfdl
tar -xzf cfdl-packs-<version>.tar.gz -C ~/.cfdlThen set:
{
"cfdl.packsPath": "/absolute/path/to/extracted/packs"
}Note: the VSIX also includes bundled packs/docs, but setting cfdl.packsPath to an explicit packs directory is the most predictable production setup.
Step 4: Start authoring
- Open your CFDL model folder in VSCode.
- Open a
.cfdlfile. - Use CFDL language features while authoring:
- diagnostics
- completions
- go-to-definition
- semantic highlighting
CFDL: Apply Pack Templatecommand
Troubleshooting
- If features are missing, verify
cfdl.serverPathpoints to the correct binary. - If using packs, verify
cfdl.packsPathis correct for your model workspace. - Enable
cfdl.trace.server = verboseto inspect client/server activity.