Interactive real-time Neovim scratchpad for embedded Lua engine with live evaluation and output display.
Luapad is an interactive scratchpad plugin for Neovim that provides real-time evaluation of Lua code. It allows developers to write and test Lua snippets directly within Neovim, with output displayed as virtual text in the buffer as they type. It solves the problem of needing to save and reload files to test Lua code, making experimentation and debugging faster and more fluid.
Neovim users who write Lua plugins, configurations, or scripts and want an interactive environment for testing and prototyping code. It's particularly useful for plugin developers and those learning Lua within the Neovim ecosystem.
Developers choose Luapad for its seamless real-time feedback, deep integration with Neovim's Lua engine, and lightweight design focused on interactive coding. Unlike traditional methods, it eliminates the need for file saves and manual execution, providing immediate visual output right in the editor.
Interactive real time neovim scratchpad for embedded lua engine - type and watch!
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Code is evaluated as you type, with output displayed instantly as virtual text in the buffer, as demonstrated in the GIFs, eliminating the need for manual saves and executions.
Runs Lua code in a context with an overwritten `print` function to capture output, preventing interference with Neovim's global scope and allowing safe experimentation.
Extends Neovim's Lua command with intelligent autocompletion and provides commands like `Luapad` and `LuaRun` for interactive scratchpads and script execution in new scopes.
Offers extensive settings via `setup()`, including evaluation triggers, error indicators, preview windows, and custom context tables, enabling tailored workflows.
Includes ready-to-use components for lightline and galaxyline to display evaluation status and messages, enhancing real-time feedback in the editor interface.
Real-time evaluation can cause lag with complex code or high `count_limit` settings, and functions like `nvim_open_win` may create excessive windows due to per-character evaluation.
Explicitly designed for small code chunks and not suitable for big production scripts, as admitted in the README warning, restricting its use in serious development.
Requires Neovim >= v0.8.0 or an additional plugin like FixCursorHold.nvim for older versions, adding installation steps and potential compatibility issues.