import type { CodeIndex, Reference } from "../types.js";
/** Map file extension to LSP language ID. */
export declare function detectLanguage(filePath: string): string | null;
/** Resolve symbol name to file position. Uses provided params or searches index. */
export declare function resolveSymbolPosition(index: CodeIndex, symbolName: string, filePath?: string, line?: number, character?: number): Promise<{
    filePath: string;
    line: number;
    character: number;
} | null>;
/**
 * Go to the definition of a symbol.
 * LSP when available, falls back to index search.
 */
export declare function goToDefinition(repo: string, symbolName: string, filePath?: string, line?: number, character?: number): Promise<{
    file: string;
    line: number;
    character: number;
    preview?: string;
    via: "lsp" | "index";
    hint?: string;
} | null>;
/**
 * Get type information for a symbol via LSP textDocument/hover.
 * Returns type signature + documentation, or hint when LSP is unavailable.
 */
export declare function getTypeInfo(repo: string, symbolName: string, filePath?: string, line?: number, character?: number): Promise<{
    type: string;
    documentation?: string;
    via: "lsp";
} | {
    via: "unavailable";
    hint: string;
}>;
/**
 * Find references to a symbol using LSP textDocument/references.
 * Returns null if LSP is unavailable (caller should fall back to grep).
 */
export declare function findReferencesLsp(repo: string, symbolName: string, filePath?: string, line?: number, character?: number): Promise<Reference[] | null>;
export interface CallHierarchyItem {
    name: string;
    kind: string;
    file: string;
    line: number;
    detail?: string;
}
export interface CallHierarchyResult {
    symbol: CallHierarchyItem;
    incoming: CallHierarchyItem[];
    outgoing: CallHierarchyItem[];
    via: "lsp" | "unavailable";
    hint?: string;
}
/**
 * Get call hierarchy for a symbol: who calls it (incoming) and what it calls (outgoing).
 * Uses LSP textDocument/prepareCallHierarchy + callHierarchy/incomingCalls + callHierarchy/outgoingCalls.
 */
export declare function getCallHierarchy(repo: string, symbolName: string, filePath?: string, line?: number, character?: number): Promise<CallHierarchyResult>;
interface RenameEdit {
    file: string;
    changes: number;
}
export declare function renameSymbol(repo: string, symbolName: string, newName: string, filePath?: string, line?: number, character?: number): Promise<{
    files_changed: number;
    edits: RenameEdit[];
}>;
export {};
//# sourceMappingURL=lsp-tools.d.ts.map