atom-languageclient
Version:
Integrate Language Servers with Atom
14 lines (13 loc) • 901 B
TypeScript
import type * as atomIde from "atom-ide-base";
import { LanguageClientConnection, ApplyWorkspaceEditParams, ApplyWorkspaceEditResponse, WorkspaceEdit } from "../languageclient";
import { TextBuffer } from "atom";
/** Public: Adapts workspace/applyEdit commands to editors. */
export default class ApplyEditAdapter {
/** Public: Attach to a {LanguageClientConnection} to receive edit events. */
static attach(connection: LanguageClientConnection): void;
/** Tries to apply edits and reverts if anything goes wrong. Returns the checkpoint, so the caller can revert changes if needed. */
static applyEdits(buffer: TextBuffer, edits: atomIde.TextEdit[]): number;
static onApplyEdit(params: ApplyWorkspaceEditParams): Promise<ApplyWorkspaceEditResponse>;
static apply(workspaceEdit: WorkspaceEdit): Promise<ApplyWorkspaceEditResponse>;
private static handleResourceOperation;
}