Lua Repl

This is a module creates in a buffer an interactive Lua REPL using Textadept's Lua State. This can be a useful substitute for Textadept's command entry.

Download

Download

Install

Save the script below to _USERHOME/modules/lua/repl.lua and add the following to your _USERHOME/init.lua:

events.connect(events.LEXER_LOADED, function(lexer)
  if lexer == 'lua' then require('lua.repl') end
end)

Usage

From a Lua buffer select "Tools > Lua REPL" to open the REPL. Typing the Enter key on any line evaluates that line, unless that line is a continuation line. In that case, when finished, select the lines to evaluate and type Enter to evaluate the entire chunk.

Lines may be optionally prefixed with '=' (similar to the Lua prompt) to print a result.


Edited on Wednesday, September 12th 2018 at 12:43 AM.