A Neovim plugin that provides a Lua REPL (Read-Eval-Print Loop) environment designed to evaluate Lua code, including Neovim-specific Lua functions. This allows you to interactively test and execute Lua code, including Neovim's API functions, inside Neovim.
This plugin was created for personal use and is not particularly optimized for general usability or convenience. It serves as a basic REPL within Neovim to test Lua code interactively.
demo.mp4
- Interactive Lua REPL: Write, execute, and evaluate Lua code directly within Neovim.
- Neovim-Specific API Access: Evaluate Lua code that uses Neovim's built-in functions and APIs, such as
vim.api
,vim.fn
, andvim.inspect
.
lazy.nvim:
{
'goropikari/lua-repl.nvim',
config = true,
cmd = { 'LuaREPL' },
},
:LuaREPL
: Toggle the Lua REPL interface, opening the prompt windows.
<Ctrl-s>
: Execute the Lua code in the prompt buffer<Ctrl-c>
: Close the REPL interface<Ctrl-l>
: Clear REPL.
- Open the Lua REPL interface with
:LuaREPL
. - Write your Lua code. You can use Neovim-specific Lua functions.
- Press
<Ctrl-s>
to execute the code. - Press
<Ctrl-c>
to close the REPL when done.
This plugin is licensed under the MIT License.