Create, use, and remove interactive REPLs in Neovim 0.11.0 or later (nightly recommended).
Works with any REPL, but contains built-in support for aider, bash, ipython, node, nvim, R, sh, utop, and zsh.
Full documentation: here. From within Neovim, type :help repl.
Neovim REPL is a normal Neovim package.
Example configuration with lazy.nvim
Configuration for https://github.com/folke/lazy.nvim
{
"pappasam/nvim-repl",
keys = {
{ "<Leader>c", "<Plug>(ReplSendCell)", mode = "n", desc = "Send Repl Cell" },
{ "<Leader>r", "<Plug>(ReplSendLine)", mode = "n", desc = "Send Repl Line" },
{ "<Leader>r", "<Plug>(ReplSendVisual)", mode = "x", desc = "Send Repl Visual Selection" },
},
}{
"pappasam/nvim-repl",
opts = {
filetype_commands = {
javascript = {cmd = "deno repl", filetype = "javascript"},
},
default = {cmd = "bash", filetype = "bash"},
open_window_default = "vertical split new",
},
keys = {
{ "<Leader>c", "<Plug>(ReplSendCell)", mode = "n", desc = "ReplSendCell" },
{ "<Leader>r", "<Plug>(ReplSendLine)", mode = "n", desc = "ReplSendLine" },
{ "<Leader>r", "<Plug>(ReplSendVisual)", mode = "x", desc = "ReplSendVisual" },
},
}The built-in aider integration overrides aider's --multiline, --notifications, and --notifications-command for a smooth Neovim integration. All other settings default to the user's aider configuration file and environment. To that end, we recommend:
- Use $AIDER_MODEL to specify your preferred model before opening Neovim.
- For other settings, please reference the Author's current aider configuration for inspiration.
If you find yourself in Terminal mode, use <C-\><C-n> instead of <Esc> to return to Normal mode.
Type :help Terminal-mode and :help CTRL-\_CTRL-N for more information.
Sometimes, terminal commands (like aider) can be long. If your tabline is long, you can customize it.