import { LspClient } from './client.js'; import type { ShellPathService } from '../../runtime/shell-paths.js'; type LspRoots = Pick; export interface LspServerConfig { command: string; args: string[]; initializationOptions?: Record | undefined; } export declare class LspService { private clients; private configs; private initializing; private readonly roots; constructor(roots: LspRoots); /** Register a server configuration for a language. */ registerServer(langId: string, config: LspServerConfig): void; /** * Get or start a client for a language. * Returns null if no server is configured or if the server fails to start. */ getClient(langId: string): Promise; private _startClient; /** * Check if a server is available for a language * (config exists AND command is installed on PATH). */ isAvailable(langId: string): Promise; /** Initialize a server with the LSP handshake. */ private _initializeServer; /** Stop all running servers. */ shutdown(): Promise; /** * Auto-detect installed LSP servers and return their configs. * Registers detected servers automatically. */ detectServers(): Promise>; /** * Ensure a server binary is available for the given language. * Downloads the binary if it's a known downloadable server (rust-analyzer, gopls) * and not already available. Non-blocking for bundled/PATH servers. */ ensureServer(langId: string): Promise; } export {}; //# sourceMappingURL=service.d.ts.map