Neovim
The plugin plays a .non file on a resonon server, as the
VSCode extension does, and starts the language server
for it. It needs Neovim 0.12 or later, with resonon and resonon-lsp on your PATH.
Install
Section titled “Install”The plugin is editors/nvim in a checkout of the
resonon repository. With
lazy.nvim:
{ dir = "/path/to/resonon/editors/nvim", ft = "resonon", opts = {},}With any other plugin manager, add editors/nvim to the runtime path. require("resonon").setup()
is needed only to change a default.
| Key | Action | Modes |
|---|---|---|
Ctrl+E | Evaluate the selection, or the line the cursor is on | Normal, visual, select, insert |
Ctrl+Enter, Cmd+Enter | The same, where the terminal tells them apart from Enter | Normal, visual, select, insert |
<LocalLeader>e | The same | Normal, visual |
Ctrl+Shift+Enter, Cmd+Shift+Enter | Run File Live, where the terminal tells them apart from Enter: write changed buffers, then evaluate the whole entry file into the running session, without RESET or setup() | Normal, select, insert |
<LocalLeader>f | The same | Normal |
F5, <LocalLeader>p | Play / Pause | Normal (F5 also select and insert) |
Shift+F5, <LocalLeader>s | Stop | Normal (Shift+F5 also select and insert) |
Ctrl+Shift+F5 | Reset the server (RESET) | Normal, select, insert |
Reset Project has no default key; use :Resonon reset, or give reset_project a key in
keymaps.
Ctrl+E reaches Neovim in every terminal. Ctrl+Enter and Cmd+Enter, the VSCode keys, and their
Shift forms reach it
in kitty, WezTerm, Ghostty and Neovide; in other terminals they are a plain Enter.
The selection stays after it is evaluated, so the same code can be evaluated again. The evaluated lines flash. The first evaluation connects to the server, and starts one in the project when none is listening. What the code prints goes to the output buffer, and an error is shown on the line where it happened.
What each transport action does: Transport.
Commands
Section titled “Commands”| Command | What it does |
|---|---|
:Resonon eval | Evaluates the line the cursor is on, or a range: :'<,'>Resonon eval. |
:Resonon run | Run File Live: writes changed buffers, then evaluates the whole entry file into the running session, without RESET or setup(). |
:Resonon reset | Reset Project: writes changed buffers, then opens the project again from its files: teardown(), RESET, the saved session, then the entry file with setup(). Asks first when the session has changes since the last save, and when tracks were renamed since the code named them. See The entry file’s lifecycle. |
:Resonon play, stop | Transport. play pauses when playing. |
:Resonon output | Shows or hides the output buffer. |
:Resonon view {name} | Opens console, routing, scope or midi_monitor in a terminal split; omit the name to open the main window. See Terminal Views and Use the Mixer. |
:Resonon connect, disconnect | Connects to the configured server, or drops the connection. |
:Resonon server start, stop | Starts or stops a server in the current project. A server the plugin started stops when Neovim exits. |
While you type
Section titled “While you type”The language server starts for each project, from the project’s folder. Some of what it offers shows without being asked for, as in VSCode:
| Feature | When it shows |
|---|---|
| Completion | On a name, and after ., (, ,, " and {; not in a comment. Ctrl+N and Ctrl+P move through it, and Ctrl+Y takes an item. |
| Signature help | Above the cursor while it is inside a call, with the current argument highlighted. |
| Inlay hints | Always. |
With blink.cmp or nvim-cmp installed, completion is left to that plugin; signature help is left to
blink.cmp when its signature is enabled. Hover, go to definition, references, rename, formatting and
code actions are on Neovim’s own keys: K, Ctrl+], grr, grn, gq and gra.
Statusline
Section titled “Statusline”require("resonon").statusline() gives the connection, the CPU load and the session mode (Live or
File):
vim.o.statusline = "%f %m%=%{%v:lua.require'resonon'.statusline()%} "Settings
Section titled “Settings”The defaults:
require("resonon").setup({ cmd = "resonon", lsp = { enabled = true, cmd = "resonon-lsp", autocomplete = true, signature_help = true, inlay_hints = true, }, server = { host = "127.0.0.1", port = 5555, autostart = true, -- start a server in the project when none is listening }, client_name = nil, -- the name other clients see; defaults to your login name audio = { multicore = false }, plugins = { auto_scan = true }, show_all_output = false, -- also show what other clients print flash_ms = 150, -- 0 turns the flash off keymaps = { run_selection_live = { "<C-e>", "<C-CR>", "<D-CR>", "<LocalLeader>e" }, run_file_live = { "<C-S-CR>", "<D-S-CR>", "<LocalLeader>f" }, play_pause = { "<F5>", "<LocalLeader>p" }, stop = { "<S-F5>", "<LocalLeader>s" }, reset = "<C-S-F5>", },})keymaps = false sets no keys, and an action set to false gets none. reset_project has no
default key; set it in keymaps to give Reset Project one. A key with Ctrl or Cmd,
or a function key, is also set in select and insert mode. The flash uses the ResononFlash
highlight group.
Test the window command
Section titled “Test the window command”From the repository root, run the headless regression tests:
nvim --headless -u NONE -l editors/nvim/tests/view.luaThe tests control the connection and process boundaries. They require no server,
project, audio device or desktop. Unnamed :Resonon view connects to the configured
server before requesting its main window. It does not start a server, even when
server.autostart is enabled. Named terminal views keep their existing commands.