|
| 1 | +# Langage server protocol (LSP) support in jupyterlab-monaco |
| 2 | + |
| 3 | +## Problem |
| 4 | + |
| 5 | +The [monaco-editor](https://github.com/Microsoft/monaco-editor) is an |
| 6 | +open-source text editor written in Javascript and used in [VS |
| 7 | +Code](https://code.visualstudio.com/). |
| 8 | + |
| 9 | +[jupyterlab-monaco](https://github.com/jupyterlab/jupyterlab-monaco) is a JupyterLab |
| 10 | +extension that allows users to edit documents using monaco-editor. |
| 11 | + |
| 12 | +monaco-editor ships with language features for |
| 13 | +TypeScript, JavaScript, CSS, LESS, SCSS, JSON, HTML. In order to support other |
| 14 | +languages (e.g. Python), it must connect to a language server (e.g. Python language |
| 15 | +server). |
| 16 | + |
| 17 | +## Proposed Enhancement |
| 18 | + |
| 19 | +- Create a notebook server extension to allow clients to connect with language servers |
| 20 | + - Provide HTTP interface for clients to communicate via websockets |
| 21 | + - e.g. `/lsp/python/` or `/lsp/r/`. |
| 22 | + - Add a new set of classes to |
| 23 | + [@jupyterlab/services](https://github.com/jupyterlab/jupyterlab/tree/master/packages/services) |
| 24 | + that provide a client-side interface to those endpoints |
| 25 | +- Integrate monaco-editor in jupyterlab-monaco with classes in @jupyterlab/services |
| 26 | + |
| 27 | +## Notes |
| 28 | + |
| 29 | +### Libraries |
| 30 | + |
| 31 | +- [monaco-languageclient](https://github.com/TypeFox/monaco-languageclient): |
| 32 | + NPM module to connect Monaco editor with language servers |
| 33 | + |
| 34 | +### Reference implementations |
| 35 | + |
| 36 | +- [WIP] changes to import monaco-lsp code into jupyterlab-monaco ([jupyterlab-monaco#12](https://github.com/jupyterlab/jupyterlab-monaco/pull/12)) |
| 37 | +- [Theia](https://github.com/theia-ide/theia) |
| 38 | +- [Gitpod](https://github.com/gitpod-io/gitpod) |
| 39 | +- [R-Brain](https://github.com/R-Brain/jupyterlab/blob/master/packages/monaco-extension/src/index.ts) |
| 40 | + |
| 41 | +### Documentation |
| 42 | + |
| 43 | +- [Language servers](https://langserver.org/#implementations-server) |
0 commit comments