Syntax highlighting and one-click build/run commands for the Nexa Agent-Native Programming Language.
Full support for Nexa v2.2.1 syntax:
- Declarations:
agent,tool,flow,protocol,test,type,struct,enum,trait,impl,fn,job,server,db,auth,kv - Harness six-tuple (v2.0+):
autoloop,with_context,try_agent,catch_correction,snapshot,restore,fork,merge,verify,satisfies,reflect,unharnessed,context_policy,context - Lifecycle hooks:
before_step,after_step,on_error,before_tool,after_tool - Actor model:
spawn,pass,await,receive,channel,parallel,race - Control flow:
if,else,for,each,in,while,match,intent,semantic_if,loop,until - DAG operators:
>>,|>>,||,&>>,&&,??,|> - Error propagation (v1.2+):
?,otherwise,defer - Pattern matching (v1.3.7+):
let, destructuring patterns - ADT (v1.3+):
struct,enum,trait,impl,Option,Result - Config (v2.1+):
use config,include - @tool annotation (v2.0+): zero-cost tool binding
- Secrets (
.nxsfiles):configblocks,BASE_URL,API_KEY
| Command | Shortcut | Description |
|---|---|---|
| Nexa: Build | Ctrl+Shift+B |
Compile .nx to Python (nexa build) |
| Nexa: Run | F5 |
Build and execute (nexa run) |
| Nexa: Harness Check | — | Run Harness Validator (nexa harness-check --harness <mode>) |
| Nexa: Validate | — | Type-check and lint (nexa validate) |
Commands are accessible via:
- Command Palette (
Ctrl+Shift+P→ "Nexa: ...") - Editor title bar buttons (Build ▷, Run ▶)
- Right-click context menu
- Keyboard shortcuts
Output is streamed to the Nexa Output Channel.
code --install-extension nexa-lang-0.1.0.vsixOr in VSCode: Extensions panel → ⋯ → "Install from VSIX..." → select nexa-lang-0.1.0.vsix.
The extension requires the nexa CLI to be installed and on your PATH:
pip install nexa-langIf nexa is not on PATH, set the full path in VSCode Settings → nexa.executable.
| Setting | Default | Description |
|---|---|---|
nexa.executable |
nexa |
Path to the nexa CLI (use python -m src.cli if running from source) |
nexa.harnessMode |
warn |
Default Harness validation mode: off, warn, or strict |
nexa.proxyUrl |
"" |
HTTPS proxy URL for agents needing network access (e.g. http://127.0.0.1:7897) |
- Open a
.nxfile in VSCode - Press
Ctrl+Shift+Bto build, orF5to run - View output in the Nexa Output Channel (View → Output → select "Nexa")
agent Researcher uses web_search {
model: "deepseek/deepseek-chat",
prompt: "Research the topic."
}
flow main {
result = "quantum computing" >> Researcher;
print(result);
}
Press F5 → extension runs nexa run main.nx → output streamed to channel.
| Extension | Language ID | Description |
|---|---|---|
.nx |
nexa |
Nexa source files |
.nxlib |
nexa |
Nexa library files |
.nxs |
nexa-secrets |
Nexa secrets/config files |
AGPL-3.0 — see LICENSE.