I built an experimental Neovim fork that runs init.py and Python callbacks
inside the editor process. The same normal-mode keymap toggles a Markdown task
from either init.lua or init.py.

CPython is opt-in at build time. LuaJIT and the existing :python3 provider
remain available. The fork generates Python bindings for reading and replacing
the current line and supports keymaps, autocommands, and scheduling callbacks
on the editor thread.
Source and runnable demo ยท Design and benchmark
Write-ups
- What happens when a Neovim keymap calls Python? follows a keypress from the paired configs into the editor and explains the current-line benchmark.
- How Neovim keeps a Python keymap callback alive uses a self-removing keymap to trace ownership across Neovim and CPython.