Language Servers¶
jupyter-lsp
does not come with any Language Servers! However, we will try to use them if they are installed and we know about them. For the language servers in the tables below, use one of the suggested package managers to install them: these implementations are tested to work with jupyter-lsp
.
You can disable this feature by configuring autodetect
If you do not see a language you would like, but can find it one of these lists:
the official list of language servers
a community-curated list of language servers
…you might be able to add it via configuration or build your own spec for the server in question.
Notebook-Optimized Language Servers¶
These servers have well-tested support for notebooks and file editors.
[5]:
Languages | Implementation | Installation |
---|---|---|
python |
pyls |
|
r |
r-languageserver |
|
NodeJS-based Language Servers¶
These servers have mostly been tested with file editors.
[6]:
Languages | Implementation | Installation |
---|---|---|
bash sh |
bash-language-server |
|
dockerfile |
dockerfile-language-server-nodejs |
|
javascript jsx typescript typescript-jsx typescriptreact javascriptreact |
javascript-typescript-langserver |
|
sql |
sql-language-server |
|
markdown ipythongfm gfm |
unified-language-server |
|
css less scss |
vscode-css-languageserver-bin |
|
html |
vscode-html-languageserver-bin |
|
json |
vscode-json-languageserver-bin |
|
yaml |
yaml-language-server |
|
Example: Getting All the NodeJS-based Language Servers¶
A number of language servers are built on the reference implementation, powered by NodeJS. The most reliable place to install these is in a node_modules
in the directory where you launch jupyter lab
.
For example, to install all the servers which are tested as part of jupyterlab-lsp
:
jlpm add --dev \
bash-language-server \
vscode-css-languageserver-bin \
dockerfile-language-server-nodejs \
vscode-html-languageserver-bin \
javascript-typescript-langserver \
vscode-json-languageserver-bin \
yaml-language-server
This will create create (or add to):
package.json
(check this in!)yarn.lock
(check this in!)node_modules/
(add to your VCS ignore file)
If you wish to install these someplace else, you may need to specify where you install them with extra_node_roots.
Other Scientific Languages¶
These servers have been mostly tested with file editor.
[7]:
Languages | Implementation | Installation |
---|---|---|
tex latex |
texlab |
|
Example: Getting a \(\LaTeX\) stack¶
conda install -y conda-forge tectonic texlab chktex
This will install:
tectonic
, a cross-platform \(\LaTeX\) processing toolnote, it will download a large number of packages when first executed
texlab
, a Language Server for.tex
files that supports completion and refernce navigationchktex
, a.tex
style checker