Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Editor Setup

Syntax highlighting for .cam files is optional but useful. The grammar lives in the cambrian-lang tree under cambrian-syntax/.

VS Code / Cursor (TextMate)

The extension is a local TextMate package (package.json + syntaxes/cambrian-clean.tmLanguage.json). It registers the cambrian language for the .cam extension.

Install from the repo

# From your cambrian-lang checkout
cp -R cambrian-syntax ~/.vscode/extensions/cambrian-syntax

For Cursor, use the corresponding extensions directory if it differs from ~/.vscode/extensions (for example under ~/.cursor/extensions).

Reload the window (Developer: Reload Window from the Command Palette).

Verify

Open any .cam file. The status bar should show Cambrian. If not:

  1. Command Palette → Change Language Mode
  2. Choose Cambrian

Or add a workspace association in .vscode/settings.json:

{
  "files.associations": {
    "*.cam": "cambrian"
  }
}

What you get

  • Highlighting for keywords (entity, routes, in, return, pure, fn, let, match, test, …), types, and comments
  • Bracket matching and comment toggle (Cmd+/ / Ctrl+/)
  • Automatic .cam → Cambrian language mode

Other editors

There is no separate plugin for every editor. Practical options:

  • Point the editor at the TextMate grammar cambrian-syntax/syntaxes/cambrian-clean.tmLanguage.json if it supports TextMate / tmLanguage bundles.
  • Associate *.cam with Rust or similar C-family highlighting as a fallback; braces, let, and type annotations read reasonably well.

Next steps

Return to the Quick Start or jump into the Language Guide.