.ipynb files in neovim

I’ve just pushed the initial work on my first neovim plugin - to support .ipynb files (jupyter notebooks) in neovim:

At present, it can only read existing files, but I’d like to add creation and editing next. Along with the (excellent) magma plugin, I’m hoping to get to the point where I can use the (also excellent) nbdev tools within neovim rather than a browser or VS Code.

As ever, contributions gratefully received!

2 Likes

This would help a lot! I am using quarto to work with notebooks because I hate that the fact that they are not plain text, but there are limitations. With R, it works decently because the language server supports “scanning” the code chunks, but pyright does not work with that. What do you use to parse the .json?

The plugin is written in lua, so I’ve embedded json.lua within it.

It parses the json into a lua table when the file is opened, adds that table as a buffer variable, clears the buffer and renders from the variable.

I plan to add some extmarks to each cell so I can update the table as cells are added/deleted and pick up edits when a buffer is saved. Just need a few more round tuits…

1 Like