This guide is for domain experts and model authors who want to use CFDL in VSCode.
Documentation: https://cfdl.dev
At launch, the extension will be published to the VS Code Marketplace and Open VSX (install by searching "CFDL"); until then, install from Release assets as described below.
What you install
From a GitHub Release, download:
- the VSCode extension package:
cfdl-vscode-<version>.vsix - language docs bundle:
cfdl-docs-<version>.tar.gz(optional, for offline docs) - packs bundle:
cfdl-packs-<version>.tar.gz(recommended for pack-enabled models) - one
cfdl-lspbinary for your operating system:- macOS Apple Silicon:
cfdl-lsp-darwin-arm64 - Linux x64:
cfdl-lsp-linux-x64 - Windows x64:
cfdl-lsp-windows-x64.exe
- macOS Apple Silicon:
Step 1: Install the VSCode extension
- Open VSCode.
- Open Extensions view.
- Select
...and choose Install from VSIX.... - 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.