Vader — VS Code extension
What it gives you:
- Syntax highlighting (
.vd) — works everywhere, no dependencies.
- Language Server — real-time parse and type errors, reusing the
compiler (
vader lsp). Requires the vader binary and an npm install.
- Snippets —
pfn, fn, struct, interface, enum, match, iferr,
for…, test, usecase, handler; HTTP router (router, route,
handlerfn, newrouter, serve); and stdlib starters (httpserver,
dbquery, jsonbuild). Type a prefix and press Tab.
- Stdlib completion with auto-import — type
db., http., json. or
mem. to complete the built-in functions; accepting one inserts the matching
import "std/…" automatically if it's missing.
1) Syntax highlighting (no setup)
Highlights comments, keywords, types (int float bool string error chan map),
strings, numbers, function names, and operators (<-, .., ->…). Plus Ctrl+/
and auto-closing of { [ ( ".
It works as soon as the extension loads — see "Running" below.
2) Language Server (real-time errors)
The server is the compiler itself: vader lsp speaks the Language Server Protocol
over stdio and publishes diagnostics with line:column (the same ones as vader check).
The client here only launches the process — no editor-side reimplementation of analysis.
Install the client dependencies (once):
cd editors/vscode
npm install
⚠️ WSL: vader is a Linux binary
The Vader toolchain is built on WSL (Linux ELF), so VS Code on Windows
can't run vader directly. Options, from best to simplest:
Running (dev mode)
- Open the
editors/vscode folder in VS Code (in the right context — see above).
npm install (only if you want the language server).
- Press
F5 → opens a window with the extension loaded.
- Open a
.vd file (e.g. examples/shapes.vd). Highlighting appears immediately; if
the server is on, errors are underlined as you type.
Or install it locally by copying the folder to ~/.vscode/extensions/vader-0.5.0 and
reopening VS Code.
Settings
| Setting |
Default |
What it does |
vader.serverPath |
vader |
Path to the executable used as vader lsp. |
vader.enableLanguageServer |
true |
Enables/disables real-time diagnostics. |
| |