Skip to content

Editor & Neovim

A real Neovim inside Empryo's terminal UI with your config, plugins and language servers. The agent reads, edits and navigates code in the same editor.

Tools4 minutes to read
Copy & share
On this page9 sections

Empryo's terminal UI can show a real Neovim next to the chat. It can use your own Neovim config, plugins and language servers. You and the agent work in the same editor: you watch its edits land, and it can see where your cursor is and what you've selected.

The editor panel is part of the terminal UI. It needs Neovim, either installed on your system or through the `neovim` addon (empryo addon install neovim). Without Neovim, the editor commands are hidden.

Open the editorLink to this section

Key or commandWhat it does
Ctrl+EShow or hide the editor panel
/editorEditor menu: toggle, open a file, settings, split
/editor open <file>Open a file in the editor
/editor settingsChoose which editor and language-server features the agent may use
/editor splitCycle the editor/chat width: 40, 50, 60 or 70% for the editor
/vim-hintsShow common Vim key hints in the editor footer

Choose a Neovim configLink to this section

Pick a config mode with /nvim-config. The command is listed when Neovim comes from the neovim addon.

ModeWhat you get
defaultEmpryo's built-in config, which installs language servers for your project automatically
userYour own config from ~/.config/nvim
noneA bare Neovim with no plugins and no language servers

What the agent can do in the editorLink to this section

The agent uses the editor through a tool called editor. You don't call it yourself; this is what it can do.

ReadLink to this section

ActionParametersWhat it does
readstartLine?, endLine?, file?Read the buffer, a line range, or another file
cursor_contextnoneCurrent file, cursor position and selection
buffersnoneList open buffers
terminal_outputcount?Read recent terminal output (default: last 100 lines)

EditLink to this section

ActionParametersWhat it does
editstartLine, endLine, replacement, file?Replace lines in the buffer
selectstartLine, endLineSelect a range of lines
yanktext?, register?Put text in a register (default: system clipboard)
highlightstartLine, endLineHighlight a range of lines so you can see what it means

Move aroundLink to this section

ActionParametersWhat it does
navigatefile?, line?, col?, search?Open a file, jump to a line, or search
goto_cursorline, col?Move the cursor

Language-server featuresLink to this section

ActionParametersWhat it does
diagnosticsnoneErrors and warnings in the current buffer
symbolsnoneFunctions, classes and variables in the file
hoverline, colType and documentation at a position
referencesline, colEvery use of the symbol at a position
definitionline, col, jump?Where the symbol is defined
actionsline, col?, apply?Available quick fixes and refactorings
quickfixnoneApply the available quick fixes in the buffer
renameline, col, newNameRename a symbol across the project
formatstartLine?, endLine?Format the buffer or a range

Choose what the agent may useLink to this section

/editor settings lets you turn each feature on or off. All are on by default.

SettingWhat it controls
LSP DiagnosticsErrors and warnings
Document SymbolsFunctions, classes, variables
Hover / Type InfoType info at a position
Find ReferencesEvery use of a symbol
Go to DefinitionJump to where a symbol is defined
Code ActionsQuick fixes and refactorings
LSP RenameProject-wide rename
LSP StatusWhich language servers are running
LSP FormatFormatting
Editor ContextShare your open file, cursor and selection with the agent
Sync on EditJump to files the agent edits (off: only refresh the current buffer)

You can also decide when the agent may use the editor at all:

ModeBehavior
AlwaysThe agent can always use the editor tool (default)
NeverThe editor tool is turned off
When editor openOnly while the editor panel is visible

Language servers without the editorLink to this section

The agent's code navigation doesn't depend on the editor panel. When the editor is open, requests go through the language servers Neovim is already running. When it's closed, Empryo starts the servers itself. Both give the agent definitions, references, hover, diagnostics, rename, code actions, call and type hierarchy, and formatting.

See LSP servers to install or manage servers.