A Neovim plugin for seamless integration with Jupyter notebooks through Jupyter Ascending. This plugin allows you to edit and execute Jupyter notebooks using regular Python files while maintaining synchronization with the notebook format.

.sync.py files and .ipynb notebookspip install git+https://github.com/RitschAlex/jupyter_ascending.git or pip install jupyter_ascending)Note: The PyPI package imbue-ai/jupyter_ascending is unmaintained and only supports Jupyter Notebook v6. The GitHub installation recommended above,
RitschAlex/jupyter_ascending, is a fork ofimbue-ai/jupyter_ascendingand supports Jupyter Notebook v7+, nbclassic and JupyterLab.
Using lazy.nvim:
{
"RitschAlex/jupyter_ascending.nvim",
config = function()
require("jupyter_ascending").setup()
end,
}
Using vim.pack
vim.pack.add({
"RitschAlex/jupyter_ascending.nvim"
})
require("jupyter_ascending").setup()
Using packer.nvim:
use {
"RitschAlex/jupyter_ascending.nvim",
config = function()
require("jupyter_ascending").setup()
end
}
The plugin comes with sensible defaults but can be customized using the setup function:
require("jupyter_ascending").setup({
-- Boolean to enable or disable the plugin (default: false)
enabled = false,
-- Path to Python executable (default: "python")
python_executable = "python",
-- Pattern to match sync files (default: ".sync.py")
match_pattern = ".sync.py",
-- Auto-sync on save (default: true)
auto_write = true,
-- Enable default keymaps (default: true)
default_mappings = true,
-- Command timeout in milliseconds (default: 10000)
timeout = 10000,
-- Keymap Prefix (default: "<space><space>")
keymap_prefix = "<space><space>",
-- Command Line Prefix (default: "Jupyter")
command_prefix = "Jupyter",
})
When default_mappings is enabled, the following keymaps are available in .sync.py files:
| Keymap | Description |
|---|---|
<space><space>x |
Execute current cell |
<space><space>X |
Execute all cells |
<space><space>r |
Restart Jupyter kernel |
The plugin exposes the following Lua functions:
-- Sync the current file with its corresponding Jupyter notebook
require("jupyter_ascending").sync()
-- Execute the current cell
require("jupyter_ascending").execute()
-- Execute all cells in the current file
require("jupyter_ascending").execute_all()
-- Restart the Jupyter kernel
require("jupyter_ascending").restart()
If you prefer to set up your own keymaps, disable the default mappings in the setup and define your own:
require("jupyter_ascending").setup({
default_mappings = false,
})
-- Set up custom keymaps
vim.keymap.set("n", "<leader>je", function()
require("jupyter_ascending").execute()
end, { desc = "Execute current Jupyter cell" })
vim.keymap.set("n", "<leader>ja", function()
require("jupyter_ascending").execute_all()
end, { desc = "Execute all Jupyter cells" })
vim.keymap.set("n", "<leader>jr", function()
require("jupyter_ascending").restart()
end, { desc = "Restart Jupyter kernel" })
Generate a .sync.py / .sync.ipynb file pair from the command line:
python -m jupyter_ascending.scripts.make_pair --base example
This creates two linked files:
| File | Purpose |
|---|---|
example.sync.py |
Python source you edit in Neovim |
example.sync.ipynb |
Jupyter notebook kept in sync automatically |
Start the notebook server and open the .sync.ipynb file:
Standard Jupyter:
python -m jupyter notebook example.sync.ipynb
nbclassic (legacy interface):
python -m jupyter nbclassic
Note: When using
nbclassic, the notebook must be accessible atlocalhost:8888/nbclassic/notebooks.
Open example.sync.py in Neovim. The plugin ships disabled by default —
activate it with:
:JupyterEnable
Use keymaps or commands to control execution directly from Neovim.
Keymaps (active in .sync.py buffers):
| Key | Action |
|---|---|
<space><space>x |
Execute current cell |
<space><space>X |
Execute all cells |
<space><space>r |
Restart Jupyter kernel |
Commands:
| Command | Effect |
|---|---|
:JupyterSync |
Sync .py → .ipynb |
:JupyterExecute |
Execute current cell |
:JupyterExecuteAll |
Execute all cells |
:JupyterRestart |
Restart kernel |
:JupyterEnable |
Enable the plugin |
:JupyterDisable |
Disable the plugin |
Auto‑sync: When
auto_write = true(the default), saving the Python file
automatically syncs changes to the notebook.
The following features are planned for jupyter_ascending.nvim:
In addition, while improving Jupyter Ascending, the following core features will be added:
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see the LICENSE file for details.