Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with Multiple Completer Extensions #236

Closed
edzkite opened this issue Mar 30, 2020 · 2 comments
Closed

Compatibility with Multiple Completer Extensions #236

edzkite opened this issue Mar 30, 2020 · 2 comments

Comments

@edzkite
Copy link
Contributor

edzkite commented Mar 30, 2020

Elevator Pitch

Kite is planning on creating an extension for JupyterLab, as a fork of this extension. Ideally, if users have both this extension and Kite's extension installed, things should just work.

Motivation

Based off my understanding of JupyterLab's completer-extension package and JupyterLab-LSP's implementation, it's only possible to have one connector per notebook or file.

Creating this issue to understand if:

  1. That assessment is accurate
  2. If so, what it'd take to support multiple connectors, e.g. LSPConnector + KiteLSPConnector across extensions
  3. Alternates to achieve said goal.
@bollwyvl
Copy link
Collaborator

fork of this extension.

I for one am happy to find ways to add more composite behavior to this repo: we're just two maintainers and a handful of contributors, and we're still hustling to make what we have work predictably. On #76, we've laid out (and have slowly been moving towards) a repo structure and workflow to allow for this, and #184 points towards supporting more kinds of sources. I also certainly feel kernels themselves need to get in the game, and be able to interact with (or act in place of) language servers.

it's only possible to have one connector per notebook or file.

When these show up, it usually indicates a need to:

  • carve out the functionality into something standalone (as an extension)
  • make it look as much like core lab as possible
  • propose it to lab core, ideally in a non-breaking way
  • get it merged and released
  • deprecate the standalone extension

So someplace, there needs to be a MultiCompletionConnector to which multiple completion sources get registered... a bit tired to dig further, but it seems like getting a composite added somewhere in the CompletionManager spec would make the most sense, followed by some additions to the extension. Then some kind of connector voodoo, and some rules around how quickly they come back: i'd wager if we get client-side stuff in, it's going to come back real fast, and it would be a shame to wait for a websocket roundtrip to a server process (or third party call) to slow all of that down. So maybe there's a model missing, too.

@krassowski
Copy link
Member

This now works in JupyterLab 4.0 with jupyterlab-lsp 5.0 since we use completion provider API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants