|
15 | 15 | "\n",
|
16 | 16 | "Delivering LSP features to your JupyterLab **requires** three pieces:\n",
|
17 | 17 | "\n",
|
18 |
| - "- `jupyter_lsp` \n", |
19 |
| - " - runs in your `notebook` web application on your server\n", |
20 |
| - " - to run, you need: \n", |
21 |
| - " - `python >=3.5`\n", |
22 |
| - " - `notebook >=4.3`\n", |
23 |
| - "- `jupyterlab-lsp` \n", |
24 |
| - " - runs in your browser\n", |
25 |
| - " - to install it, you need:\n", |
26 |
| - " - `nodejs >8`\n", |
27 |
| - " - `jupyterlab >=1.1,<2`\n", |
| 18 | + "- `jupyter_lsp`\n", |
| 19 | + " - runs in your `notebook` web application on your server\n", |
| 20 | + " - to run, you need:\n", |
| 21 | + " - `python >=3.5`\n", |
| 22 | + " - `notebook >=4.3`\n", |
| 23 | + "- `jupyterlab-lsp`\n", |
| 24 | + " - runs in your browser\n", |
| 25 | + " - to install it, you need:\n", |
| 26 | + " - `nodejs >8`\n", |
| 27 | + " - `jupyterlab >=1.1,<2`\n", |
28 | 28 | "- one or more language servers\n",
|
29 |
| - " - run on your server\n", |
30 |
| - " - some can be automatically [detected](./Language%20Servers.ipynb) if installed\n", |
31 |
| - " - others also need to be [configured](./Configuring.ipynb#language_servers)" |
| 29 | + " - run on your server\n", |
| 30 | + " - some can be automatically [detected](./Language%20Servers.ipynb) if\n", |
| 31 | + " installed\n", |
| 32 | + " - others also need to be [configured](./Configuring.ipynb#language_servers)" |
32 | 33 | ]
|
33 | 34 | },
|
34 | 35 | {
|
35 | 36 | "cell_type": "markdown",
|
36 | 37 | "metadata": {},
|
37 | 38 | "source": [
|
38 | 39 | "### Fast Paths\n",
|
39 |
| - "Here are two approches based on Jupyter documentation. If these do not meet your needs, try [The Harder Way](#The-Harder-Way)." |
| 40 | + "\n", |
| 41 | + "Here are two approches based on Jupyter documentation. If these do not meet your\n", |
| 42 | + "needs, try [The Harder Way](#The-Harder-Way)." |
40 | 43 | ]
|
41 | 44 | },
|
42 | 45 | {
|
43 | 46 | "cell_type": "markdown",
|
44 | 47 | "metadata": {},
|
45 | 48 | "source": [
|
46 | 49 | "#### conda (minimal python)\n",
|
| 50 | + "\n", |
47 | 51 | "```bash\n",
|
48 | 52 | "conda create -c conda-forge -n lsp 'python >=3.7,<3.8' 'jupyterlab=1.2' 'nodejs=11' python-language-server\n",
|
49 | 53 | "# Also consider: r-languageserver [*]\n",
|
50 | 54 | "source activate lsp\n",
|
51 | 55 | "pip install jupyter_lsp=0.7 --no-deps\n",
|
52 | 56 | "jupyter lab build\n",
|
53 |
| - "jupyter lab \n", |
| 57 | + "jupyter lab\n", |
54 | 58 | "```"
|
55 | 59 | ]
|
56 | 60 | },
|
|
59 | 63 | "metadata": {},
|
60 | 64 | "source": [
|
61 | 65 | "#### docker (data science)\n",
|
62 |
| - "This approach is based roughly on the [Jupyter docker-stacks documentation](https://github.com/jupyter/docker-stacks/tree/master/examples/docker-compose/notebook)." |
| 66 | + "\n", |
| 67 | + "This approach is based roughly on the\n", |
| 68 | + "[Jupyter docker-stacks documentation](https://github.com/jupyter/docker-stacks/tree/master/examples/docker-compose/notebook)." |
63 | 69 | ]
|
64 | 70 | },
|
65 | 71 | {
|
66 | 72 | "cell_type": "markdown",
|
67 | 73 | "metadata": {},
|
68 | 74 | "source": [
|
69 | 75 | "##### `Dockerfile`\n",
|
| 76 | + "\n", |
70 | 77 | "```dockerfile\n",
|
71 | 78 | "FROM jupyter/datascience-notebook:18ef2702c6a2\n",
|
72 | 79 | "\n",
|
|
93 | 100 | "##### `docker-compose.yml`\n",
|
94 | 101 | "\n",
|
95 | 102 | "```yaml\n",
|
96 |
| - "version: \"2\"\n", |
| 103 | + "version: '2'\n", |
97 | 104 | "\n",
|
98 | 105 | "services:\n",
|
99 | 106 | " notebook:\n",
|
100 | 107 | " build: .\n",
|
101 | 108 | " image: jupyterlab-lsp-notebook\n",
|
102 | 109 | " container_name: ${NAME}\n",
|
103 | 110 | " volumes:\n",
|
104 |
| - " - \"work:/home/jovyan/work\"\n", |
| 111 | + " - 'work:/home/jovyan/work'\n", |
105 | 112 | " ports:\n",
|
106 |
| - " - \"${PORT}:8888\"\n", |
| 113 | + " - '${PORT}:8888'\n", |
107 | 114 | " environment:\n",
|
108 |
| - " USE_HTTPS: \"yes\"\n", |
| 115 | + " USE_HTTPS: 'yes'\n", |
109 | 116 | " PASSWORD: ${PASSWORD}\n",
|
110 | 117 | "\n",
|
111 | 118 | "volumes:\n",
|
|
120 | 127 | "metadata": {},
|
121 | 128 | "source": [
|
122 | 129 | "##### Build and Start\n",
|
| 130 | + "\n", |
123 | 131 | "```bash\n",
|
124 | 132 | "PORT=8899 NAME=lsp PASSWORD=change-me-silly WORK_VOLUME=. docker-compose up\n",
|
125 | 133 | "```"
|
|
138 | 146 | "source": [
|
139 | 147 | "#### Get A Working JupyterLab environment\n",
|
140 | 148 | "\n",
|
141 |
| - "Refer to the official [JupyterLab Installation Documentation](https://jupyterlab.readthedocs.io/en/stable/getting_started/installation.html) for your installation approach.\n", |
| 149 | + "Refer to the official\n", |
| 150 | + "[JupyterLab Installation Documentation](https://jupyterlab.readthedocs.io/en/stable/getting_started/installation.html)\n", |
| 151 | + "for your installation approach.\n", |
142 | 152 | "\n",
|
143 |
| - "| pip | conda | pipenv | poetry | `*` |\n", |
144 |
| - "|------------------|--------------------|----------|-----------|-----|\n", |
145 |
| - "| [lab][lab-pip] | [lab][lab-conda] | `*` | `*` | `*` |\n", |
| 153 | + "| pip | conda | pipenv | poetry | `*` |\n", |
| 154 | + "| -------------- | ---------------- | ------ | ------ | --- |\n", |
| 155 | + "| [lab][lab-pip] | [lab][lab-conda] | `*` | `*` | `*` |\n", |
146 | 156 | "\n",
|
147 | 157 | "> `*` PRs welcome!\n",
|
148 | 158 | "\n",
|
|
153 | 163 | "jupyter lab\n",
|
154 | 164 | "```\n",
|
155 | 165 | "\n",
|
156 |
| - "[lab-conda]: https://jupyterlab.readthedocs.io/en/stable/getting_started/installation.html#conda\n", |
157 |
| - "[lab-pip]: https://jupyterlab.readthedocs.io/en/stable/getting_started/installation.html#pip" |
| 166 | + "[lab-conda]:\n", |
| 167 | + " https://jupyterlab.readthedocs.io/en/stable/getting_started/installation.html#conda\n", |
| 168 | + "[lab-pip]:\n", |
| 169 | + " https://jupyterlab.readthedocs.io/en/stable/getting_started/installation.html#pip" |
158 | 170 | ]
|
159 | 171 | },
|
160 | 172 | {
|
|
163 | 175 | "source": [
|
164 | 176 | "#### Get a Working NodeJS\n",
|
165 | 177 | "\n",
|
166 |
| - "The [JupyterLab Development Environment Documentation][nodejs-conda] shows some approaches for getting NodeJS.\n", |
| 178 | + "The [JupyterLab Development Environment Documentation][nodejs-conda] shows some\n", |
| 179 | + "approaches for getting NodeJS.\n", |
167 | 180 | "\n",
|
168 |
| - "| conda | `*` |\n", |
169 |
| - "|--------------------------|-----|\n", |
170 |
| - "| [nodejs][nodejs-conda] | `*` |\n", |
| 181 | + "| conda | `*` |\n", |
| 182 | + "| ---------------------- | --- |\n", |
| 183 | + "| [nodejs][nodejs-conda] | `*` |\n", |
171 | 184 | "\n",
|
172 |
| - "[nodejs-conda]: https://jupyterlab.readthedocs.io/en/stable/developer/extension_tutorial.html#set-up-a-development-environment\n", |
| 185 | + "[nodejs-conda]:\n", |
| 186 | + " https://jupyterlab.readthedocs.io/en/stable/developer/extension_tutorial.html#set-up-a-development-environment\n", |
173 | 187 | "\n",
|
174 | 188 | "Verify your node works and is findable from python.\n",
|
175 | 189 | "\n",
|
|
196 | 210 | "source": [
|
197 | 211 | "### Next Step: Language Servers\n",
|
198 | 212 | "\n",
|
199 |
| - "Now that you have `jupyterlab-lsp`, `jupyter_lsp` and all of their dependencies, you'll need some language servers. See:\n", |
| 213 | + "Now that you have `jupyterlab-lsp`, `jupyter_lsp` and all of their dependencies,\n", |
| 214 | + "you'll need some language servers. See:\n", |
200 | 215 | "\n",
|
201 |
| - "- [Language Servers](./Language%20Servers.ipynb) that will be found automatically once installed\n", |
202 |
| - "- [configuring](./Configuring.ipynb) `jupyter_lsp` for more control over which servers to load" |
| 216 | + "- [Language Servers](./Language%20Servers.ipynb) that will be found\n", |
| 217 | + " automatically once installed\n", |
| 218 | + "- [configuring](./Configuring.ipynb) `jupyter_lsp` for more control over which\n", |
| 219 | + " servers to load" |
203 | 220 | ]
|
204 | 221 | }
|
205 | 222 | ],
|
|
0 commit comments