CFDL

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 .vsix is also attached to every release on https://github.com/cfdl-dev/cfdl-releases/releases for installing by hand.

  • The language server, one cfdl-lsp binary 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/cfdl installs cfdl-lsp beside cfdl and puts both on your PATH, and the extension finds it there with no setting.

  • Optional: the language docs bundle cfdl-docs-<version>.tar.gz for offline reading, and the packs bundle cfdl-packs-<version>.tar.gz if 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-lsp

Step 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 path
  • cfdl.enableLoweringValidation: set to true or false
  • cfdl.trace.server: off, messages, or verbose

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 ~/.cfdl

Then 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

  1. Open your CFDL model folder in VSCode.
  2. Open a .cfdl file.
  3. Use CFDL language features while authoring:
    • diagnostics
    • completions
    • go-to-definition
    • semantic highlighting
    • CFDL: Apply Pack Template command

Troubleshooting

  • If features are missing, verify cfdl.serverPath points to the correct binary.
  • If using packs, verify cfdl.packsPath is correct for your model workspace.
  • Enable cfdl.trace.server = verbose to inspect client/server activity.