Eta Language — VS Code Extension

Language support for the Eta programming language — a Scheme-inspired language with logic programming, automatic differentiation, and optional PyTorch bindings.


Features

Syntax Highlighting

Syntax & side panels

Rich TextMate grammar covering core special forms, binding constructs, control flow, module system, macros, records, exception handling, logic/unification, AD/tape operations, CLP constraints, I/O, and common builtins.

Language Server (LSP)

LSP configuration

Powered by the native eta_lsp binary:

Debugger (DAP)

Debug session

Full debug adapter via eta_dap:

Heap Inspector

Heap inspector

WebView panel showing live heap state when the VM is paused:

GC Roots Tree View

Environment & GC roots inspector

Dedicated tree view in the Debug sidebar showing GC root categories. Expand any root to see individual objects; click to open in the Heap Inspector.

Disassembly View

Full disassembly

Side-panel disassembly

View the bytecode disassembly of the current function or all functions. The current PC line is highlighted.

Code Snippets

~20 snippets for common forms: module, defun, define, lambda, let, let*, letrec, if, cond, case, when, unless, define-record-type, import, catch, raise, define-syntax, do.


Requirements

Install Eta from a release bundle — the installer automatically configures PATH and installs this extension.


Extension Settings

SettingTypeDefaultDescription
eta.modulePathstring""Colon/semicolon-separated directories to search for Eta modules (ETA_MODULE_PATH). Used by both LSP and DAP servers. Falls back to the environment variable.
eta.lsp.serverPathstring""Path to the eta_lsp executable. If empty, searches bundled binary, workspace build output, then PATH.
eta.lsp.enabledbooleantrueEnable the Eta Language Server for diagnostics and IDE features.
eta.lsp.modulePathstring""Deprecated — use eta.modulePath instead.
eta.dap.executablePathstring""Path to the eta_dap executable or its parent directory.
eta.test.runnerPathstring""Path to eta_test or its parent directory. If empty, the extension searches next to resolved LSP/DAP binaries, workspace build output, then PATH.
eta.binaries.searchPathsstring[][]Additional directories or explicit executable paths searched for Eta binaries. Supports ${workspaceFolder}.
eta.debug.autoShowHeapbooleantrueAutomatically open the Heap Inspector when a debug session starts.

Quick Start

  1. Install Eta from a release bundle (or build from source).
  2. Open a .eta file in VS Code — syntax highlighting and diagnostics activate automatically.
  3. Press F5 to run/debug the current file.
  4. Set breakpoints by clicking the gutter, then use stepping controls.
  5. Open the Heap Inspector via the Command Palette: Eta: Show Heap Inspector.

Commands

CommandDescription
Eta: Run Eta FileLaunch the active .eta file in the debugger
Eta: Show Heap InspectorOpen the Heap Inspector panel
Eta: Show DisassemblyShow bytecode for the current function
Eta: Show Disassembly (All Functions)Show bytecode for all functions
Eta: Refresh GC RootsManually refresh the GC Roots tree

Known Limitations


Building from Source

cd editors/vscode
npm ci
npm run bundle         # esbuild production bundle
npm run package        # creates .vsix

Or via CMake:

cmake --build build --target eta_editor_package

License

MIT