This plugins set up a REPL-like environment for developing lua plugins in Nvim.
:Luadev command will open an scratch window which will show output from executing lua code.
Use the folllowing mappings to execute lua code:
||Execute the current line|
||Operator to execute lua code over a movement or text object.|
||Eval identifier under cursor, including
||in insert mode: complete (nested) global table fields|
If the code is a expression, it will be evaluated, and the result shown with
inspect.lua. Otherwise it will be executed as a block of code. A top-level
return will cause the returned value to be inspected. A bare
nil will not
print() is also redirected to the output buffer, but only when executing
code via this plugin.
require'luadev'.print(...) can be used to print to the
buffer from some other context.
tostring()on userdata (done on a local copy)
<Plug>(Luadev-Run)a proper operator
as a flag to copy local values to an env)