|
1 | 1 | { |
2 | 2 | "cells": [ |
| 3 | + { |
| 4 | + "cell_type": "code", |
| 5 | + "execution_count": null, |
| 6 | + "metadata": { |
| 7 | + "hide_input": true |
| 8 | + }, |
| 9 | + "outputs": [], |
| 10 | + "source": [ |
| 11 | + "from markdown import markdown\n", |
| 12 | + "import sys\n", |
| 13 | + "sys.path.insert(0, '..')\n", |
| 14 | + "from versions import (\n", |
| 15 | + " JUPYTER_LSP_VERSION,\n", |
| 16 | + " JUPYTERLAB_LSP_VERSION,\n", |
| 17 | + " JUPYTERLAB_NEXT_MAJOR_VERSION,\n", |
| 18 | + " JUPYTERLAB_VERSION,\n", |
| 19 | + " REQUIRED_JUPYTERLAB\n", |
| 20 | + ")" |
| 21 | + ] |
| 22 | + }, |
3 | 23 | { |
4 | 24 | "cell_type": "markdown", |
5 | 25 | "metadata": {}, |
|
8 | 28 | ] |
9 | 29 | }, |
10 | 30 | { |
11 | | - "cell_type": "markdown", |
12 | | - "metadata": {}, |
| 31 | + "cell_type": "code", |
| 32 | + "execution_count": null, |
| 33 | + "metadata": { |
| 34 | + "hide_input": true |
| 35 | + }, |
| 36 | + "outputs": [], |
13 | 37 | "source": [ |
| 38 | + "%%markdown\n", |
14 | 39 | "### Please Read This First\n", |
15 | 40 | "\n", |
16 | 41 | "Delivering LSP features to your JupyterLab **requires** three pieces:\n", |
|
28 | 53 | "- runs in your browser, as an extension to JupyterLab\n", |
29 | 54 | "- to install it, you need:\n", |
30 | 55 | " - `nodejs >8`\n", |
31 | | - " - `jupyterlab >=1.1,<2`\n", |
| 56 | + " - `jupyterlab {REQUIRED_JUPYTERLAB}`\n", |
32 | 57 | "\n", |
33 | 58 | "#### Language Servers\n", |
34 | 59 | "\n", |
|
49 | 74 | ] |
50 | 75 | }, |
51 | 76 | { |
52 | | - "cell_type": "markdown", |
53 | | - "metadata": {}, |
| 77 | + "cell_type": "code", |
| 78 | + "execution_count": null, |
| 79 | + "metadata": { |
| 80 | + "hide_input": true |
| 81 | + }, |
| 82 | + "outputs": [], |
54 | 83 | "source": [ |
| 84 | + "%%markdown\n", |
55 | 85 | "#### conda (minimal python)\n", |
56 | 86 | "\n", |
57 | 87 | "```bash\n", |
58 | | - "conda create -c conda-forge -n lsp 'python >=3.7,<3.8' 'jupyterlab=1.2' 'nodejs>8' python-language-server\n", |
| 88 | + "conda create -c conda-forge -n lsp 'python >=3.7,<3.8' 'jupyterlab={JUPYTERLAB_VERSION}' 'nodejs>8' python-language-server\n", |
59 | 89 | "# Also consider: r-languageserver [*]\n", |
60 | 90 | "source activate lsp\n", |
61 | | - "python -m pip install 'jupyter-lsp=0.8.0' --no-deps\n", |
62 | | - "jupyter labextension install '@krassowski/jupyterlab-lsp@1.0.0'\n", |
| 91 | + "python -m pip install 'jupyter-lsp={JUPYTER_LSP_VERSION}' --no-deps\n", |
| 92 | + "jupyter labextension install '@krassowski/jupyterlab-lsp@{JUPYTERLAB_LSP_VERSION}'\n", |
63 | 93 | "```\n", |
64 | 94 | "\n", |
65 | 95 | "Then run\n", |
|
84 | 114 | ] |
85 | 115 | }, |
86 | 116 | { |
87 | | - "cell_type": "markdown", |
88 | | - "metadata": {}, |
| 117 | + "cell_type": "code", |
| 118 | + "execution_count": null, |
| 119 | + "metadata": { |
| 120 | + "hide_input": true |
| 121 | + }, |
| 122 | + "outputs": [], |
89 | 123 | "source": [ |
| 124 | + "%%markdown\n", |
90 | 125 | "##### `Dockerfile`\n", |
91 | 126 | "\n", |
92 | 127 | "```dockerfile\n", |
|
95 | 130 | "\n", |
96 | 131 | "RUN conda install --quiet --yes --freeze-installed \\\n", |
97 | 132 | " 'python-language-server' \\\n", |
98 | | - " 'jupyterlab=2' \\\n", |
| 133 | + " 'jupyterlab=2.1' \\\n", |
99 | 134 | " 'r-languageserver' \\\n", |
100 | 135 | " && python3 -m pip install --no-cache-dir --no-deps \\\n", |
101 | | - " 'jupyter-lsp=0.8.0' \\\n", |
| 136 | + " 'jupyter-lsp={JUPYTER_LSP_VERSION}' \\\n", |
102 | 137 | " && jupyter labextension install --no-build \\\n", |
103 | | - " '@krassowski/jupyterlab-lsp@1.0.0' \\\n", |
| 138 | + " '@krassowski/jupyterlab-lsp@{JUPYTERLAB_LSP_VERSION}' \\\n", |
104 | 139 | " && jupyter lab build --dev-build=False --minimize=True \\\n", |
105 | 140 | " && conda clean --all -f -y \\\n", |
106 | 141 | " && rm -rf \\\n", |
|
202 | 237 | ] |
203 | 238 | }, |
204 | 239 | { |
205 | | - "cell_type": "markdown", |
206 | | - "metadata": {}, |
| 240 | + "cell_type": "code", |
| 241 | + "execution_count": null, |
| 242 | + "metadata": { |
| 243 | + "hide_input": true |
| 244 | + }, |
| 245 | + "outputs": [], |
207 | 246 | "source": [ |
| 247 | + "%%markdown\n", |
208 | 248 | "#### Install Jupyter[Lab] LSP\n", |
209 | 249 | "\n", |
210 | 250 | "```bash\n", |
211 | | - "pip install jupyter-lsp=0.8.0\n", |
212 | | - "jupyter labextension install @krassowski/jupyterlab-lsp@1.0.0\n", |
| 251 | + "pip install jupyter-lsp={JUPYTER_LSP_VERSION}\n", |
| 252 | + "jupyter labextension install @krassowski/jupyterlab-lsp@{JUPYTERLAB_LSP_VERSION}\n", |
213 | 253 | "```" |
214 | 254 | ] |
215 | 255 | }, |
|
245 | 285 | "name": "python", |
246 | 286 | "nbconvert_exporter": "python", |
247 | 287 | "pygments_lexer": "ipython3", |
248 | | - "version": "3.7.6" |
| 288 | + "version": "3.7.5" |
249 | 289 | } |
250 | 290 | }, |
251 | 291 | "nbformat": 4, |
|
0 commit comments