lkhphuc / jupyter-kernel.nvim

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

Working with vim-lsp #7

Open mikh3x4 opened 1 year ago

mikh3x4 commented 1 year ago

How hard would it be to make this work with a different completion engine like vim-lsp?

lkhphuc commented 1 year ago

Hi. I don't use vim-lsp before so I'm not sure. But all this plugin really do wrt to nvim-cmp is just a thin wrapper around the vim's cmd JupyterComplete https://github.com/lkhphuc/jupyter-kernel.nvim/blob/main/lua/jupyter_kernel/cmp.lua#L22 My JupyterComplete is in turn another thin wrapper around jupyter_client.

I saw that vim-lsp hook into omnifunc, so you might want to check out https://github.com/mtikekar/nvim-send-to-term for a similar completion wrapper compatible with omnifunc. But I suspect if you change omnifunc from vim.lsp into jupyter kernel, you then will lose completion provided by the lsp.