@jupyter-lsp/jupyterlab-lsp
Version:
Language Server Protocol integration for JupyterLab
29 lines (28 loc) • 890 B
TypeScript
import { IEditorPosition, WidgetLSPAdapter, Document } from '@jupyterlab/lsp';
import { Token } from '@lumino/coreutils';
import * as lsProtocol from 'vscode-languageserver-protocol';
/**
* Diagnostic which is localized at a specific editor (cell) within a notebook
* (if used in the context of a FileEditor, then there is just a single editor)
*/
export interface IEditorDiagnostic {
diagnostic: lsProtocol.Diagnostic;
editorAccessor: Document.IEditor;
range: {
start: IEditorPosition;
end: IEditorPosition;
};
}
export interface IReadonlyDiagnosticsDatabase {
/**
* @alpha
*/
get all(): IEditorDiagnostic[];
}
export interface IDiagnosticsFeature {
/**
* @alpha
*/
getDiagnosticsDB(adapter: WidgetLSPAdapter<any>): IReadonlyDiagnosticsDatabase;
}
export declare const IDiagnosticsFeature: Token<IDiagnosticsFeature>;