Skip to content

Commit 331278a

Browse files
committed
Mention conda package in the documentation
1 parent ea90dbd commit 331278a

File tree

3 files changed

+33
-16
lines changed

3 files changed

+33
-16
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,19 +96,16 @@ Use of a python `virtualenv` or a conda env is also recommended.
9696
conda install -c conda-forge python=3
9797
```
9898

99-
1. install JupyterLab
99+
1. install JupyterLab and the server extension
100100

101101
```bash
102-
conda install -c conda-forge 'jupyterlab>=2.2,<3.0.0a0'
102+
conda install -c conda-forge 'jupyterlab>=2.2,<3.0.0a0' jupyter-lsp
103103
# or
104-
pip install 'jupyterlab>=2.2,<3.0.0a0'
104+
pip install 'jupyterlab>=2.2,<3.0.0a0' jupyter-lsp
105105
```
106106

107-
1. install the server extension:
108-
109-
```bash
110-
pip install jupyter-lsp
111-
```
107+
> Note: With conda, you could take advantage of the meta-packages `jupyter-lsp-python`
108+
> or `jupyter-lsp-r` to install the language server and the server extension.
112109
113110
1. install `nodejs`
114111

@@ -175,6 +172,9 @@ Use of a python `virtualenv` or a conda env is also recommended.
175172
To update previously installed extensions:
176173

177174
```bash
175+
conda update jupyter-lsp
176+
jupyter labextension update @krassowski/jupyterlab-lsp
177+
# or
178178
pip install -U jupyter-lsp
179179
jupyter labextension update @krassowski/jupyterlab-lsp
180180
```

docs/Installation.ipynb

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,9 @@
9797
"#### conda (minimal python)\n",
9898
"\n",
9999
"```bash\n",
100-
"conda create -c conda-forge -n lsp 'python >=3.7,<3.8' 'jupyterlab={JUPYTERLAB_VERSION}' 'nodejs>10' python-language-server\n",
101-
"# Also consider: r-languageserver [*]\n",
102-
"source activate lsp\n",
103-
"python -m pip install 'jupyter-lsp={JUPYTER_LSP_VERSION}' --no-deps\n",
100+
"conda create -c conda-forge -n lsp 'python >=3.7,<3.8' 'jupyterlab={JUPYTERLAB_VERSION}' 'nodejs>10' 'jupyter-lsp-python={JUPYTER_LSP_VERSION}'\n",
101+
"# Also consider: jupyter-lsp-r [*]\n",
102+
"conda activate lsp\n",
104103
"jupyter labextension install '@krassowski/jupyterlab-lsp@{JUPYTERLAB_LSP_VERSION}'\n",
105104
"```\n",
106105
"\n",
@@ -146,7 +145,6 @@
146145
" 'r-languageserver' \\\n",
147146
" 'texlab' \\\n",
148147
" 'chktex' \\\n",
149-
" && python3 -m pip install --no-cache-dir --no-deps \\\n",
150148
" 'jupyter-lsp={JUPYTER_LSP_VERSION}' \\\n",
151149
" && jupyter labextension install --no-build \\\n",
152150
" '@krassowski/jupyterlab-lsp@{JUPYTERLAB_LSP_VERSION}' \\\n",
@@ -261,6 +259,15 @@
261259
"%%markdown\n",
262260
"#### Install Jupyter[Lab] LSP\n",
263261
"\n",
262+
"##### conda\n",
263+
"\n",
264+
"```bash\n",
265+
"conda install jupyter-lsp={JUPYTER_LSP_VERSION}\n",
266+
"jupyter labextension install @krassowski/jupyterlab-lsp@{JUPYTERLAB_LSP_VERSION}\n",
267+
"```\n",
268+
"\n",
269+
"##### pip\n",
270+
"\n",
264271
"```bash\n",
265272
"pip install jupyter-lsp={JUPYTER_LSP_VERSION}\n",
266273
"jupyter labextension install @krassowski/jupyterlab-lsp@{JUPYTERLAB_LSP_VERSION}\n",
@@ -304,4 +311,4 @@
304311
},
305312
"nbformat": 4,
306313
"nbformat_minor": 4
307-
}
314+
}

py_src/jupyter_lsp/specs/pyls.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,18 @@ class PythonLanguageServer(PythonModuleSpec):
1717
conda="conda install -c conda-forge python-language-server",
1818
),
1919
extend=[
20-
dict(display_name="pyls-mypy", install=dict(pip="pip install pyls-mypy")),
21-
dict(display_name="pyls-black", install=dict(pip="pip install pyls-black")),
20+
dict(
21+
display_name="pyls-mypy",
22+
install=dict(
23+
pip="pip install pyls-mypy", conda="conda install pyls-mypy"
24+
),
25+
),
26+
dict(
27+
display_name="pyls-black",
28+
install=dict(
29+
pip="pip install pyls-black", conda="conda install pyls-black"
30+
),
31+
),
2232
dict(display_name="pyls-isort", install=dict(pip="pip install pyls-isort")),
2333
],
2434
config_schema=load_config_schema(key),

0 commit comments

Comments
 (0)