#client-server #create #communicate

lsp-client

A client for the Language Server Protocol

1 unstable release

0.1.0 Feb 15, 2025

#8 in #communicate

Download history 108/week @ 2025-02-15 9/week @ 2025-02-22 4/week @ 2025-03-01 1/week @ 2025-03-08

122 downloads per month

MIT license

10KB
148 lines

lsp-client

crates.io Documentation MIT licensed

A client for the Language Server Protocol.

Usage

Start a language server and create a client to communicate with it.

let mut child = Command::new("rust-analyzer")
    .stdin(Stdio::piped())
    .stdout(Stdio::piped())
    .spawn()
    .unwrap();

let stdin = child.stdin.take().unwrap();
let stdout = child.stdout.take()..unwrap();
let (tx, rx) = io_transport(stdin, stdout);
let client = LspClient::new(tx, rx);

See the examples directory for more usage examples.

Dependencies

~5–12MB
~129K SLoC