Skip to content

Commit 557e67d

Browse files
committed
Improve language servers configuration documentation
1 parent 9c65875 commit 557e67d

File tree

2 files changed

+39
-24
lines changed

2 files changed

+39
-24
lines changed

docs/Configuring.ipynb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"```\n",
2626
"\n",
2727
"They will be merged from bottom to top, and the directory where you launch your\n",
28-
"`notebook` server wins, making it easy to check in to version control."
28+
"`notebook` or `lab` server wins, making it easy to check in to version control."
2929
]
3030
},
3131
{
@@ -210,13 +210,11 @@
210210
},
211211
{
212212
"cell_type": "markdown",
213-
"metadata": {
214-
"collapsed": false
215-
},
213+
"metadata": {},
216214
"source": [
217-
"### Example: Scala Language Server (metals) integration with jupyterlab-lsp\n",
215+
"### Example: Scala Language Server (metals) integration\n",
218216
"\n",
219-
"Step 1: Get a Scala-based kernel installed.\n",
217+
"**Step 1:** Get a Scala-based kernel installed.\n",
220218
"\n",
221219
"2 possible options: Almond kernel or the Spark magic kernel.\n",
222220
"\n",
@@ -241,7 +239,7 @@
241239
"jupyter-kernelspec install sparkmagic/kernels/sparkkernel\n",
242240
"```\n",
243241
"\n",
244-
"Step 2: Install metals server in the working directory:\n",
242+
"**Step 2:** Install metals server in the working directory:\n",
245243
"\n",
246244
"Metals has a coursier based installation.\n",
247245
"\n",
@@ -250,10 +248,12 @@
250248
"./coursier bootstrap org.scalameta:metals_2.12:0.7.0 --force-fetch -o metals -f\n",
251249
"```\n",
252250
"\n",
253-
"(Might need to use the --force-fetch flag if you are getting dependency issues.)\n",
251+
"(Might need to use the `--force-fetch` flag if you are getting dependency\n",
252+
"issues.)\n",
254253
"\n",
255-
"Step 3: Configure the metals server in jupyterlab-lsp. Enter the following in\n",
256-
"the jupyter_server_config.json:\n",
254+
"**Step 3:** Configure the metals server in jupyterlab-lsp. Enter the following\n",
255+
"in the `jupyter/jupyter_server_config.d/metals-ls.json` (in one of the jupyter\n",
256+
"configuration directories):\n",
257257
"\n",
258258
"```python\n",
259259
"{\n",
@@ -271,8 +271,8 @@
271271
"```\n",
272272
"\n",
273273
"You are good to go now! Just start `jupyter lab` and create a notebook with\n",
274-
"either the Spark or the Scala kernel and you should be able to see the metals\n",
275-
"server initialised from the bottom left corner."
274+
"either the Spark or the Scala kernel and the metals server should automatically\n",
275+
"initialise (the status indicator should show \"Fully initialized\")."
276276
]
277277
}
278278
],

docs/Language Servers.ipynb

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,28 @@
66
"source": [
77
"## Language Servers\n",
88
"\n",
9-
"`jupyter-lsp` does not come with any Language Servers! However, we will try to\n",
10-
"use them if they _are_ installed and we know about them. For the language\n",
11-
"servers in the tables below, use one of the suggested package managers to\n",
12-
"install them: these implementations are tested to work with `jupyter-lsp`.\n",
9+
"By default `jupyter-lsp` does not come with any language servers preinstalled.\n",
10+
"However, we will try to use them if they _are_ installed and we know about them\n",
11+
"(i.e. someone contributed a full specification).\n",
1312
"\n",
14-
"- _You can disable this feature by configuring_\n",
15-
" [autodetect](./Configuring.ipynb#autodetect)\n",
13+
"> _You can disable auto-detection by configuring\n",
14+
"> [autodetect](./Configuring.ipynb#autodetect)_\n",
1615
"\n",
17-
"If you do not see a language you would like, but can find it one of these lists:\n",
16+
"You can add another language server for languages that are not listed on this\n",
17+
"page:\n",
1818
"\n",
19-
"- the [official list][lsp-implementations] of language servers\n",
20-
"- a [community-curated list][langserver] of language servers\n",
19+
"- using a minimal JSON-based\n",
20+
" [configuration file](./Configuring.ipynb#language_servers) (good for\n",
21+
" experimenting or configuring a niche server), or\n",
22+
"- contributing a [full specification](./Contributing.ipynb#Specs) (to enable\n",
23+
" better integration and help other users of the same language)\n",
2124
"\n",
22-
"...you might be able to add it\n",
23-
"[via configuration](./Configuring.ipynb#language_servers) or\n",
24-
"[build your own spec](./Contributing.ipynb#Specs) for the server in question.\n",
25+
"The existing language servers are listed on the [official implementations\n",
26+
"list][lsp-implementations] and on the [community-curated list][langserver].\n",
27+
"\n",
28+
"For the language servers in the tables below, use one of the suggested package\n",
29+
"managers to install them: these implementations are tested to work with\n",
30+
"`jupyter-lsp`.\n",
2531
"\n",
2632
"[language-server]:\n",
2733
" https://microsoft.github.io/language-server-protocol/specification\n",
@@ -141,6 +147,15 @@
141147
")"
142148
]
143149
},
150+
{
151+
"cell_type": "markdown",
152+
"metadata": {},
153+
"source": [
154+
"The Scala language server (`metals`) is not currently auto-detected, but can be\n",
155+
"configured as demonstrated in the\n",
156+
"[configuration example](<./Configuring.ipynb#Example:-Scala-Language-Server-(metals)-integration>)."
157+
]
158+
},
144159
{
145160
"cell_type": "markdown",
146161
"metadata": {},

0 commit comments

Comments
 (0)