Expand description
§aether-lspd
An LSP daemon that manages language server processes and shares them across multiple Aether agents. Communicates over Unix domain sockets.
§Table of Contents
§Quick start
Connect to a workspace, query hover info, and disconnect:
use aether_lspd::{LspClient, LanguageId, path_to_uri};
use std::path::Path;
#[tokio::main]
async fn main() -> aether_lspd::ClientResult<()> {
let client = LspClient::connect(
Path::new("/home/user/my-project"),
LanguageId::Rust,
).await?;
let uri = path_to_uri(Path::new("/home/user/my-project/src/main.rs")).unwrap();
let hover = client.hover(uri, 10, 5).await?;
client.disconnect().await?;
Ok(())
}The client auto-spawns a daemon process if one isn’t already running. Multiple clients can share the same daemon for a given workspace and language.
§Documentation
Full API documentation is available on docs.rs.
Key entry points:
LspClient– connect to a daemon and make LSP requestsrun_lspd– run the daemon that manages language serversLanguageId– supported languages and their LSP server configurations
§Key Types
LspClient– Client for connecting to a running daemon. Supports go-to-definition, references, hover, diagnostics, rename, and more. Requests on one client run concurrently.LspdArgs– Daemon settings: socket path, idle timeout and per-request timeout. The client-daemon protocol is private and versioned through the socket name.LanguageId– Supported language identifiers with associated LSP server configurations.
§Feature Flags
| Feature | Description |
|---|---|
testing | Test utilities for integration tests |
§License
MIT
Re-exports§
pub use error::DaemonError;pub use error::DaemonResult;pub use language_catalog::LANGUAGES;pub use language_catalog::LanguageId;pub use language_catalog::LanguageMetadata;pub use language_catalog::ServerSpec;pub use language_catalog::detect_project_languages;pub use uri::UriError;pub use uri::path_to_uri;pub use uri::uri_to_path;
Modules§
- error
- language_
catalog - testing
- Scaffolds temporary projects and in-process daemons for integration testing against language servers.
- uri
- URI↔path conversion utilities for LSP file URIs.
Structs§
- LspClient
- Client for connecting to a running
aether-lspddaemon over a Unix domain socket. Requests from one client run concurrently, so a slow diagnostics query never holds up a hover. - Lspd
Args
Enums§
- Client
Error - Errors that can occur when using
LspClient. - Lspd
RunError
Constants§
- LSP_
REQUEST_ TIMED_ OUT - Error code for a request that exceeded the daemon’s per-request timeout. The daemon kills and replaces the language server when this fires.
Functions§
- run_
lspd - socket_
path - Generate a deterministic Unix socket path for a workspace and language.