All Projects → ii14 → nrepl.nvim

ii14 / nrepl.nvim

Licence: LGPL-3.0 license
Neovim REPL for lua and vim script

Programming Languages

lua
6591 projects
Vim Script
2826 projects

Projects that are alternatives of or similar to nrepl.nvim

Iron.nvim
Interactive Repl Over Neovim
Stars: ✭ 265 (+546.34%)
Mutual labels:  repl, nvim
dotfiles
Salonia Matteo's dotfiles (GNU/Linux configuration)
Stars: ✭ 19 (-53.66%)
Mutual labels:  nvim
maverick
Web IDE and REPL for the Ink programming language, written in pure Ink on a self-hosted compiler toolchain
Stars: ✭ 26 (-36.59%)
Mutual labels:  repl
angr.vim
A pleasant, mild, dark (n)vim theme.
Stars: ✭ 53 (+29.27%)
Mutual labels:  nvim
vim-lighthaus
A Lighthaus theme for (n)vim, vim-airline and lightline
Stars: ✭ 33 (-19.51%)
Mutual labels:  nvim
Tutkain
A Sublime Text package for interactive Clojure development
Stars: ✭ 62 (+51.22%)
Mutual labels:  repl
duct-figwheel-component
A component for running Figwheel
Stars: ✭ 18 (-56.1%)
Mutual labels:  repl
nedb-repl
The command-line tool for NeDB
Stars: ✭ 19 (-53.66%)
Mutual labels:  repl
nvim-metals
A Metals plugin for Neovim
Stars: ✭ 265 (+546.34%)
Mutual labels:  nvim
slacker
Slacker - Easy access to the Slack API and admin of workspaces/teams.
Stars: ✭ 14 (-65.85%)
Mutual labels:  repl
csharp
Run c# code from the command line, like python or javascript
Stars: ✭ 22 (-46.34%)
Mutual labels:  repl
ipld-explorer-cli
🔎 Explore the IPLD directed acyclic graph with your keyboard
Stars: ✭ 22 (-46.34%)
Mutual labels:  repl
irb
interactive Ruby
Stars: ✭ 243 (+492.68%)
Mutual labels:  repl
substrata.nvim
A cold, dark color scheme for Neovim
Stars: ✭ 89 (+117.07%)
Mutual labels:  nvim
fancyline
Readline-esque library with fancy features
Stars: ✭ 72 (+75.61%)
Mutual labels:  repl
dotfiles
💾 personal configuration files
Stars: ✭ 42 (+2.44%)
Mutual labels:  nvim
kosmikoa.nvim
A dark color scheme for Neovim with support for LSP, Treesitter. This mirror is deprecated. Use the repo at https://sr.ht/~novakane/kosmikoa.nvim/
Stars: ✭ 23 (-43.9%)
Mutual labels:  nvim
vim-colors-sketching
A minimal light colorscheme for Vim/Neovim
Stars: ✭ 21 (-48.78%)
Mutual labels:  nvim
Workshop-GraphQL
A GraphQL Server made for the workshop
Stars: ✭ 22 (-46.34%)
Mutual labels:  repl
node-keyboard
A REPL where music is simply streams of input in node (using soundfonts). Supports optional MIDI input and Rx.
Stars: ✭ 50 (+21.95%)
Mutual labels:  repl

neorepl

neovim REPL for lua and vim script

Works best with neovim 0.8

Start a new instance with :Repl.

In insert mode type /h and enter to see available commands.

demo


NOTE: If you're using an auto-completion plugin like nvim-cmp, read :h neorepl-using-with-other-plugins!

Starts in lua mode by default. You can switch modes with /vim (short version: /v) for vim script and /lua (short version: /l) for lua. You can also run one-off commands with them, like for example /v ls to list buffers.

Multiple lines can get evaluated when line continuations start with \ as the very first character in the line. If you need to evaluate a line that starts with / or \, add a space before. Note that vim script has line escaping that works just like this. So to break lines in a single expression with vim script, there has to be two backslashes. You can break line in insert mode with CTRL-J.

Lua has its own environment, variables from the REPL won't leak to the global environment. Global environment is referenced in the _G variable. In vim script you can use the s: scope, but it's shared between all REPL instances for now.

You can switch buffer and window context with /b and /w commands, so things like vim.api.nvim_set_current_line() or :s/foo/bar/g will run on the other buffer.

A new REPL instance can be also spawned with require'neorepl'.new{}. Example function that mimics vim's cmdwin or exmode:

vim.keymap.set('n', 'g:', function()
  -- get current buffer and window
  local buf = vim.api.nvim_get_current_buf()
  local win = vim.api.nvim_get_current_win()
  -- create a new split for the repl
  vim.cmd('split')
  -- spawn repl and set the context to our buffer
  require('neorepl').new{
    lang = 'vim',
    buffer = buf,
    window = win,
  }
  -- resize repl window and make it fixed height
  vim.cmd('resize 10 | setl winfixheight')
end)

For the list of available options see :h neorepl-config.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].