-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from krassowski/add-lsp
Add LSP to the Binder image
- Loading branch information
Showing
3 changed files
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,4 @@ dependencies: | |
- wheel | ||
# additional packages for demos | ||
# - ipywidgets | ||
- jupyterlab-lsp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"@krassowski/jupyterlab-lsp:completion": { | ||
"layout": "detail-below" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
python3 binder/postBuild | ||
""" | ||
import shutil | ||
import subprocess | ||
import sys | ||
from pathlib import Path | ||
|
@@ -42,6 +43,14 @@ _("jupyter", "server", "extension", "list") | |
# initially list installed extensions to determine if there are any surprises | ||
_("jupyter", "labextension", "list") | ||
|
||
# install javascript language server for autocompletion and error highlighting | ||
# (typescript-language-server depends on tsutils which requires us to choose typescript version) | ||
_("jlpm", "add", "typescript-language-server", "[email protected]") | ||
|
||
# add overrides for LSP settings | ||
SETTINGS = Path(sys.prefix) / "share/jupyter/lab/settings" | ||
SETTINGS.mkdir(parents=True, exist_ok=True) | ||
shutil.copy2("binder/overrides.json", SETTINGS / "overrides.json") | ||
|
||
print("JupyterLab with @jupyterlab/plugin-playground is ready to run with:\n") | ||
print("\tjupyter lab\n") |