lkhphuc / jupyter-kernel.nvim

Get (IPython) Jupyter kernel completion suggestions and object inspection into Neovim.
MIT License
75 stars 5 forks source link

Features & Enhancement #1

Open lkhphuc opened 1 year ago

lkhphuc commented 1 year ago
WhiteBlackGoose commented 1 year ago
WhiteBlackGoose commented 1 year ago
lkhphuc commented 1 year ago
  • [ ] Docs in preview for nvim-cmp would be nice

do you mean the function signature similar to LSP? If so it should already work if your kernel return it like so Screenshot 2023-02-26 at 15 06 42

If you means so also display what JupyterInspect display then it is a bit tricky, since that is not returned by the kernel (as far as I know). Therefore it's potentially very slow as I would have to loop through every completion item and called inspect myself on that. In this case it will unlikely be implemented.

WhiteBlackGoose commented 1 year ago

If so it should already work if your kernel return it like so

It works the same for me as it is on your screenshot. But there's no docs, as you can see. Although if you run it with jedi language server, it provides docs

lkhphuc commented 1 year ago

Oh I didn't know jedi-ls can do that. I use pyright and it also just give me the signature. In this case since jupyter also doesn't provide documentation, I guess the best I can do is to figure out if there is anyway I can configure nvim-cmp to filter out items that is duplicated from jedi-ls, so that only jedi-ls will appear.