import type { FileDiagnosticsResult } from "../lsp"; import { type VimBuffer } from "./buffer"; import type { Position, VimInputMode, VimKeyToken, VimLoadedFile, VimPendingInput, VimRegister, VimSearchState, VimSelection } from "./types"; export interface VimSaveResult { loaded: VimLoadedFile; diagnostics?: FileDiagnosticsResult; } export interface VimEngineCallbacks { beforeMutate: (buffer: VimBuffer) => Promise; loadBuffer: (path: string) => Promise; saveBuffer: (buffer: VimBuffer, options?: { force?: boolean; }) => Promise; } export declare class VimEngine { #private; buffer: VimBuffer; inputMode: VimInputMode; selectionAnchor: Position | null; register: VimRegister; lastSearch: VimSearchState | null; lastCharFind: { char: string; mode: "f" | "F" | "t" | "T"; } | null; lastVisual: { anchor: Position; cursor: Position; mode: VimInputMode; } | null; lastCommand?: string; statusMessage?: string; diagnostics?: FileDiagnosticsResult; viewportStart: number; closed: boolean; constructor(buffer: VimBuffer, callbacks: VimEngineCallbacks); clone(callbacks?: Partial): VimEngine; getPublicMode(): import("./types").VimMode; getSelection(): VimSelection | undefined; getPendingInput(): VimPendingInput | undefined; rollbackPendingInsert(): void; setCursor(line: number, col: number): void; executeTokens(tokens: readonly VimKeyToken[], lastCommand?: string, onStep?: () => Promise): Promise; close(force: boolean): Promise; centerViewportOnCursor(size?: number): void; applyLiteralInsert(text: string, exitInsertMode: boolean): Promise; }