Skip to content

Wrapping existing language server(s) in websockets, virtual file systems #84

Closed
@bollwyvl

Description

@bollwyvl

Some semi-related questions:
Are there any examples or documentation of wrapping/extending pygls to:

  1. ... serve LSP over websockets?
  2. ... to wrap existing LS implementations?
  3. ... use non-traditional filesystems and formats?

Background

We've been looking at bringing LSP to the Jupyter ecosystem for a while now. While the execution message format serves well for executing code, completion, inspection, shared frontend/backend state, and rudimentary code modification, LSP has many additional features and implementations which would be valuable to augment our kernels.

One of the current attempts at [1,2] is jupyterlab-lsp, which presently has a hard dependency on nodejs by way of jsonrpc-ws-proxy, which allows a single websocket port to server many stdio language servers. I've been making the configuration more jupyter-forward with this wip PR, which in turn wraps jsonrpc-ws-proxy with jupyter-server-proxy.

I've run into some issues in making it work simply for the general case, especially around absolute file paths, which aren't necessarily a given due to [3] the Jupyter Contents API, which allows serving "files" from... well, just about anything.

Another thing I want is to be able to have multiple, language-oriented URLs (or some message envelope format) be answered by the same underlying process, e.g. javascript-typescript-langserver.

Happy to help explore this space in any way!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions