import type { LspClientManager } from "../client-manager.ts"; import type { LspDocumentManager } from "../document-manager.ts"; import type { Location, Range } from "../types.ts"; /** * Resolve language ID from a file path. Throws if the extension is unsupported. */ export declare function extractLanguageId(filePath: string): string; /** * Format a Location as a markdown link: `file://path Lstart:col-end:col` */ export declare function formatLocation(loc: Location): string; /** * Format a Range as `L{line}:{char}-L{line}:{char}` (0-based). */ export declare function formatRange(range: Range): string; /** * Map DiagnosticSeverity number to human-readable label. */ export declare function formatSeverity(severity: number): string; /** * Map SymbolKind number to human-readable name. */ export declare function formatSymbolKind(kind: number): string; /** * Map CompletionItemKind number to human-readable name. */ export declare function formatCompletionKind(kind: number): string; /** * Map DocumentHighlightKind number to human-readable label. */ export declare function formatDocumentHighlightKind(kind: number): string; /** * Ensure a document is synced with its LSP server. Throws if the file doesn't * exist or the language is not supported. */ export declare function ensureSynced(filePath: string, docManager: LspDocumentManager, client: LspClientManager, languageId: string): Promise; /** * Convert an absolute file path to a `file://` URI. */ export declare function fileUri(filePath: string): string; /** * Check whether the server for a given language supports a specific * capability (e.g. `"textDocument.typeDefinition"`). Returns true if * the capability value is truthy. */ export declare function checkCapability(languageId: string, client: LspClientManager, capabilityPath: string): boolean; /** * Build a standard error message for an unsupported capability. */ export declare function capabilityNotSupported(feature: string): string; //# sourceMappingURL=utils.d.ts.map