lsp-ws-proxy

Crates.iolsp-ws-proxy
lib.rslsp-ws-proxy
version0.8.0
sourcesrc
created_at2020-09-20 06:12:18.826157
updated_at2021-09-01 08:26:07.5837
descriptionWebSocketify any Language Server
homepagehttps://github.com/qualified/lsp-ws-proxy
repositoryhttps://github.com/qualified/lsp-ws-proxy
max_upload_size
id290703
size122,697
kazk (kazk)

documentation

README

lsp-ws-proxy

WebSocket proxy for Language Servers.

Usage

$ lsp-ws-proxy --help

Usage: lsp-ws-proxy [-l <listen>] [-s] [-r] [-v]

Start WebSocket proxy for the LSP Server.
Anything after the option delimiter is used to start the server.

Multiple servers can be registered by separating each with an option delimiter,
and using the query parameter `name` to specify the command name on connection.
If no query parameter is present, the first one is started.

Examples:
  lsp-ws-proxy -- rust-analyzer
  lsp-ws-proxy -- typescript-language-server --stdio
  lsp-ws-proxy --listen 8888 -- rust-analyzer
  lsp-ws-proxy --listen 0.0.0.0:8888 -- rust-analyzer
  # Register multiple servers.
  # Choose the server with query parameter `name` when connecting.
  lsp-ws-proxy --listen 9999 --sync --remap \
    -- typescript-language-server --stdio \
    -- css-languageserver --stdio \
    -- html-languageserver --stdio

Options:
  -l, --listen      address or port to listen on (default: 0.0.0.0:9999)
  -s, --sync        write text document to disk on save, and enable `/files`
                    endpoint
  -r, --remap       remap relative uri (source://)
  -v, --version     show version and exit
  --help            display usage information

Why?

Remote Language Server is necessary when it's not possible to run the server next to the client.

For example, this can be used to let in-browser editors like CodeMirror and Monaco to use any Language Servers. See qualified/lsps for an example of using proxied Rust Analyzer with CodeMirror.

Features

  • Proxy messages
  • Synchronize files
  • Manipulate remote files with POST /files
  • Remap relative DocumentUri (source://)
Commit count: 112

cargo fmt