jupyter-lsp / jupyterlab-lsp

Coding assistance for JupyterLab (code navigation + hover suggestions + linters + autocompletion + rename) using Language Server Protocol
https://jupyterlab-lsp.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.81k stars 148 forks source link

Tabnine integration #672

Closed bilucodota closed 1 year ago

bilucodota commented 3 years ago

What are you trying to do?

My name is Amir, I'm from Tabnine (www.tabnine.com) engineering team, the maintainer of jupyterlab-tabnine.

Tabnine is a GPT-2 based auto completer tool which supports most major IDEs.

I got few requests from users who want to work with jupyterlab-lsp & jupyterlab-tabnine together.

jupyterlab-tabnine mainly implements CompletionHandler.ICompletionItemsConnector (https://github.com/codota/tabnine-jupyterlab/blob/master/src/connectors/TabnineConnector.ts) What would be the best way to integrate both extensions?

Appreciate it

How is it done today, and what are the limits of current practice?

What is new in your approach and why do you think it will be successful?

Who cares? If you are successful, what difference will it make?

What are the risks?

How much will it cost?

How long will it take?

What are the mid-term and final “exams” to check for success?

krassowski commented 3 years ago

Hi @bilucodota thanks for getting in touch! I would love to enable all extensions to combine their completions, and users to have a way to specify in which order they want to see the completions. I was drafting a solution in #600 and @hbcarlos started upstreaming that work in #10523. Long story short we will prepare a new, saner API that should allow multiple extensions to hook into completer without interfering with one another and aim for JupyterLab 4.0 which should happen by the end of the year. How does that sound?

krassowski commented 3 years ago

It would probably be good if you could take a look at the discussion in #600 and at the trimmed draft in https://github.com/jupyterlab/jupyterlab/pull/10523 to provide a feedback from your perspective.

bilucodota commented 3 years ago

@krassowski thanks for the warm welcome! sounds wonderful. I've commented on the thread. Guess we can continue there.

3coins commented 2 years ago

@bilucodota Is the integration in tabnine extension complete w.r.t. the change in lsp api? Can users start using both lsp and tabnine together within JupyterLab 4.x?

krassowski commented 1 year ago

Just for historical record, jupyterlab-lsp 5.0 targeting JupyterLab 4.0 implements ICompletionProvider API , which enables multiple completion provideres to co-exists. This is also supported in Jupyter Notebook v7+. We now just register on ICompletionProviderManager token, as should other extensions like tabnine going forward.

https://github.com/jupyter-lsp/jupyterlab-lsp/blob/3fb68dbab1ef52d1c3a65991755c2f24bf297bf7/packages/jupyterlab-lsp/src/features/completion/index.ts#L62-L63

Happy to finally close this as answered.