All posts
Tooling4 min read

Editing Chuchu in VS Code

Highlighting, snippets, completions and scope-aware navigation work without a compiler. Point the extension at Cheeku when you are ready to build.

The Chuchu Language extension is designed so that editing works on its own. You can open a .chuchu file, read it with proper highlighting and navigate its names before you have built Cheeku at all. The compiler is only needed when you ask for a build.

Editing without a compiler

  • Syntax highlighting and snippets for .chuchu files.
  • Completions, hover documentation and function signatures.
  • Lexical and delimiter diagnostics as you type.
  • Outline view for functions and declarations.

Navigation that understands scope

Jump to definition and find references understand local scope and shadowed variables, so a name inside a block resolves to the declaration that actually applies there. That is more useful than a plain text search, especially once a function has several short-lived locals.

Build from the editor

When Cheeku is available, point the extension at the executable. The build commands compile normal or debug programs and surface compiler errors in the Problems panel. Full syntax and type checking happen during a build; the editor's live diagnostics are lexical.

settings.jsonJSON
{
  "chuchu.compilerPath": "/path/to/cheeku"
}

The extension requires VS Code 1.96 or newer and is installed from a VSIX built from its repository. The setup guide walks through building the extension, installing the VSIX and connecting your local Cheeku binary. Native debugging uses a separate debugger extension.

Read it. Then run it.

Install Cheeku, compile the example and see the native binary for yourself.