jupyterlab-lsp icon indicating copy to clipboard operation
jupyterlab-lsp copied to clipboard

Tabnine integration

Open bilucodota opened this issue 2 years ago • 4 comments

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?

bilucodota avatar Aug 31 '21 21:08 bilucodota

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 avatar Aug 31 '21 22:08 krassowski

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.

krassowski avatar Aug 31 '21 22:08 krassowski

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

bilucodota avatar Sep 01 '21 05:09 bilucodota

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

3coins avatar Mar 29 '22 18:03 3coins

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.

krassowski avatar Sep 17 '23 19:09 krassowski