magma-nvim icon indicating copy to clipboard operation
magma-nvim copied to clipboard

[Feature Request] Add syntax completion to nvim

Open eyalk11 opened this issue 2 years ago • 6 comments

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.

eyalk11 avatar Jul 28 '23 21:07 eyalk11

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

WhiteBlackGoose avatar Jul 29 '23 07:07 WhiteBlackGoose

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

eyalk11 avatar Jul 29 '23 21:07 eyalk11

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

WhiteBlackGoose avatar Jul 30 '23 14:07 WhiteBlackGoose

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.)

dccsillag avatar Jul 30 '23 14:07 dccsillag

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

WhiteBlackGoose avatar Jul 30 '23 14:07 WhiteBlackGoose

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?)

dccsillag avatar Jul 30 '23 14:07 dccsillag