diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 95cf7ebb1..9501152bf 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -12,7 +12,7 @@ variables: PYTHONUNBUFFERED: 1 YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn PY_JLSP_VERSION: 0.6.0b0 - JS_JLLSP_VERSION: 0.5.0 + JS_JLLSP_VERSION: 0.6.0 jobs: - template: ci/job.test.yml diff --git a/package.json b/package.json index 650423b93..e5a2e9a1c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@krassowski/jupyterlab-lsp", - "version": "0.5.0", + "version": "0.6.0", "description": "Language Server Protocol integration for JupyterLab", "keywords": [ "jupyter", diff --git a/src/adapters/jupyterlab/jl_adapter.ts b/src/adapters/jupyterlab/jl_adapter.ts index d36ebf300..f19340d46 100644 --- a/src/adapters/jupyterlab/jl_adapter.ts +++ b/src/adapters/jupyterlab/jl_adapter.ts @@ -81,7 +81,7 @@ export abstract class JupyterLabWidgetAdapter >; protected abstract current_completion_connector: LSPConnector; private _tooltip: FreeTooltip; - protected connection_manager: DocumentConnectionManager; + public connection_manager: DocumentConnectionManager; protected constructor( protected app: JupyterFrontEnd, @@ -189,6 +189,10 @@ export abstract class JupyterLabWidgetAdapter this.connection_manager.connect_document_signals(virtual_document); virtual_document.changed.connect(this.document_changed.bind(this)); await this.connect(virtual_document).catch(console.warn); + + virtual_document.foreign_document_opened.connect((host, context) => { + this.connect(context.foreign_document).catch(console.warn); + }); } document_changed(virtual_document: VirtualDocument) {