Autocompleter Extensions in extension-examples github

I’ve been referencing the completer extension from the extension-examples github found here (extension-examples/completer at master · jupyterlab/extension-examples · GitHub) for an autocomplete extension I’m trying to build and I’m confused on the role of all the connectors (ContextConnector, KernelConnector, CompletionConnector, CustomConnector). I’ve read the docs and the README.md but I’m still having trouble understanding it. What is their purpose? What are they trying to connect?

1 Like

The connectors are ways to connect the completion widget with the sources of completion items (like a kernel which knows about runtime objects, editor context which knows about tokens in the source code in the active editor, and LSP which knows about static-analysis derived completion items).

The architecture around this is getting restructured for JupyterLab 4.0 to allow easier and more feature full completion system based on providers: https://github.com/jupyterlab/jupyterlab/pull/11795, Update completer part 2 by trungleduc · Pull Request #11969 · jupyterlab/jupyterlab · GitHub, Update completer part 3 by trungleduc · Pull Request #12219 · jupyterlab/jupyterlab · GitHub.

I understand that you are trying to extend the completer. As we are preparing for 4.0 release soon, it might be a good idea to develop against the new API and after you tried it out we could discuss any actionable feedback you may have to accommodate for the needs of your extension?