UNPKG

@jupyter-lsp/jupyterlab-lsp

Version:

Language Server Protocol integration for JupyterLab

22 lines (21 loc) 771 B
import { WidgetLSPAdapter } from '@jupyterlab/lsp'; import type * as lsProtocol from 'vscode-languageserver-protocol'; import { VirtualDocument } from './virtual/document'; export interface IEditOutcome { appliedChanges: number | null; modifiedCells: number; wasGranular: boolean; errors: string[]; } export declare class EditApplicator { protected virtualDocument: VirtualDocument; protected adapter: WidgetLSPAdapter<any>; constructor(virtualDocument: VirtualDocument, adapter: WidgetLSPAdapter<any>); applyEdit(workspaceEdit: lsProtocol.WorkspaceEdit): Promise<IEditOutcome>; /** * Does the edit cover the entire document? */ private _isWholeDocumentEdit; private _replaceFragment; private _applySingleEdit; }