dccsillag / magma-nvim

Interact with Jupyter from NeoVim.
GNU General Public License v3.0
977 stars 49 forks source link

[Feature Request] .ipynb support #78

Closed meatballs closed 1 year ago

meatballs commented 1 year ago

nbdev provides some excellent tools for developing with notebooks - particularly their solutions for working within a git repo.

However, my choices for working with it at the moment are:

I'd really like to use the .ipynb files directly within neovim and take advantage of the work that nbdev has done.

Magma is by far the most usable tool for neovim/jupyter integration that I've used to date. Is it feasible to add support for the .ipynb format without the need for any translation?

I can see some work done by https://github.com/ahmedkhalf/jupyter-nvim for viewing .ipynb files. That works nicely for me, but the project seems dead and hasn't gone as far as magma.

meatballs commented 1 year ago

I've started work on a separate plugin to support .ipynb files:

https://github.com/meatballs/ipynb.nvim

It can parse the json and load the content into a neovim buffer ready for use with magma.

Is there some way I can set extmarks for magma as I generate the cells?

meatballs commented 1 year ago

Is there some way I can set extmarks for magma as I generate the cells?

My plugin is working nicely now - I'd really like to create the necessary extmarks for magma automatically, if possible. Any thoughts on how I might do that?

I can see the namespace to use would be magma-extmarks but I'm not sure how to correctly mark an entire cell.

meatballs commented 1 year ago

Would I perhaps need a new Magma command - MagmaDefineCell or similar to create a Span instance?