benlubas / molten-nvim

A neovim plugin for interactively running code with the jupyter kernel. Fork of magma-nvim with improvements in image rendering, performance, and more
GNU General Public License v3.0
581 stars 30 forks source link

[Feature Request] Remote JupyterLab support #215

Closed shurensha closed 3 weeks ago

shurensha commented 3 months ago

Can you please add support for remote jupyter lab server? so the only inputs are the url and port? Thank you very much

benlubas commented 3 months ago

Checkout remote-hosts.

You can create a lua function that takes the url and port, writes a connection file to /tmp/whatever and then runs :MoltenInit /tmp/whatever

Or I'd be open to a PR that adds something similar. I just don't currently have a good way to test this

shurensha commented 3 months ago

i hope we can hide the kernels and instead rely on jupyter lab to manage the kernels

benlubas commented 3 months ago

If you want jupyter lab to manage the kernel then you have to start the kernel from jupyter lab (afaik). And still read remote-hosts so that you can connect.

opqrstuvcut commented 2 months ago

@shurensha This fork might be helpful (although it sometimes behaves buggy): https://github.com/opqrstuvcut/molten-nvim/tree/feature/add_jupyterapi_runtime

You can connect to a kernel started with the jupyter lab command as follows: :MoltenInit http://localhost:8888

benlubas commented 2 months ago

@opqrstuvcut definitely open a PR, would be happy to add this functionality.

What's the buggy behavior currently?

opqrstuvcut commented 2 months ago

@benlubas Thank you for your interest.

The bugs are as follows:

I plan to submit a PR once these issues are fixed, but since they don't cause significant problems for personal use, addressing these bugs has been postponed.