Skip to content
Language Server Protocol integration for JupyterLab (code navigation + hover suggestions + linters + autocompletion)
TypeScript Python RobotFramework CSS JavaScript Shell Other
Branch: master
Clone or download
Latest commit 44b4d40 Nov 5, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
atest add lerna, metapackage, integrity checks, and move src (76 1️⃣ ) (#79) Oct 30, 2019
ci add lerna, metapackage, integrity checks, and move src (76 1️⃣ ) (#79) Oct 30, 2019
examples Add presentation/documentation for IPython magics and rpy2 integration Sep 2, 2019
packages Update rename.ts Nov 4, 2019
py_src/jupyter_lsp bump spec version in entrypoint and docs Nov 5, 2019
scripts fix some version strings/names Nov 1, 2019
.gitignore add lerna, metapackage, integrity checks, and move src (76 1️⃣ ) (#79) Oct 30, 2019
.prettierignore Add Browser Tests (#62) Oct 21, 2019
.prettierrc Add prettierrc Aug 21, 2019
.travis.yml Add Browser Tests (#62) Oct 21, 2019
.yarnrc caching Sep 26, 2019
CHANGELOG.md fix some version strings/names Nov 1, 2019
CONTRIBUTING.md bump spec version in entrypoint and docs Nov 5, 2019
LANGUAGESERVERS.md fix some doc references, add pointers to servers Nov 3, 2019
LICENSE Initial commit: move LSP out of jupyterlab-go-to-definition/lsp Aug 17, 2019
MANIFEST.in some work on understanding the changes with conda, r, etc. Oct 4, 2019
README.md add --pre for pip Nov 1, 2019
RELEASE.md linting Nov 2, 2019
ROADMAP.md split up docs Nov 1, 2019
azure-pipelines.yml Release 0.6.1, update RELEASE.md Oct 31, 2019
environment-atest.yml Add Browser Tests (#62) Oct 21, 2019
environment.yml add lerna, metapackage, integrity checks, and move src (76 1️⃣ ) (#79) Oct 30, 2019
lerna.json add lerna, metapackage, integrity checks, and move src (76 1️⃣ ) (#79) Oct 30, 2019
package.json Merge pull request #84 from krassowski/lsp-ws-connection Oct 31, 2019
postBuild add lerna, metapackage, integrity checks, and move src (76 1️⃣ ) (#79) Oct 30, 2019
requirements-atest.txt split out lab version, add to utest Oct 26, 2019
requirements-dev.txt add lerna, metapackage, integrity checks, and move src (76 1️⃣ ) (#79) Oct 30, 2019
requirements-lab.txt split out lab version, add to utest Oct 26, 2019
requirements-utest.txt split out lab version, add to utest Oct 26, 2019
requirements.txt #70: clean up some dependencies Oct 26, 2019
setup.cfg bump spec version in entrypoint and docs Nov 5, 2019
setup.py Remove redundant newline Oct 25, 2019
tsconfigbase.json add lerna, metapackage, integrity checks, and move src (76 1️⃣ ) (#79) Oct 30, 2019
tslint.json WIP customizable magic replacements, better cell magic handling, #3, #9 Aug 24, 2019
yarn.lock Merge pull request #84 from krassowski/lsp-ws-connection Oct 31, 2019

README.md

Language Server Protocol integration for Jupyter(Lab)

Build Status Build Status codebeat badge Binder

This project is in its early days, but you are welcome to check it out, leave feedback and/or a PR

Quick Links: Installation | Language Servers | Updating | Changelog | Roadmap | Contributing

Features

Examples below are for Python, but work for R as well

Hover

Hover over any piece of code; if an underline appears, you can press Ctrl to get a tooltip with function/class signature, module documentation or any other piece of information that the language server provides

hover

Diagnostics

Critical errors have red underline, warnings are orange, etc. Hover over the underlined code to see a more detailed message

inspections

Jump to Definition

Use the context menu entries to jump to definitions

jump

Highlight References

Place your cursor on a variable, function, etc and all the usages will be highlighted

Automatic Completion

Certain characters, for example '.' (dot) in Python, will automatically trigger completion

invoke

Automatic Signature Suggestions

Function signatures will automatically be displayed

signature

Kernel-less Autocompletion

Advanced static-analysis autocompletion without a running kernel

autocompletion

When a kernel is available the suggestions from the kernel (such as keys of a dict and columns of a DataFrame autocompletion) are merged with the suggestions from the Language Server (currently only in notebook).

Prerequisites

  • JupyterLab >=1.1,<1.2
  • Python 3.5+
  • nodejs 8+

Installation

For the current stable version:

  1. install the server extension:

    pip install --pre jupyter-lsp
  2. install the frontend extension:

    jupyter labextension install @krassowski/jupyterlab-lsp
  3. install LSP servers for languages of your choice; for example, for Python (pyls) and R (languageserver) servers:

    pip install python-language-server[all]
    R -e 'install.packages("languageserver")'

    or from conda-forge

    conda install -c conda-forge python-language-server r-languageserver

    Please see our full list of supported language servers which includes installation hints for the common package managers (npm/pip/conda). In general, any LSP server from the Microsoft list should work after some additional configuration.

    Note: it may be worth visiting the repository of each server you install as many provide additional configuration options.

  4. (Optional, Linux/OSX-only) to enable opening files outside of the root directory (the place where you start JupyterLab), create .lsp_symlink and symlink your /home, or any other location which includes the files that you wish to make possible to open in there:

    mkdir .lsp_symlink
    cd .lsp_symlink
    ln -s /home home

    If your user does not have sufficient permissions to traverse the entire path, you will not be able to open the file. A more detailed guide on symlinking (written for a related jupyterlab-go-to-definition extension) is available here.

Updating

To update previously installed extensions:

pip install -U jupyter-lsp
jupyter labextension update @krassowski/jupyterlab-lsp

Getting the latest alpha/beta/RC version

Use install command (update does not seem to work) appending @<0.x.y.rc-z> to the extension name, like this:

jupyter labextension install @krassowski/jupyterlab-lsp@0.7.0-rc.0

Acknowledgements

This would not be possible without the fantastic initial work at wylieconlon/lsp-editor-adapter.

You can’t perform that action at this time.