From 88632253f913f32f59059af6f5774a6122db961b Mon Sep 17 00:00:00 2001 From: krassowski <5832902+krassowski@users.noreply.github.com> Date: Thu, 5 Oct 2023 21:47:31 +0100 Subject: [PATCH 1/9] Bump version to 5.0.0 --- packages/jupyterlab-lsp/package.json | 2 +- packages/metapackage/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/jupyterlab-lsp/package.json b/packages/jupyterlab-lsp/package.json index dd7a6dc25..bce458179 100644 --- a/packages/jupyterlab-lsp/package.json +++ b/packages/jupyterlab-lsp/package.json @@ -1,6 +1,6 @@ { "name": "@jupyter-lsp/jupyterlab-lsp", - "version": "5.0.0-rc.1", + "version": "5.0.0", "description": "Language Server Protocol integration for JupyterLab", "keywords": [ "jupyter", diff --git a/packages/metapackage/package.json b/packages/metapackage/package.json index 355ac623e..e7199aaab 100644 --- a/packages/metapackage/package.json +++ b/packages/metapackage/package.json @@ -1,6 +1,6 @@ { "name": "@jupyter-lsp/jupyterlab-lsp-metapackage", - "version": "5.0.0-rc.1", + "version": "5.0.0", "description": "JupyterLab LSP - Meta Package. All of the packages used by JupyterLab LSP", "homepage": "https://github.com/jupyter-lsp/jupyterlab-lsp", "bugs": { From ae819607691f2948489e313cb8edae016e0399f3 Mon Sep 17 00:00:00 2001 From: krassowski <5832902+krassowski@users.noreply.github.com> Date: Thu, 5 Oct 2023 21:47:46 +0100 Subject: [PATCH 2/9] Update extending documentation --- docs/Extending.ipynb | 121 +++++++++++++++---------------------------- 1 file changed, 42 insertions(+), 79 deletions(-) diff --git a/docs/Extending.ipynb b/docs/Extending.ipynb index 63f0bd806..4cddc4d3c 100644 --- a/docs/Extending.ipynb +++ b/docs/Extending.ipynb @@ -11,8 +11,6 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "> Note: the API is likely to change in the future; your suggestions are welcome!\n", - "\n", "### How to add a new LSP feature?\n", "\n", "Features (as well as other parts of the frontend) reuse the\n", @@ -20,91 +18,36 @@ "Each plugin is a [TypeScript](https://www.typescriptlang.org/) package exporting\n", "one or more `JupyterFrontEndPlugin`s (see\n", "[the JupyterLab extesion developer tutorial](https://jupyterlab.readthedocs.io/en/stable/extension/extension_tutorial.html)\n", - "for an overview). Each feature has to register itself with the `FeatureManager`\n", - "(which is provided after requesting `ILSPFeatureManager` token) using\n", + "for an overview).\n", + "\n", + "Each feature has to register itself with the `FeatureManager`\n", + "(which is provided after requesting `ILSPFeatureManager` token from `@jupyterlab/lsp`) using\n", "`register(options: IFeatureOptions)` method.\n", "\n", - "Your feature specification should follow the `IFeature` interface, which can be\n", - "divided into three major parts:\n", + "The feature specification should follow the `IFeature` interface as of JupyterLab 4.0, including:\n", "\n", - "- `editorIntegrationFactory`: constructors for the feature-CodeEditor\n", - " integrators (implementing the `IFeatureEditorIntegration` interface), one for\n", - " each supported CodeEditor (e.g. CodeMirror or Monaco); for CodeMirror\n", - " integration you can base your feature integration on the abstract\n", - " `CodeMirrorIntegration` class.\n", - "- `labIntegration`: an optional object integrating feature with the JupyterLab\n", - " interface\n", + "- `id`: unique identifier of the feature, we recommend `@organization/project:feature` pattern\n", "- `capabilities`: an optional object defining the [client\n", " capabilities][clientcapabilities] implemented by your feature,\n", - "- optional fields for easy integration of some of the common JupyterLab systems,\n", - " such as:\n", - " - settings system\n", - " - commands system (including context menu)\n", "\n", - "For further integration with the JupyterLab, you can request additional\n", - "JupyterLab tokens (consult JupyterLab documentation on\n", - "[core tokens](https://jupyterlab.readthedocs.io/en/stable/extension/extension_points.html#core-tokens)).\n", + "See JupyterLab [Extension Points >> LSP Features](https://jupyterlab.readthedocs.io/en/latest/extension/extension_points.html#lsp-features) documentation for more details.\n", "\n", "#### How to override the default implementation of a feature?\n", "\n", - "You can specify a list of extensions to be disabled the the feature manager\n", - "passing their plugin identifiers in `supersedes` field of `IFeatureOptions`.\n", + "You can specify a list of plugins implementing features which you want to\n", + "disable in [`jupyterlab.disabledExtensions`][disabledExtensions] stanza of `package.json`, for example:\n", + "\n", + "```json\n", + "\"jupyterlab\": {\n", + " \"disabledExtensions\": [\"@jupyter-lsp/jupyterlab-lsp:hover\"]\n", + "}\n", + "```\n", + "\n", + "will disable the hover feature.\n", "\n", "[clientCapabilities]:\n", - "https://microsoft.github.io/language-server-protocol/specifications/specification-3-17/#clientCapabilities]" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### How to integrate a new code editor implementation?\n", - "\n", - "`CodeMirrorEditor` code editor is supported by default, but any JupyterLab\n", - "editor implementing the `CodeEditor.IEditor` interface can be adapted for the\n", - "use with the LSP extension. To add your custom code editor (e.g. Monaco) after\n", - "implementing a `CodeEditor.IEditor` interface wrapper (which you would have\n", - "anyways for the JupyterLab integration), you need to also implement a virtual\n", - "editor (`IVirtualEditor` interface) for it.\n", - "\n", - "#### Why virtual editor?\n", - "\n", - "The virtual editor takes multiple instances of your editor (e.g. in a notebook)\n", - "and makes them act like a single editor. For example, when \"onKeyPress\" event is\n", - "bound on the VirtualEditor instance, it should be bound onto each actual code\n", - "editor; this allows the features to be implemented without the knowledge about\n", - "the number of editor instances on the page.\n", - "\n", - "#### How to register the implementation?\n", - "\n", - "A `virtualEditorManager` will be provided if you request\n", - "`ILSPVirtualEditorManager` token; use\n", - "`registerEditorType(options: IVirtualEditorType)` method passing a name\n", - "that you will also use to identify the code editor, the editor class, and your\n", - "VirtualEditor constructor." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### How to integrate a new `DocumentWidget`?\n", - "\n", - "JupyterLab editor widgets (such as _Notebook_ or _File Editor_) implement\n", - "`IDocumentWidget` interface. Each such widget has to adapted by a\n", - "`WidgetAdapter` to enable its use with the LSP extension. The role of the\n", - "`WidgetAdapter` is to extract the document metadata (language, mimetype) and the\n", - "underlying code editor (e.g. CodeMirror or Monaco) instances so that other parts\n", - "of the LSP extension can interface with them without knowing about the\n", - "implementation details of the DocumentWidget (or even about the existence of a\n", - "Notebook construct!).\n", - "\n", - "Your custom `WidgetAdapter` implementation has to register itself with\n", - "`WidgetAdapterManager` (which can be requested with `ILSPAdapterManager` token),\n", - "calling `registerAdapterType(options: IAdapterTypeOptions)` method. Among the\n", - "options, in addition to the custom `WidgetAdapter`, you need to provide a\n", - "tracker (`IWidgetTracker`) which will notify the extension via a signal when a\n", - "new instance of your document widget is getting created." + "https://microsoft.github.io/language-server-protocol/specifications/specification-3-17/#clientCapabilities]\n", + "[disabledExtensions]: https://jupyterlab.readthedocs.io/en/latest/extension/extension_dev.html#disabling-other-extensions" ] }, { @@ -120,8 +63,8 @@ "\n", "#### Future plans for transclusions handling\n", "\n", - "We will strive to make it possible for kernels to register their custom\n", - "syntax/code transformations easily, but the frontend API will remain available\n", + "We welcome pull requests enabling kernels to register their custom\n", + "syntax/code transformations. The frontend API will remain available\n", "for the end-users who write their custom syntax modifications with actionable\n", "side-effects (e.g. a custom IPython magic which copies a variable from the host\n", "document to the embedded document)." @@ -166,6 +109,26 @@ "[theme-vscode](https://github.com/jupyter-lsp/jupyterlab-lsp/tree/master/packages/theme-vscode)." ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Migrating to v5.0" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "- `IFeature` interface was moved to `@jupyterlab/lsp`\n", + " - `labIntegration` was removed,\n", + " - `editorIntegrationFactory` was removed in JupyterLab 4.0 and restored in JupyterLab 4.1 as `extensionFactory` with new API (`ILSPEditorExtensionFactory`),\n", + " - `supersedes` was removed; you can disable extensions using the JupyterLab native `jupyterlab.disabledExtensions` stanza of `package.json`.\n", + "- `ILSPCompletionThemeManager`:\n", + " - `register_theme()` was renamed to `registerTheme()`\n", + " - all other methods were renamed to follow camelCase convention\n" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -306,7 +269,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.9" + "version": "3.11.4" }, "widgets": { "application/vnd.jupyter.widget-state+json": { From 644f03e59d894a41bb79cdebf5552d6c8b0e487e Mon Sep 17 00:00:00 2001 From: krassowski <5832902+krassowski@users.noreply.github.com> Date: Thu, 5 Oct 2023 21:56:56 +0100 Subject: [PATCH 3/9] Update releasing --- docs/Releasing.ipynb | 39 +++------------------------------------ 1 file changed, 3 insertions(+), 36 deletions(-) diff --git a/docs/Releasing.ipynb b/docs/Releasing.ipynb index 5d360dbaf..551c27770 100644 --- a/docs/Releasing.ipynb +++ b/docs/Releasing.ipynb @@ -28,53 +28,20 @@ "python scripts/integrity.py\n", "```\n", "\n", - "- TODO: create a `release.py` script\n", - " [#88](https://github.com/jupyter-lsp/jupyterlab-lsp/issues/88)\n", - "\n", - "The PyPI version (jupyter-lsp) must be updated in the following places:\n", - "\n", - "- `python_packages/jupyter_lsp/jupyter_lsp/_version.py` (canonical)\n", - "- `.github/workflows/job.test.yml`\n", - "- `CHANGELOG.md`\n", - "\n", - "The npm version of `jupyterlab-lsp` must be updated in the following places:\n", - "\n", - "- `packages/jupyterlab-lsp/package.json` > `version` (canonical)\n", - "- `.github/workflows/job.test.yml`\n", - "- `packages/metapackage/package.json`\n", - "- `CHANGELOG.md`\n", - "\n", - "The npm version of `lsp-ws-connection` must be updated in the following places:\n", - "\n", - "- `packages/lsp-ws-connection/package.json` > `version` (canonical)\n", - "- `packages/jupyterlab-lsp/package.json`\n", - "- `CHANGELOG.md`\n", - "\n", - "The JupyterLab version (if a newer is supported or required) needs to be updated\n", - "in:\n", - "\n", - "- `packages/jupyterlab-lsp/package.json` > `devDependencies` >\n", - " `@jupyterlab/application` (canonical)\n", - "- `binder/environment.yml`\n", - "- `requirements/lab.txt`\n", - "- `.github/workflows/job.test.yml`\n", - "- `README.md`" + "This repository does not yet support `jupyter-releaser` but pull requests are welcome!" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "### Releasing:\n", + "### Publishing\n", "\n", "> Note: \"smoke source install\" step on CI will fail when bumping internal\n", "> dependencies until those are published on NPM. Make sure to release those\n", "> first and re-run this check then.\n", "\n", "```bash\n", - "cd packages/lsp-ws-connection\n", - "npm publish --access public\n", - "cd -\n", "cd packages/completion-theme\n", "npm publish --access public\n", "cd -\n", @@ -108,7 +75,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.9" + "version": "3.11.4" }, "widgets": { "application/vnd.jupyter.widget-state+json": { From d4406f479ed96a4f08e0afcb2652f229b634c24c Mon Sep 17 00:00:00 2001 From: krassowski <5832902+krassowski@users.noreply.github.com> Date: Thu, 5 Oct 2023 22:00:24 +0100 Subject: [PATCH 4/9] Remove docker mention as it does not work two releases back also remove placeholders for other environment managers, even if someone did open a PR the interest is apparently low and would likely fall outdated at some point. --- docs/Installation.ipynb | 109 ++-------------------------------------- 1 file changed, 3 insertions(+), 106 deletions(-) diff --git a/docs/Installation.ipynb b/docs/Installation.ipynb index a5f6775d8..052af6cf7 100644 --- a/docs/Installation.ipynb +++ b/docs/Installation.ipynb @@ -146,11 +146,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "tags": [ - "remove-input" - ] - }, + "metadata": {}, "outputs": [], "source": [ "%%markdown\n", @@ -168,94 +164,6 @@ "Your browser should open to your local server." ] }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### docker (data science)\n", - "\n", - "This approach is based roughly on the\n", - "[Jupyter docker-stacks documentation](https://github.com/jupyter/docker-stacks/tree/master/examples/docker-compose/notebook),\n", - "which should be consulted for more about connecting volumes, passwords, and\n", - "other advanced features:\n", - "\n", - "> Note: docker instructions were **not** updated for JupyterLab 3.0 and\n", - "> extension 3.0. Please consider submitting a PR to fix it." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##### `Dockerfile`" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "tags": [ - "remove-input" - ] - }, - "outputs": [], - "source": [ - "%%markdown\n", - "\n", - "```dockerfile\n", - "# This already contains the python, r, julia, latex, and nodejs runtimes\n", - "FROM jupyter/datascience-notebook@sha256:73a577b006b496e1a1c02f5be432f4aab969c456881c4789e0df77c89a0a60c2\n", - "\n", - "RUN conda install --quiet --yes --freeze-installed -c conda-forge \\\n", - " 'python-language-server' \\\n", - " 'jupyterlab={JUPYTERLAB_VERSION}' \\\n", - " 'r-languageserver' \\\n", - " 'texlab' \\\n", - " 'chktex' \\\n", - " 'jupyter-lsp={JUPYTER_LSP_VERSION}' \\\n", - " && jupyter labextension install --no-build \\\n", - " '@jupyter-lsp/jupyterlab-lsp@{JUPYTERLAB_LSP_VERSION}' \\\n", - " && jupyter lab build --dev-build=False --minimize=True \\\n", - " && conda clean --all -f -y \\\n", - " && rm -rf \\\n", - " $CONDA_DIR/share/jupyter/lab/staging \\\n", - " /home/$NB_USER/.cache/yarn \\\n", - " && fix-permissions $CONDA_DIR \\\n", - " && fix-permissions /home/$NB_USER\n", - "```" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##### `docker-compose.yml`\n", - "\n", - "```yaml\n", - "version: '2'\n", - "\n", - "services:\n", - " lsp-lab:\n", - " build: .\n", - " ports:\n", - " - '18888:8888'\n", - "```" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "##### Build and Start\n", - "\n", - "```bash\n", - "docker-compose up\n", - "```\n", - "\n", - "You should now be able to access `http://localhost:18888/lab`, using the `token`\n", - "provided in the log." - ] - }, { "cell_type": "markdown", "metadata": {}, @@ -273,23 +181,12 @@ "[JupyterLab Installation Documentation](https://jupyterlab.readthedocs.io/en/stable/getting_started/installation.html)\n", "for your installation approach.\n", "\n", - "| pip | conda | pipenv | poetry | `*` |\n", - "| -------------- | ---------------- | ------ | ------ | --- |\n", - "| [lab][lab-pip] | [lab][lab-conda] | `*` | `*` | `*` |\n", - "\n", - "> `*` PRs welcome!\n", - "\n", "Verify your lab works:\n", "\n", "```bash\n", "jupyter lab --version\n", "jupyter lab\n", - "```\n", - "\n", - "[lab-conda]:\n", - " https://jupyterlab.readthedocs.io/en/stable/getting_started/installation.html#conda\n", - "[lab-pip]:\n", - " https://jupyterlab.readthedocs.io/en/stable/getting_started/installation.html#pip" + "```" ] }, { @@ -376,7 +273,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.9" + "version": "3.11.4" } }, "nbformat": 4, From a81b8232aad990b7b9ce60cd6ef9b3c4f55e557f Mon Sep 17 00:00:00 2001 From: krassowski <5832902+krassowski@users.noreply.github.com> Date: Thu, 5 Oct 2023 22:03:13 +0100 Subject: [PATCH 5/9] Multiple jump targets are now supported --- docs/Roadmap.ipynb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/Roadmap.ipynb b/docs/Roadmap.ipynb index 959f05230..5abd29b66 100644 --- a/docs/Roadmap.ipynb +++ b/docs/Roadmap.ipynb @@ -15,18 +15,18 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Front End\n", + "### Frontend\n", "\n", - "- improved code navigation when there are multiple jump targets\n", - "- system of settings, including options:\n", - " - to change the verbosity of signature documentation hints (number of lines to\n", + "> If you would like to help with any item please open an issue to discuss (or directly open pull request if it is a small enhancement)\n", + "\n", + "- settings enhancements, including:\n", + " - options to change the verbosity of signature documentation hints (number of lines to\n", " be shown)\n", " - custom foreign extractors allowing to customize behaviour for magics\n", "- code actions (allowing to \"quick fix\" a typo, etc.)\n", "- code formatting\n", "- gutter with linter results\n", - "- use the kernel session for autocompletion in FileEditor if available (PR\n", - " welcome)" + "- use the kernel session for autocompletion in `FileEditor` if available" ] }, { @@ -58,7 +58,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.9" + "version": "3.11.4" }, "widgets": { "application/vnd.jupyter.widget-state+json": { From 72a198d12a339d66c76fe7968270ab3091d18cf9 Mon Sep 17 00:00:00 2001 From: krassowski <5832902+krassowski@users.noreply.github.com> Date: Thu, 5 Oct 2023 22:09:01 +0100 Subject: [PATCH 6/9] Update branch name, collapse proposals to a list no one populated the `TBD` for so long, no reason to keep it like this --- docs/Architecture.ipynb | 60 +++++++---------------------------------- 1 file changed, 10 insertions(+), 50 deletions(-) diff --git a/docs/Architecture.ipynb b/docs/Architecture.ipynb index c423041ee..9ec456352 100644 --- a/docs/Architecture.ipynb +++ b/docs/Architecture.ipynb @@ -37,7 +37,7 @@ "source": [ "### As-Is\n", "\n", - "These are how we _think_ everything works in the current `master` branch." + "These are how we _think_ everything works in the current `main` branch." ] }, { @@ -103,54 +103,14 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "#### Reorganize client source with lerna and typescript projects [#76][]\n", - "\n", - "> TBD\n", - "\n", - "[#76]: https://github.com/jupyter-lsp/jupyterlab-lsp/issues/76" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Add DiagnosticsManager, refactor DiagnosticPanel [#176][]\n", - "\n", - "> TBD\n", - "\n", - "[#176]: https://github.com/jupyter-lsp/jupyterlab-lsp/issues/176" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Multiple sources of LSP messages on frontend and backend [#184][]\n", - "\n", - "> TBD\n", - "\n", - "[#184]: https://github.com/jupyter-lsp/jupyterlab-lsp/issues/184" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Use mime types from server spec for language detection [#190][]\n", - "\n", - "> TBD\n", - "\n", - "[#190]: https://github.com/jupyter-lsp/jupyterlab-lsp/issues/190" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Formalize and extend language transclusion [#191][]\n", - "\n", - "> TBD\n", - "\n", + "- Reorganize client source with lerna and typescript projects [#76][]\n", + "- Add DiagnosticsManager, refactor DiagnosticPanel [#176][]\n", + "- Multiple sources of LSP messages on frontend and backend [#184][]\n", + "- Formalize and extend language transclusion [#191][]\n", + "\n", + "[#76]: https://github.com/jupyter-lsp/jupyterlab-lsp/issues/76\n", + "[#176]: https://github.com/jupyter-lsp/jupyterlab-lsp/issues/176\n", + "[#184]: https://github.com/jupyter-lsp/jupyterlab-lsp/issues/184\n", "[#191]: https://github.com/jupyter-lsp/jupyterlab-lsp/issues/191" ] } @@ -171,7 +131,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.9" + "version": "3.11.4" }, "widgets": { "application/vnd.jupyter.widget-state+json": { From 185233a5cc6c6d9ffede8918572d743f9ba07232 Mon Sep 17 00:00:00 2001 From: krassowski <5832902+krassowski@users.noreply.github.com> Date: Thu, 5 Oct 2023 22:22:04 +0100 Subject: [PATCH 7/9] Update branch name in CONTRIBUTING, adjust logging and headers --- CONTRIBUTING.md | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 01eaee9eb..5694f000a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,11 +21,11 @@ You can contribute to the project through: Thank you for all your contributions :heart: -[license]: https://github.com/jupyter-lsp/jupyterlab-lsp/blob/master/LICENSE +[license]: https://github.com/jupyter-lsp/jupyterlab-lsp/blob/main/LICENSE [extending]: ./docs/Extending.html [roadmap]: ./docs/Roadmap.html [jupyterlab-lsp]: https://github.com/jupyter-lsp/jupyterlab-lsp.git -[code-of-conduct]: https://github.com/jupyter/governance/blob/master/conduct/code_of_conduct.md +[code-of-conduct]: https://github.com/jupyter/governance/blob/main/conduct/code_of_conduct.md ### Set up the environment @@ -52,7 +52,7 @@ pip install -r requirements/dev.txt # in a virtualenv, probably sudo apt-get install nodejs # ... e.g. on debian/ubuntu ``` -#### The Easy Way +#### Single-step installation Once your environment is created and activated, on Linux/OSX you can run: @@ -62,7 +62,10 @@ bash binder/postBuild This performs all the basic setup steps, and is used for the binder demo. -#### The Hard Way +This approach may not always work. Continue reading for a step-by-step +instructions which also show all the underlying pieces. + +#### Manual installation Install `jupyter-lsp` from source in your virtual environment: @@ -378,25 +381,25 @@ The spec should only be advertised if the command _could actually_ be run: otherwise an empty dictionary (`{}`) should be returned. -[built-in specs]: https://github.com/jupyter-lsp/jupyterlab-lsp/tree/master/python_packages/jupyter_lsp/jupyter_lsp/specs -[setup.cfg]: https://github.com/jupyter-lsp/jupyterlab-lsp/blob/master/python_packages/jupyter_lsp/setup.cfg -[schema]: https://github.com/jupyter-lsp/jupyterlab-lsp/blob/master/python_packages/jupyter_lsp/jupyter_lsp/schema/schema.json -[utilities]: https://github.com/jupyter-lsp/jupyterlab-lsp/blob/master/python_packages/jupyter_lsp/jupyter_lsp/specs/utils.py +[built-in specs]: https://github.com/jupyter-lsp/jupyterlab-lsp/tree/main/python_packages/jupyter_lsp/jupyter_lsp/specs +[setup.cfg]: https://github.com/jupyter-lsp/jupyterlab-lsp/blob/main/python_packages/jupyter_lsp/setup.cfg +[schema]: https://github.com/jupyter-lsp/jupyterlab-lsp/blob/main/python_packages/jupyter_lsp/jupyter_lsp/schema/schema.json +[utilities]: https://github.com/jupyter-lsp/jupyterlab-lsp/blob/main/python_packages/jupyter_lsp/jupyter_lsp/specs/utils.py ##### Common Concerns - some language servers need to have their connection mode specified - the `stdio` interface is the only one supported by `jupyter_lsp` - PRs welcome to support other modes! -- because of its VSCode heritage, many language servers use `nodejs` +- many language servers use `nodejs` - `LanguageServerManager.nodejs` will provide the location of our best guess at where a user's `nodejs` might be found - some language servers are hard to start purely from the command line - use a helper script to encapsulate some complexity, or - - use a command argument of the interpreter is available (see the [r spec][] and [julia spec] for examples) + - use a `command` argument of the interpreter is available (see the [r spec][] and [julia spec] for examples) -[r spec]: https://github.com/jupyter-lsp/jupyterlab-lsp/blob/master/python_packages/jupyter_lsp/jupyter_lsp/specs/r_languageserver.py -[julia spec]: https://github.com/jupyter-lsp/jupyterlab-lsp/blob/master/python_packages/jupyter_lsp/jupyter_lsp/specs/julia_language_server.py +[r spec]: https://github.com/jupyter-lsp/jupyterlab-lsp/blob/main/python_packages/jupyter_lsp/jupyter_lsp/specs/r_languageserver.py +[julia spec]: https://github.com/jupyter-lsp/jupyterlab-lsp/blob/main/python_packages/jupyter_lsp/jupyter_lsp/specs/julia_language_server.py ##### Example: making a pip-installable `cool-language-server` spec @@ -462,7 +465,11 @@ python setup.py sdist bdist_wheel ## Debugging -Adjust `loggingLevel` in the `Advanced Settings Editor` -> `Language Server` to see more log messages. +To see more see more log messages navigate to `Settings` ❯ `Settings Editor` ❯ `Language Servers` and adjust: + +- adjust `Logging console verbosity level` +- switch `Ask servers to send trace notifications` to `verbose` +- toggle `Log all LSP communication with the LSP servers` For robot tests set: From ceafef5a06979682a46cda430ea7bde11540cf83 Mon Sep 17 00:00:00 2001 From: krassowski <5832902+krassowski@users.noreply.github.com> Date: Thu, 5 Oct 2023 22:24:33 +0100 Subject: [PATCH 8/9] Update changelog --- CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ec3ce330..7046531b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ ## Changelog +### `@jupyter-lsp/jupyterlab-lsp 5.0.0` + +- enhancements: + - uses toast notifications instead of messages on status bar + - diagnostics panel will be re-opened on reload +- maintenance: + - support JupyterLab 4 + - use upstream `@jupyterlab/lsp` package + - use camelCase convention in TypeScript/JavaScript code + - use `@codemirror/linter` to show diagnostics + - this comes with a different style of underlines and custom tooltips + +Requires JupyterLab `>=4.0.6,<5.0.0a0` + ### `@jupyter-lsp/jupyterlab-lsp 5.0.0-rc.1` - restore re-use of unused standalone connections From 27177c524abc5e5dd0e07f87c0747a4ad893036a Mon Sep 17 00:00:00 2001 From: krassowski <5832902+krassowski@users.noreply.github.com> Date: Thu, 5 Oct 2023 22:38:17 +0100 Subject: [PATCH 9/9] Outdated docker instructions are no more (PRs welcome) --- scripts/integrity.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/integrity.py b/scripts/integrity.py index f57d18fd2..a23adef8a 100644 --- a/scripts/integrity.py +++ b/scripts/integrity.py @@ -193,7 +193,6 @@ def test_changelog_versions(pkg, version): @pytest.mark.parametrize( "pkg,sep,version,expected", [ - [PY_SERVER_NAME, "=", PY_SERVER_VERSION, 1], # TODO: update docker instructions [ PY_SERVER_NAME, "==", @@ -201,7 +200,6 @@ def test_changelog_versions(pkg, version): 0, ], # zero because jupyterlab-lsp is good enough [PY_SERVER_NAME + "-python", "=", PY_SERVER_VERSION, 1], - [JS_LSP_NAME, "@", JS_LSP_VERSION, 1], # TODO: update docker instructions [PY_FRONT_NAME, "=", JS_LSP_VERSION, 2], # conda install [PY_FRONT_NAME, "==", JS_LSP_VERSION, 1], # pip install ],