README (1838B)
1 # Månen 2 3 Fancy Lua REPl! Featuring support for Lua 5.1-5.4, LuaJIT, and more! 4 5 [](https://asciinema.org/a/BRxHezCombw1POErfztrvFeHk) 6 7 ## Features 8 9 * Syntax highlighting 10 * Syntax checking 11 * Formatted table outputs 12 * Saved REPL history 13 * Basic autocomplete 14 15 ## Running 16 17 Månen has the following feature flags: 18 * `vendored` - Compile and embed Lua into the executable 19 * `lua51` - `lua54` - Use Lua 5.1-5.4 for the embedded runtime 20 * `luajit(52)` - Use LuaJIT(5.2 compatibility) for the embedded runtime 21 22 ### Examples 23 24 ```bash 25 cargo run # Uses vendored Lua 5.4 by default 26 cargo run --no-default-features lua52,vendored # Uses vendored Lua 5.2 27 cargo run --no-default-features lua53,vendored # Uses system Lua 5.3 28 ``` 29 30 ## Additional runtimes 31 32 Månen can support any Lua runtime that has the following APIs 33 * `loadstring` / `load` 34 * `io.stdin` 35 * `io.write` 36 * `io.flush` 37 38 If you want state-preserving cancellation, `debug.sethook` is required. 39 40 ## Configuration file 41 42 Configuration can be specified at `$XDG_CONFIG_HOME/manen/config.lua` or `$HOME/.config/manen/config.lua`. 43 44 ```lua 45 -- default config.lua 46 47 -- embedded - Use the embedded Lua interpreter as specified in feature flags 48 -- system - Use a foreign runtime that meets the requirements in additional runtimes 49 -- If this option is specified, system_lua must be specified 50 manen.executor = 'embedded' 51 52 -- **full** path to Lua executable 53 manen.system_lua = nil 54 55 -- inspect - Use Lua-like table printing 56 -- address - Print addresses of tables like the original Lua REPL 57 -- comfytable - Use https://github.com/nukesor/comfy-table for table printing 58 manen.table_format = 'inspect' 59 60 -- size of history in terms of lines stored 61 manen.history_size = 256 62 63 -- if the output should be colored 64 manen.color_output = true 65 ```