dccsillag / magma-nvim

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

[Feature Request] Add syntax completion to nvim #101

Open eyalk11 opened 1 year ago

eyalk11 commented 1 year ago

One would like to inspect his variables to see their attributes. So it is beneficial to have it as additional lsp source or provide a custom completion function that is aligned with jupyter namespace. In terms of what I want to happen is writing "my_variable.<tab>" would show its methods etc . When relying on static sources such as mypy , some of it might be wrong or simply unresolved.

WhiteBlackGoose commented 1 year ago

Hi. I use this for this purpose, but probably might make sense to merge it in magma too

eyalk11 commented 1 year ago

Can you work with both at the same time? I guess you can just add it as a dependency of your project and call JupyerAttach

WhiteBlackGoose commented 1 year ago

You can work with both at the same time yes. I start jupyter process separately and then connect to it from both

dccsillag commented 1 year ago

Perhaps it would be worth it to add a helper to connect both in a single command. (Even if just as a suggested snippet in the README.)

WhiteBlackGoose commented 1 year ago

Yeah. Last time I tried, for some reason it didn't work (probably bc simultaneous connections?), worth probably to try again

dccsillag commented 1 year ago

Yep, that sounds likely. IIRC, Magma triggers a user autocommand when the kernel connects, so that may be of help. (Also, maybe having a loop to try connecting a couple of times [~3ish], waiting a bit in between attempts, before giving up?)