Execute Lua
nvim_exec_luaRun Lua in Neovim to control buffers, windows, diagnostics, LSP, and terminals, returning results as JSON. Use return for values and ... for arguments to access the full Neovim Lua API.
Instructions
Run Lua in Neovim via nvim_exec_lua and return the result as JSON. The code is a function body, so use return to produce a value and reference call arguments via .... This is the most powerful tool: anything the Neovim Lua API can do is reachable here.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | Optional arguments, available in the Lua code via `...`. | |
| code | Yes | Lua code to execute. Use `return` to yield a value. |