/** * Typed wrappers around the LSP methods we use. * * Imports types from `vscode-languageserver-protocol` and converts to/from * the file:// URI format LSP servers expect. All paths in the public API * are absolute filesystem paths; LSP URIs only show up internally. */ import type { InitializedClient } from "./client.js"; export interface SourceLocation { filePath: string; line: number; character: number; /** Optional end position when the LSP server returns a range. */ endLine?: number; endCharacter?: number; } export interface ResolvedSymbol { name: string; kind: string; filePath: string; startLine: number; startCharacter: number; endLine: number; endCharacter: number; /** Children symbols (methods inside a class, properties, etc.) when hierarchical. */ children?: ResolvedSymbol[]; } /** LSP `textDocument/definition` — returns 0+ source locations. */ export declare function lspDefinition(client: InitializedClient, filePath: string, line: number, character: number): Promise; /** LSP `textDocument/references` — returns all references in indexed projects. */ export declare function lspReferences(client: InitializedClient, filePath: string, line: number, character: number, includeDeclaration?: boolean): Promise; /** LSP `textDocument/hover` — returns type info / docs at a position. */ export declare function lspHover(client: InitializedClient, filePath: string, line: number, character: number): Promise<{ contents: string; } | null>; /** LSP `textDocument/documentSymbol` — returns top-level + nested symbols. */ export declare function lspDocumentSymbol(client: InitializedClient, filePath: string): Promise;