Nodus Language Support
VS Code extension for Nodus — a workflow and scripting language for AI-native applications.
Features
- Syntax highlighting for
.nd files — keywords, DSL blocks, string interpolation, integer suffix (42i), both // and # comments
- Code snippets —
fn, workflow, goal, step, tryc, spawn, and more (23 total)
- Diagnostics — syntax and import errors shown as squiggly lines as you type
- Run File — press
Ctrl+Alt+N or click ▶ Nodus in the status bar
- Format File — runs
nodus fmt via right-click or the Command Palette
- Debug — press
Ctrl+Alt+D or F5 to launch the DAP debugger (nodus dap); supports breakpoints and step-through
- Hover docs — hover over any variable or function to see its type or signature
- Go to Definition — press
F12 to jump to where a symbol is defined
- Completions —
Ctrl+Space shows functions, variables, keywords, and stdlib module names
Requirements
Install Nodus:
pip install nodus-lang
Verify: nodus --version should print 4.x.x.
Commands
| Command |
Keybinding |
Description |
| Nodus: Run File |
Ctrl+Alt+N |
Run the current .nd file in a terminal |
| Nodus: Format File |
— |
Format with nodus fmt |
| Nodus: Debug File |
Ctrl+Alt+D |
Launch the DAP debugger |
All commands are also available via right-click on a .nd file and the Command Palette (Ctrl+Shift+P).
Configuration
| Setting |
Default |
Description |
nodus.executablePath |
nodus |
Path to the nodus executable. Use an absolute path if nodus is not on PATH. |
nodus.reuseTerminal |
false |
Reuse the existing Nodus terminal instead of opening a new one each run. |
nodus.lspCommand |
[] |
Override the language server command. Use to point at a specific Python or dev source. |
Custom executable path example
{
"nodus.executablePath": "C:/path/to/nodus.exe"
}
Development: point LSP at dev source
{
"nodus.lspCommand": ["python", "C:/dev/Coding Language/nodus.py", "lsp"]
}
Snippets
Type the prefix and press Tab:
| Prefix |
Description |
fn |
Function definition |
fnr |
Function with return type |
let |
Variable declaration |
workflow |
Workflow DSL block |
goal |
Goal DSL block |
step |
Step definition |
stepafter |
Step with dependency (after) |
stepwith |
Step with retry/timeout options |
import |
import "std:..." as name |
importfrom |
Named import from file |
tryc |
Try/catch block |
trycf |
Try/catch/finally block |
if |
If statement |
ife |
If/else block |
while |
While loop |
whilei |
While loop with integer counter |
fori |
For-in loop |
print |
print() call |
spawn |
Spawn a coroutine |
channel |
Channel producer/consumer pattern |
record |
Record literal |
runwf |
Run a workflow |
check |
Test check helper |
About Nodus
Nodus .nd files are compiled and run by the Nodus VM. The language features:
- First-class functions, closures, coroutines, channels
workflow and goal DSL blocks with step definitions and after dependencies
try/catch/finally, throw, yield, spawn
- String interpolation:
"\(expr)"
- Integer literals:
42i (vs 42 which is float)
- Standard library:
import "std:strings" as strings
See the Nodus documentation for the full language reference.
| |