@krassowski/jupyterlab-lsp
Version:
Language Server Protocol integration for JupyterLab
24 lines (23 loc) • 1.41 kB
TypeScript
import { JupyterFrontEndPlugin } from '@jupyterlab/application';
import { TranslationBundle } from '@jupyterlab/translation';
import { LabIcon } from '@jupyterlab/ui-components';
import * as lsProtocol from 'vscode-languageserver-protocol';
import { CodeMirrorIntegration, IEditOutcome } from '../editor_integration/codemirror';
import { CodeMirrorVirtualEditor } from '../virtual/codemirror_editor';
import { DiagnosticsCM } from './diagnostics/diagnostics';
export declare const renameIcon: LabIcon;
export declare class RenameCM extends CodeMirrorIntegration {
setTrans(trans: TranslationBundle): void;
setStatus(message: string, timeout: number): void;
handleRename(workspaceEdit: lsProtocol.WorkspaceEdit, old_value: string, new_value: string): Promise<IEditOutcome | undefined>;
/**
* In #115 an issue with rename for Python (when using pyls) was identified:
* rename was failing with an obscure message when the source code could
* not be parsed correctly by rope (due to a user's syntax error).
*
* This function detects such a condition using diagnostics feature
* and provides a nice error message to the user.
*/
static ux_workaround_for_rope_limitation(error: Error, diagnostics_feature: DiagnosticsCM, editor: CodeMirrorVirtualEditor, rename_feature: RenameCM): string | null;
}
export declare const RENAME_PLUGIN: JupyterFrontEndPlugin<void>;