import type { LspPosition, LspTextEdit, WorkspaceEdit } from "./types.js"; export declare function positionAt(text: string, offset: number): LspPosition; export declare function applyTextEdits(text: string, edits: LspTextEdit[]): string; export declare function hasOverlappingTextEdits(text: string, edits: LspTextEdit[]): boolean; export interface WorkspaceEditSplit { /** Edits targeting the requested document. */ edits: LspTextEdit[]; /** Other documents the server wants to change; lsp_fix never touches them. */ otherDocumentUris: string[]; /** Non-text documentChanges (create/rename/delete) reported but not applied. */ resourceOperations: string[]; } /** * Split a WorkspaceEdit into the edits for the requested document and * everything else the server returned. URIs are compared through the same * canonical key the diagnostics cache uses: a server may echo a differently * encoded form of the URI the client sent (marksman-style `c%3A`), and a raw * string compare would misfile same-document edits as cross-document. * Cross-document and resource-level changes are surfaced to the caller * instead of being silently dropped. */ export declare function splitWorkspaceEdits(edit: WorkspaceEdit | undefined, uri: string): WorkspaceEditSplit; //# sourceMappingURL=text-edits.d.ts.map