Ark: Support for JupyterLab-LSP
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 337
- Forks
- 32
- Avg merge
- 8d 17h
- Merged PRs (30d)
- 11
Description
I would have loved to show Ark completions running in Jupyter lab in our Posit::conf talk, so I looked into how this could be done in case there's an easy way to set it up. Unfortunately jupyterlab-lsp currently requires a static spec file describing how to launch the server and an stdio connection instead of TCP (see https://jupyterlab-lsp.readthedocs.io/en/latest/Configuring.html). These requirements make it too tricky to implement in short order.
For the longer term, here are the two ways I can think of for implementing this:
-
Split the LSP from the kernel (https://github.com/posit-dev/positron/issues/3180) and use a regular jupyter-lsp spec file to launch an LSP instance. This has the downside that the LSP will not be connected to the kernel and will not know about dynamic state such as variables in the global environment.
-
Work with the jupyterlab people to formalise a Jupyter request message for which the kernel responds with a connection spec containing the arguments that allow a second instance of Ark to connect to the kernel.
The second option could work whether we have fully split the LSP from the kernel or not.
-
If we have, this LSP instance will analyse the project independently. To get updated about dynamic state after top-level commands it connects to the kernel via 0MQ and subscribes to IOPub.
-
If we haven't split the LSP from the kernel, we just use the separate Ark instance as a relay to the instance in the kernel. It would connect to the kernel LSP via TCP.
This last scenario is the one that requires the least amount of changes to Ark, but we do need jupyterlab requesting the spec from our kernel instead of using a static one.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no Ark files or tests. Start by reviewing the linked Positron issue and jupyterlab-lsp configuration documentation, then determine which integration approach is accepted with the JupyterLab team; done requires an agreed way to request a connection spec and a working Ark integration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter, rust
- Domain
- backend-api-design, devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100