Quench.nvim - Interactive Python Development for Neovim
Quench allows you to structure standard Python files (.py) into executable cells, run them interactively, and view rich media output (plots, tables, HTML) in a synchronized browser window.
Key Features
Cell-Based Execution: Define code blocks using #%% delimiters and execute them individually, similar to scientific modes in other IDEs.
Rich Media Output: Automatically renders complex output like Matplotlib plots, Pandas DataFrames, and HTML in a dedicated browser interface when they don't fit in the terminal.
Non-Blocking Async Architecture: Built entirely on asyncio to run kernels and the web server in the background, keeping Neovim responsive during heavy execution.
Kernel Management:
- Isolation: Each buffer can map to a IPython kernel session.
- Persistence: Variables persist between cell executions within the same buffer.
- Auto-Recovery: Includes automatic kernel death detection and recovery. If a kernel crashes (e.g., OOM), Quench detects it and seamlessly restarts the kernel upon the next execution request.
- Integrated Web Server: A lightweight aiohttp web server starts automatically with Neovim to relay rich output via WebSockets.
Commands
v1.0.0 ships with a suite of commands for execution and management:
- Execution:
QuenchRunCell,QuenchRunCellAdvance,QuenchRunSelection,QuenchRunAll - Kernel Control:
QuenchInterruptKernel,QuenchResetKernel,QuenchShutdownKernel - System:
QuenchStatus,QuenchOpen(opens browser),QuenchStop
Requirements
Neovim: >= 0.8.0
Python: >= 3.9
Python Packages: pynvim, jupyter-client, aiohttp, websockets, ipykernel
For full documentation, configuration options, and usage examples, please refer to the README.