Skip to content

Commit 947b7a2

Browse files
committed
update language server docs for robot, pyright
1 parent 9748f17 commit 947b7a2

File tree

1 file changed

+44
-28
lines changed

1 file changed

+44
-28
lines changed

docs/Language Servers.ipynb

Lines changed: 44 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@
135135
"source": [
136136
"### Notebook-optimized Language Servers\n",
137137
"\n",
138-
"These servers have support for notebooks and file editors. The `pyls` and\n",
139-
"`r-languageserver` are well-tested, while `jedi` and `Julia` servers are\n",
138+
"These servers have support for notebooks and file editors. The `pylsp`, and\n",
139+
"`r-languageserver`, and `robotframework_ls` implementatoons are well-tested, while `jedi` and `Julia` servers are\n",
140140
"experimental. If you choose to install multiple language servers for the same\n",
141141
"language, the one with the highest `priority` (which can be set in the _Advanced\n",
142142
"Settings Editor_) will be used."
@@ -158,10 +158,14 @@
158158
" \"r-languageserver\",\n",
159159
" \"julia-language-server\",\n",
160160
" \"jedi-language-server\",\n",
161+
" \"robotframework_ls\",\n",
161162
"]\n",
162-
"lang_server_table(\n",
163-
" {key: spec for key, spec in mgr.all_language_servers.items() if key in nb_langs}\n",
164-
")"
163+
"lang_server_table({\n",
164+
" key: spec\n",
165+
" for key, spec\n",
166+
" in sorted(mgr.all_language_servers.items())\n",
167+
" if key in nb_langs\n",
168+
"})"
165169
]
166170
},
167171
{
@@ -203,21 +207,20 @@
203207
},
204208
"outputs": [],
205209
"source": [
206-
"lang_server_table(\n",
207-
" {\n",
208-
" key: spec\n",
209-
" for key, spec in mgr.all_language_servers.items()\n",
210-
" if \"npm\" in spec[\"install\"]\n",
211-
" }\n",
212-
")"
210+
"npm_specs = {\n",
211+
" key: spec\n",
212+
" for key, spec in sorted(mgr.all_language_servers.items()) \n",
213+
" if \"npm\" in spec[\"install\"]\n",
214+
"}\n",
215+
"lang_server_table(npm_specs)"
213216
]
214217
},
215218
{
216219
"cell_type": "markdown",
217220
"metadata": {},
218221
"source": [
219-
"NodeJS is a prerequisite for installation of any of the above language servers;\n",
220-
"you can get it with:\n",
222+
"NodeJS (preferrably even-numbered an _Active_ or _Maintenance Long Term Support_ release) \n",
223+
"is a prerequisite for installation of any of the above language servers; you can get it with:\n",
221224
"\n",
222225
"```bash\n",
223226
"conda install -c conda-forge nodejs\n",
@@ -242,19 +245,32 @@
242245
"`node_modules` in the directory where you launch `jupyter lab`.\n",
243246
"\n",
244247
"For example, to install all the servers which are tested as part of\n",
245-
"`jupyterlab-lsp`:\n",
246-
"\n",
247-
"```bash\n",
248-
"jlpm add --dev \\\n",
249-
" bash-language-server \\\n",
250-
" vscode-css-languageserver-bin \\\n",
251-
" dockerfile-language-server-nodejs \\\n",
252-
" vscode-html-languageserver-bin \\\n",
253-
" typescript-language-server \\\n",
254-
" vscode-json-languageserver-bin \\\n",
255-
" yaml-language-server\n",
248+
"`jupyterlab-lsp`:"
249+
]
250+
},
251+
{
252+
"cell_type": "code",
253+
"execution_count": null,
254+
"metadata": {
255+
"tags": [
256+
"remove-input"
257+
]
258+
},
259+
"outputs": [],
260+
"source": [
261+
"IPython.display.Markdown(Template(\"\"\"```bash\n",
262+
"jlpm add --dev {% for name, spec in specs.items() %} \\\\\n",
263+
" {{ spec[\"install\"][\"npm\"].split(\" \")[-1] }}{% endfor %}\n",
256264
"```\n",
257-
"\n",
265+
"\"\"\").render(\n",
266+
" specs=npm_specs\n",
267+
"))"
268+
]
269+
},
270+
{
271+
"cell_type": "markdown",
272+
"metadata": {},
273+
"source": [
258274
"This will create (or add to):\n",
259275
"\n",
260276
"- `package.json` (check this in!)\n",
@@ -369,9 +385,9 @@
369385
"name": "python",
370386
"nbconvert_exporter": "python",
371387
"pygments_lexer": "ipython3",
372-
"version": "3.7.9"
388+
"version": "3.10.0"
373389
}
374390
},
375391
"nbformat": 4,
376392
"nbformat_minor": 4
377-
}
393+
}

0 commit comments

Comments
 (0)