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 thevaderbinary and annpm 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.ormem.to complete the built-in functions; accepting one inserts the matchingimport "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:
- Recommended — VS Code + Remote-WSL: open the project inside WSL
(
code .from Ubuntu, or "Reopen in WSL"). The extension then runs in the Linux context and can seevader. Set the binary path if it isn't on the PATH:// settings.json "vader.serverPath": "/mnt/c/Users/marco/Documents/workspace/side_projects/vader/target/debug/vader" - Highlighting only: turn the server off and use highlighting alone:
"vader.enableLanguageServer": false - Native Windows build: if you ever build a
vader.exe, pointvader.serverPathat it.
Running (dev mode)
- Open the
editors/vscodefolder 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
.vdfile (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. |