Skip to content

VSCode Extension

Use the Resonon VSCode extension for live coding with syntax highlighting, error diagnostics, and integrated output.

Terminal window
resonon server

Output:

[server] Listening on 0.0.0.0:5555
  1. Open a .non file in VSCode (with the Resonon extension installed)
  2. Click “RESONON” in the status bar (bottom-right), or run RESONON: Connect to Server
  3. Status changes to “RESONON” when connected

Select code and press Cmd+Enter (macOS) or Ctrl+Enter (Windows/Linux).

Terminal window
resonon server # Start with defaults (0.0.0.0:5555)
resonon server --server-port 8080 # Custom port
resonon server --server-host 127.0.0.1 # Localhost only (more secure)
OptionDefaultDescription
--server-host0.0.0.0Address to bind to
--server-port5555Port to listen on
-m, --midi-port-Connect to MIDI port on startup
--no-midi-Disable MIDI output
Terminal window
# Server with MIDI
resonon server --midi-port "IAC Driver Bus 1"
# Localhost only (more secure)
resonon server --server-host 127.0.0.1
  1. Open VSCode
  2. Go to Extensions (Cmd+Shift+X)
  3. Search “RESONON”
  4. Install the extension

Configure the extension in VSCode’s settings (Cmd+, or File > Preferences > Settings) under RESONON.

SettingDefaultDescription
resonon.server.path""Path to resonon binary. If empty, searches PATH. Set this if resonon is not on your PATH.
resonon.server.port5555WebSocket server port used when spawning a server from VSCode.
resonon.lsp.enabledtrueEnable LSP language features (hover, completion, go to definition). Disable if you only want evaluation without editor intelligence.
resonon.lsp.path""Path to resonon-lsp binary. If empty, uses the binary bundled with the extension.
resonon.client.name""Display name for multi-client sessions. If empty, uses your system username.

Example settings.json:

{
"resonon.server.path": "/usr/local/bin/resonon",
"resonon.client.name": "Alice"
}

The RESONON sidebar (click the Resonon icon in the activity bar) provides quick access to server management and controls. It contains five views:

ViewDescription
ServersLists all discovered, spawned, and manually added servers. Click to connect or set as active.
Server ControlsStart, stop, and restart the active server.
TransportPlay, pause, stop, and reset controls for the active server.
EvaluateButtons for evaluating the current selection or file.
ViewsOpen Console, Mixer, Routing, and MIDI Monitor panels.

Servers in the list are labeled by origin:

  • Discovered — found automatically via UDP broadcast on the local network
  • Spawned — started from within VSCode using Start Server
  • Manual — added by hand with Add Server…
CommandKeybindingDescription
RESONON: Connect to Server-Auto-connect: uses active server, picks from available, or spawns a new one
RESONON: Disconnect from Server-Disconnect from the active server
RESONON: Connect to Server…-Connect to a specific server (sidebar context menu)
RESONON: Disconnect-Disconnect from a specific server (sidebar context menu)
RESONON: Set as Active Server-Set a connected server as the active target for evaluation
RESONON: Add Server…-Manually add a server by host and port
RESONON: Refresh Servers-Refresh the server list
CommandDescription
RESONON: Start ServerStart a local RESONON server and connect to it
RESONON: Stop ServerStop the active server’s process
RESONON: Restart ServerStop and re-start the active server
CommandKeybindingDescription
RESONON: Play / PauseF5Toggle playback on the active server
RESONON: StopShift+F5Stop playback and reset position
RESONON: ResetCtrl+Shift+F5Reset the server session state
CommandKeybindingDescription
RESONON: Evaluate Selection or LineCmd+Enter / Ctrl+EnterRun selected code or the current line
RESONON: Evaluate File-Run the entire file
CommandDescription
RESONON: Open ConsoleOpen the server console in an integrated terminal
RESONON: Open MixerOpen the mixer view
RESONON: Open RoutingOpen the routing view
RESONON: Open MIDI MonitorOpen the MIDI monitor view
CommandDescription
RESONON: Toggle Output Filter (Own / All)Switch between showing your own output or all clients’ output
RESONON: Set Display NameSet your display name for multi-client sessions

The transport keybindings provide quick control over playback without leaving the editor:

KeyAction
F5Play / Pause — toggles playback
Shift+F5Stop — stops playback and resets position
Ctrl+Shift+F5Reset — resets the entire server session

These keybindings are only active when a .non file is focused. They send the equivalent of PLAY;, PAUSE;, and STOP; commands to the active server.

The status bar shows connection state and server info:

IconStateClick Action
$(circle-slash) RESONONDisconnectedConnect to server
$(sync~spin) RESONONConnecting…
$(circle-filled) RESONON: ServerName (as You)ConnectedOpen server menu
$(sync~spin) RESONONReconnecting…

When connected, the status bar shows the server name and your display name (e.g. RESONON: Studio (as Alice)). Clicking the connected status bar opens a quick-pick menu to disconnect or stop the server.

A second status bar item shows LSP state:

IconState
$(sync~spin) LSPStarting
$(check) LSPRunning
$(circle-slash) LSPStopped
$(error) LSPError (hover for details)

The extension includes a built-in language server that provides editor intelligence for .non files. The LSP starts automatically when you open a Resonon file (unless disabled via resonon.lsp.enabled).

Hover over any symbol to see its type, signature, and documentation. This works for:

  • Variables and their inferred types
  • Functions and their parameter signatures
  • Built-in classes, methods, and constructors
  • Module members (e.g. MyModule.some_function)

Start typing to get completions for keywords and known symbols. Completions also trigger after a dot (.) for method calls — the LSP infers the receiver type and suggests available methods.

Cmd+Click (or F12) on a symbol to jump to its definition. Works for variables, functions, and module members defined in your project.

The LSP parses your code as you type and shows parse errors as red underlines, before you even evaluate. These are distinct from runtime errors returned by the server (see Error Diagnostics).

There are two sources of error diagnostics:

LSP diagnostics — Parse errors detected as you type, before evaluation. These come from the built-in language server and appear immediately as red underlines.

Server diagnostics — Runtime errors returned after evaluating code (Cmd+Enter). These include type errors, undefined variables, and other issues that can only be detected at runtime.

Both types appear as:

  • Red underlines at error locations
  • Hover to see the error message
  • Listed in the Problems panel (Cmd+Shift+M)

Server diagnostics clear when you evaluate new code. LSP diagnostics clear when you fix the parse error.

View server output in VSCode’s Output panel:

  1. Open Output panel (View > Output or Cmd+Shift+U)
  2. Select “RESONON” from the dropdown

In multi-client sessions, use RESONON: Toggle Output Filter (Own / All) to switch between seeing only your own output or output from all connected clients.

Multiple VSCode instances (or other clients) can connect to the same server simultaneously. All clients share the same session state — variables and patterns defined by one client are visible to all others.

Each client is identified by a display name, shown in the status bar and output. Set your name via:

  • The resonon.client.name setting
  • The RESONON: Set Display Name command
  • If unset, your system username is used

When multiple clients are connected, the output panel can get noisy. Use RESONON: Toggle Output Filter to switch between:

  • Own — only output from your evaluations
  • All — output from all connected clients
  • Collaborative live coding — multiple performers connected to one server
  • Teaching — instructor and students share a session
  • Multi-window — connect from multiple VSCode windows to build different parts of a piece

The extension can open dedicated view panels as integrated terminals. Access them from the sidebar’s Views section or via commands.

ViewCommandDescription
ConsoleRESONON: Open ConsoleServer console with output and keyboard shortcut hints
MixerRESONON: Open MixerTrack levels and mixing controls
RoutingRESONON: Open RoutingMIDI and audio routing overview
MIDI MonitorRESONON: Open MIDI MonitorReal-time MIDI message display

Console, Mixer, and Routing connect to the active server. The MIDI Monitor runs standalone and shows all MIDI activity on the system.

The server maintains persistent state across executions:

// First execution
let melody = [C4 E4 G4];
// Second execution (melody still exists)
melody << [B4 A4 G4]; // Works!

State persists until the server restarts. This enables:

  • Incremental development
  • Live coding workflows
  • Interactive debugging

Note: All connected clients share the same session state.

A typical live coding session:

  1. Start the server:

    Terminal window
    resonon server --midi-port "IAC Driver Bus 1"
  2. Open your project in VSCode and connect

  3. Iterate on patterns:

    // Try a beat
    drums << [bd sd bd sd];
    // Press F5 to start playback
    // Tweak it (Cmd+Enter to re-run)
    drums << [bd _ bd sd, ch*8];
  4. Build up layers by running more code — previous definitions persist

  5. Use F5 to toggle playback, Shift+F5 to stop

  1. Verify server is running: resonon server
  2. Check port isn’t in use: lsof -i :5555
  3. Verify firewall allows connections
  4. Try explicit host: resonon server --server-host 127.0.0.1
  1. Ensure code uses PRINT or PUT for output
  2. Check Output panel in VSCode (select “RESONON”)
  3. Verify connection is established (status bar shows connected)
  1. Ensure you’re connected to server
  2. Check Problems panel in VSCode
  3. Try running resonon server with a fresh start
  1. Check if port is already in use
  2. Try a different port: resonon server --server-port 5556
  3. Check for permission issues (binding to 0.0.0.0)
  1. Check the LSP status bar item — if it shows an error, hover for details
  2. Verify resonon.lsp.enabled is true in settings
  3. If using a custom binary, check resonon.lsp.path points to a valid resonon-lsp executable
  4. Check the Output panel — select “RESONON Language Server” for LSP logs
  1. Servers must be on the same local network (UDP broadcast on port 5556)
  2. Firewalls may block UDP broadcast — check your firewall settings
  3. Use Add Server… to manually add a server by host and port as a fallback