VSCode Extension
The extension evaluates code on a resonon server and bundles the language server. A walk-through is Live Coding Workflow.
Key bindings
Section titled “Key bindings”| Key | Command | Active when |
|---|---|---|
Cmd+Enter (Ctrl+Enter on Windows and Linux) | Evaluate Selection or Line | A resonon editor has focus |
F5 | Play / Pause | A resonon file is open |
Shift+F5 | Stop. Three in a row cut everything still sounding | A resonon file is open |
Ctrl+Shift+F5 | Reset | A resonon file is open |
What each transport command does: Transport.
Commands
Section titled “Commands”Every command is in the command palette, prefixed RESONON:.
Evaluation and transport
Section titled “Evaluation and transport”| Command | What it does |
|---|---|
| Evaluate Selection or Line | Runs the selection, or the line the cursor is on. Connects first if needed. |
| Evaluate File | Runs the whole file in the live session, adding to what it holds. It is not a file run: nothing exits, and the session stays. |
| Play / Pause | PLAY when stopped or paused, PAUSE when playing. |
| Stop | STOP. |
| Reset | RESET: discards the session. |
Both evaluate commands are also in the editor’s title bar.
Servers
Section titled “Servers”| Command | What it does |
|---|---|
| Connect to Server | Connects to the active server; with several known, offers a list; with none known, starts a local one. |
| Disconnect from Server | Disconnects from the active server. |
| Start Server | Starts a local server and connects to it. |
| Stop Server | Stops the active server. |
| Add Server… | Adds a server by host and port. |
| Refresh Servers | Refreshes the Servers view. |
| Connect to Server… | Connects to the server clicked in the Servers view. |
| Disconnect | Disconnects from the server clicked in the Servers view. |
| Set as Active Server | Makes a connected server the one evaluations go to. |
| Stop Server Process | Stops a server this window started. |
| Remove Server | Removes a server added by hand. |
| Set Display Name | Sets the name other clients see for you. |
| Toggle Output Filter (Own / All) | Shows only your own output, or every client’s. |
Views, plugins and preferences
Section titled “Views, plugins and preferences”| Command | What it does |
|---|---|
| Open Console | Server output, in a terminal. |
| Open Mixer | Track levels, in a terminal. |
| Open Routing | Audio and MIDI routing, in a terminal. |
| Open Scope | An oscilloscope on the output, in a terminal. |
| Open MIDI Monitor | All MIDI on this machine, in a terminal. Needs no server. |
| Open Visuals | The native visuals window of the active server. |
| Rescan Plugins | Scans the plugin folders for new and changed plugins. |
| Rescan Plugins (Full) | Opens every plugin again, including those skipped after a crash. |
| Retry Skipped Plugins… | Opens chosen skipped plugins again. |
| Open Preferences | Opens ~/.resonon/preferences.toml. |
| Restart Language Server | Restarts the language server of the current file. |
The terminal views are the ones resonon view opens; see the
CLI reference.
Sidebar
Section titled “Sidebar”The resonon icon in the activity bar opens four views:
| View | Contents |
|---|---|
| Servers | Every server found on the network, started from this window, or added by hand. Click to connect. |
| Server Controls | Start and stop the server, reset, preferences, plugin rescan, add a server, connect, disconnect, display name. |
| Transport | Play / pause, stop, evaluate selection or line, evaluate file. |
| Views | Console, mixer, routing, MIDI monitor, scope, visuals. |
Settings
Section titled “Settings”| Setting | Default | What it is |
|---|---|---|
resonon.server.path | "" | The resonon binary. Empty searches PATH. A path into one version (~/.resonon/versions/<v>/bin/resonon) bypasses the launcher, so projects’ pinned versions no longer apply. |
resonon.server.port | 5555 | Port of a server the extension starts. |
resonon.server.password | "" | Password of a server the extension starts. |
resonon.client.name | "" | Your display name. Empty uses your system user name. |
resonon.lsp.enabled | true | The language features. |
resonon.lsp.path | "" | The resonon-lsp binary. Empty searches PATH. A path into one version gives every project that version. |
resonon.audio.multicore | false | Render audio on several CPU cores, in a server the extension starts. |
resonon.audio.pluginModStride | 16 | Samples between automation points sent to CLAP and VST3 plugins, in a server the extension starts. 1 is every sample. |
resonon.plugins.autoScan | true | Keep the plugin database up to date automatically. |
Status bar
Section titled “Status bar”The RESONON item shows the connection:
| Text | State | Click |
|---|---|---|
$(circle-slash) RESONON | Disconnected | Connect |
$(sync~spin) RESONON | Connecting or reconnecting | — |
$(circle-filled) RESONON: studio (as Alice) $(pulse) 12% | Connected, with the server’s name, your display name and the audio CPU load | Server menu |
The LSP item shows the language server of the current file, its version and, while it runs,
the mode, for example $(check) LSP 0.14.0 · Live:
| Text | State |
|---|---|
$(sync~spin) LSP 0.14.0 | Starting |
$(check) LSP 0.14.0 · File | Running, in File Mode |
$(check) LSP 0.14.0 · Live | Running, in Live Mode |
$(circle-slash) LSP 0.14.0 | Stopped |
$(error) LSP 0.14.0 | Failed. Click to retry |
Language features
Section titled “Language features”The language server works on .non files and on resonon.toml.
| Feature | How | What it does |
|---|---|---|
| Hover | Point at a name | The type, signature and documentation of a variable, function, class, method or module member. |
| Completion | Type, or Ctrl+Space | Keywords and names; methods after a .; parameter names in .parameter("…") and .set_parameter("…"); effect slot names in .effect("…"); module paths in use "…" and names in its { … }. |
| Signature help | Type ( or , | The parameters of the function being called, including module functions (gfx.Visual() and DSP builtins inside a dsp block. |
| Go to Definition | Cmd+Click or F12 | Jumps to where a name is defined, in the file, a module or the standard library. On the path string of gfx.load_shader(...) or load_file(...) it opens that file. |
| Find All References | Shift+F12 | Every use of the name in the current file. |
| Rename Symbol | F2 | Renames the name in the current file. Refused on a keyword, and for a new name that is not an identifier or is a keyword. |
| Format Document | Shift+Alt+F | Re-indents the whole file; see below. |
| Inlay hints | — | name: before each positional argument of a call to your own function, class or method. |
| Outline | Outline view, breadcrumbs | Functions, classes and their methods, dsp declarations, let bindings and uses. |
| Diagnostics | — | Underlines errors; see below. |
| Quick fixes | Cmd+. (Ctrl+.) | See below. |
Completion of values, effect slots and parameters reads the state of the session after your last evaluation; in File Mode, it offers only names in the file.
Live Mode and File Mode
Section titled “Live Mode and File Mode”The editor reads code in one of two modes, and switches between them on its own. The status bar shows which.
| Mode | When | What the editor reads |
|---|---|---|
| File Mode (offline) | Nothing has been evaluated yet, and again after RESET, or when the server stops or crashes | The file, as one program run top to bottom |
| Live Mode (online) | From the first evaluation, in any file | The session: the file is a scratchpad of selections, each evaluated on its own |
Each evaluation of any file switches every open file to Live Mode, because definitions belong to the whole session. A server that crashed is noticed at your next edit. Rename and Find All References work on the current file, match methods by name only, and skip strings and comments.
Diagnostics
Section titled “Diagnostics”Parse errors, undefined names and wrong argument counts are underlined as you type; runtime errors are underlined after you evaluate, and clear at your next evaluation. Both are in the Problems panel.
A name defined twice at the top level of a file, or defined and also imported with use, is marked
only in File Mode. In Live Mode, evaluating a new definition further down
is how you change one. A name repeated inside one definition, such as two methods m in a class, or
inside a module the file imports, is marked in both modes: either is always evaluated whole.
Every kind and its severity: Errors & Warnings.
In resonon.toml, each [local] kits entry is followed by a note: in this project,
on this machine, travels anyway or missing.
Formatting
Section titled “Formatting”| Rule | |
|---|---|
| Indentation | One level per open bracket, in the editor’s tab size, with spaces or a tab as the editor is set |
| Continuation | A line starting with . is indented one more level |
| Blank lines | At most 2 in a row; none at the end |
| Trailing whitespace | Removed |
| End of file | Exactly one newline |
| Line endings | CRLF kept if most lines use it |
| Unchanged | Line breaks, spacing inside a line, comments, and lines that start inside a string or /* */ comment |
A file that does not parse is left unchanged. resonon.toml is not formatted.
Quick fixes
Section titled “Quick fixes”| Where | Fix |
|---|---|
| An undefined name | Did you mean X? — the closest defined name, including DSP builtins inside a dsp block |
A Kit("…") whose kit is outside the project | Copy ‘k’ into this project; List ‘k’ under [local] in resonon.toml |
A [local] kits entry | Copy ‘k’ into this project (for a kit on this machine, outside the project); Remove ‘k’ from resonon.toml |
A misspelled key in resonon.toml | Rename to key |
| A plugin that was skipped after a crash | Retry plugin — opens the plugin again |
Versions
Section titled “Versions”Each project gets its own language server, running the version its resonon.toml pins. Files outside
a project share one running your default version. If a project pins a version you don’t have, a
notification offers to install it.
The server you evaluate on runs one version: that of the project it was started from. Code from a project that needs a newer version is refused, with an offer to restart the server for that project when that version is installed. Code from a project that targets an older version runs, with a warning the first time in a session.