Class WidgetLSPAdapter<T>Abstract

Foreign code: low level adapter is not aware of the presence of foreign languages; it operates on the virtual document and must not attempt to infer the language dependencies as this would make the logic of inspections caching impossible to maintain, thus the WidgetAdapter has to handle that, keeping multiple connections and multiple virtual documents.

Type Parameters

Hierarchy (View Summary)

Implements

Constructors

Properties

_activeEditorChanged: Signal<WidgetLSPAdapter<T>, IEditorChangedData> = ...

Signal emitted when the active editor have changed.

_adapterConnected: Signal<WidgetLSPAdapter<T>, IDocumentConnectionData> = ...

Signal emitted when the adapter is connected.

_disposed: Signal<WidgetLSPAdapter<T>, void> = ...

Signal emitted when the adapter is disposed.

Signal emitted when an editor is changed.

_editorRemoved: Signal<WidgetLSPAdapter<T>, IEditorChangedData> = ...

Signal emitted when an editor is removed.

widget: T

Accessors

Methods

  • Opens a connection for the document. The connection may or may not be initialized, yet, and depending on when this is called, the client may not be fully connected.

    Parameters

    • virtualDocument: VirtualDocument

      a VirtualDocument

    • sendOpen: boolean = false

      whether to open the document immediately

    Returns Promise<void>

  • Get the index of editor from the cursor position in the virtual document.

    Parameters

    Returns number

    • index of the virtual editor

    This is error-prone and will be removed in JupyterLab 5.0, use getEditorIndex() with virtualDocument.getEditorAtVirtualLine(position) instead.