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 requestsLspDaemon– the daemon runtime that manages language serversLanguageId– supported languages and their LSP server configurationsDaemonRequest/DaemonResponse– the wire protocol between client and daemon
§Key Types
LspClient– Client for connecting to a running daemon. Supports go-to-definition, references, hover, diagnostics, rename, and more.LspDaemon– Main daemon runtime. Listens on a Unix socket and manages language server lifecycles.DaemonRequest/DaemonResponse– Protocol messages between client and daemon.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 daemon::LspDaemon;pub use daemon::run_daemon;pub use error::DaemonError;pub use error::DaemonResult;pub use language_catalog::LanguageId;pub use language_catalog::LANGUAGE_METADATA;pub use language_catalog::LanguageMetadata;pub use language_catalog::LspConfig;pub use language_catalog::extensions_for_alias;pub use language_catalog::from_lsp_id;pub use language_catalog::get_config_for_language;pub use language_catalog::metadata_for;pub use lsp_utils::symbol_kind_to_string;pub use socket_path::ensure_socket_dir;pub use socket_path::lockfile_path;pub use socket_path::log_file_path;pub use socket_path::socket_path;pub use protocol::DaemonRequest;pub use protocol::DaemonResponse;pub use protocol::InitializeRequest;pub use protocol::LspErrorResponse;pub use protocol::MAX_MESSAGE_SIZE;pub use protocol::ProtocolError;pub use uri::path_to_uri;pub use uri::uri_to_path;
Modules§
- daemon
- error
- language_
catalog - lsp_
utils - LSP utility functions
- protocol
- socket_
path - testing
- uri
- URI↔path conversion utilities for LSP file URIs.
Structs§
Enums§
- Client
Error - Errors that can occur when using
LspClient.