VS Code extension
The official extension gives .lucc files syntax highlighting, snippets, one-key run, and syntax/import validation. It is published on the Marketplace by luca-ecosystem, and this page mirrors what you see on its Marketplace listing. Luca Code is a small general-purpose language with exact decimal math (10 / 4 is 2.5), plain-language errors, and a dependency-free Rust reference interpreter — this extension is the editor front end: write a .lucc file, press Run, and see output in the integrated terminal or diagnostics in the editor.
1. Install the extension
- Install the
lucaCLI first: install, then checkluca --versionworks in a terminal. - In VS Code: Extensions view (⇧⌘X) → search "Luca Code" → click Install, or install directly from the Marketplace listing.
- Open any
.luccfile — keywords should be highlighted.
Requirements: the extension drives the luca CLI, so install it first (a Rust-based build; no account needed). On macOS or Linux:
bash <(curl -fsSL https://raw.githubusercontent.com/LucaEcosystem/luca-code/main/scripts/install.sh)
luca --version # prints: luca 1.0.4 Beta
On Windows, use git clone --depth 1 https://github.com/LucaEcosystem/luca-code.git, then .\scripts\install.ps1 in PowerShell. Full per-OS instructions and PATH fixes: install guide.
2. Use it
- Luca: New Luca File (⇧⌘P → type "Luca") opens a starter program.
- Luca: Run Luca File (same menu, or the run button in the editor title bar when a
.luccfile is open) saves and runs the file. By default it runs in the integrated terminal (a shared "Luca" terminal), so output appears where you already look — and programs usingaskcan read your typing. Setluca.runInTerminalto off to run in the Output panel on the Luca Code channel instead, which turnsError at line:column:andWarning at line:column:output into clickable squiggles in the editor. - Luca: Check Luca File (same menu, or the check button in the editor title bar) saves the file and runs
luca check --format json. Syntax errors and missing or circular imports appear as squiggles without executing the program. It never evaluates expressions or touches the filesystem, so type mismatches on computed values, bad runtime arity, division by zero, andaskconversion errors still surface only when you run. - Diagnostics — error and warning lines from run or check map to inline editor markers, with the first error popping up at its location.
- Snippets — type
try,error,raise,func,if,for,while,ask,import, orprintand press Tab. - Syntax highlighting for
.luccfiles — keywords, strings, interpolation, comments, numbers.
Settings
| Setting | Default | What it does |
|---|---|---|
luca.cliPath | luca (from PATH) | Absolute path to the luca binary when it is not on your PATH |
luca.runInTerminal | true | Run in the integrated terminal; when off, run in the Output > Luca Code channel with clickable diagnostics |
What the extension does not do
- Check is syntax + import validation only.
luca checkdoes not statically type-check expressions, so errors such as assigning astrto anintvariable surface only when you run. - The CLI must be installed. The extension is a front end for the
lucabinary; it does not bundle an interpreter. - No language server. Highlighting is TextMate-based, and diagnostics come from running or checking the file, not from live incremental analysis.
- Source nesting is capped at 32 levels and function recursion at 64 frames. Deeper code reports a normal diagnostic rather than crashing; see known limitations.
3. If the extension cannot find Luca
You will see: "the 'luca' CLI was not found." Fix it one of two ways:
- Put
lucaon yourPATH(the installer does this; see troubleshooting), restart VS Code, and run again, or - Set the
luca.cliPathsetting to the absolute path of the binary (Settings → search "Luca Code", or run Preferences: Open User Settings (JSON) and add"luca.cliPath": "/Users/you/.cargo/bin/luca").
4. Upgrade / uninstall
- Upgrade the extension: VS Code updates Marketplace extensions automatically, or reinstall from the Marketplace listing to force the newest version. (Packaged by hand? The extension source lives in
editors/vscode/in the repository; current extension version is 1.0.4.) - Upgrade the CLI: re-run the installer (install §3).
- Uninstall the extension: Extensions view → Luca Code → Uninstall. Uninstall the CLI: install §4.
Next steps
Learning the language: the guided tour (twelve short chapters with runnable snippets and their real output). Otherwise, back to the first program. The language reference and standard library reference hold the complete rule set.