import type { LSPClient } from './client'; import type { Diagnostic, Location, LocationLink, ResolvedServer, ServerLookupResult, WorkspaceEdit } from './types'; /** * Find the project root for a specific LSP server using its root function. * Mirrors OpenCode core's RootFunction approach. * * @param filePath - The file to find the root for * @param server - The LSP server config with root function * @returns The project root directory, or file's directory if no root function */ export declare function findServerProjectRoot(filePath: string, server: ResolvedServer): string; /** * Legacy function for backward compatibility. * @deprecated Use findServerProjectRoot with server-specific patterns instead. */ export declare function findWorkspaceRoot(filePath: string): string; export declare function uriToPath(uri: string): string; export declare function formatServerLookupError(result: Exclude): string; export declare function withLspClient(filePath: string, fn: (client: LSPClient) => Promise): Promise; export declare function formatLocation(loc: Location | LocationLink): string; export declare function formatSymbolKind(kind: number): string; export declare function formatSeverity(severity: number | undefined): string; export declare function formatDiagnostic(diag: Diagnostic): string; export declare function filterDiagnosticsBySeverity(diagnostics: Diagnostic[], severityFilter?: 'error' | 'warning' | 'information' | 'hint' | 'all'): Diagnostic[]; export interface ApplyResult { success: boolean; filesModified: string[]; totalEdits: number; errors: string[]; } export declare function applyWorkspaceEdit(edit: WorkspaceEdit | null): ApplyResult; export declare function formatApplyResult(result: ApplyResult): string;