-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pre-proposal: incorporation of jupyter(lab)-lsp #67
Comments
A new organization could be named
|
It seems that another term is sometimes used: content assistance, which signifies that these features are not limited to actual code. Indeed the LSP extension already works well with Markdown, providing spellcheck and linting among others. However, I think that code-assistance is more widely understood term. There is a precedent for similar goal-oriented organizations in the Python real: the Python Code Quality Authority. Edit: FYI I brought it up as I would like to hear some feedback before sending a proposal in the PR. The work on the proposal is in progress, realistically two-three weekends away from completion. |
It should be a JEP because the adoption of analogous Debugger Protocol was a JEP #47 |
We are making this much harder than necessary. IMHO, we just need to get the JupyterLab project to accept this as one of the extensions on the jupyterlab org. Anything else (e.g. new org, etc) would just contribute to the fragmentation of the community. |
Thank you, I agree with the concern. To reiterate, there are a two major reasons why making a dedicated GitHub organization makes sense:
We can still have multiple repositories when inside of |
Yeah, I'm not super bothered one way or the other in terms of the org it gets homed to, but do think this will generate a fair number of repos, and eventually have implications for many clients and different specs, not just JupyterLab: For example:
|
Pre-Proposal Checklist
Pre-Proposal
The maintainers of jupyter(lab)-lsp would like to propose its incorporation as an official sub-project of Project Jupyter. We feel this would benefit Jupyter users through better discoverability of advanced interactive computing features, supported by the Language Server Protocol (LSP), but otherwise missing in a user's Jupyter experience.
The key component of the repository, @krassowski/jupyterlab-lsp, offers Jupyter users an expanded subset of features described by the LSP as an extension to JupyterLab. These features include refinements of existing Jupyter interactive computing features, such as completion and introspection, as well as new Jupyter features such as linting, reference linking, and symbol renaming. It is supported by jupyter-lsp, a Language Server- and Jupyter Client-agnostic extension of the Jupyter Notebook Server (for the
0.x
line) and Jupyter Server (for the1.x
). We will discuss the architecture and engineering process of maintaining these components at greater length, leveraging a good deal of the user and developer documentation.Much like Jupyter Kernel Messaging, LSP provides a language-agnostic, JSON-compatible description for multiple clients to integrate with any number of language implementations. Unlike Kernel Messaging, the focus is on precise definition of the many facets of static analysis and code transformation, with nearly four times the number of messages of the Jupyter specification. We will discuss the opportunities and challenges of this complexity for users and maintainers of Jupyter Clients, Kernels, and related tools.
Branding
We invite discussion on an appropriate Jupyter branding/organization approach, ranging from:
@krassowski/jupyterlab-lsp
monorepo to@jupyter/lsp
jupyter-lsp
)Kernel integration
In order for
jupyterlab-lsp
to be able to connect to the appropriate Language Server in tandem with a Kernel, it requires that kernels properly implemenet KernelInfo from version5.0
of Jupyter Messaging specification, in particular the fieldlanguage_info
with the following fields present:mimetype
file_extension
name
Therefore, no changes to the specification are required. Though some future specification refinements could be discussed as separate JEPs.
In continuous integration, we keep under test Kernels and Language Servers for all three of the Jupyter-name forming languages:
Other kernels also confirmed to work straightaway (Bash) or after minimal user configuration (Scala) in presence of appropriate Language Servers. When accounting for language servers that only support the file editor but not notebooks, a total of 13 language servers is known to work with the jupyterlab-lsp.
Integration with alternative frontends might be possible in the future; as a proof-of-concept we were able to activate most of the LSP functionality in the jupyterlab-classic (a prototype re-implementation of the classic interface using JupyterLab components).
Interestingly, the extension was adopted as a basis for other notable JupyterLab extensions, and it was used to prototype interesting novel concepts in academic context.
Magics and polyglot support
We also support the magics in IPython, allowing for polyglot experience when using cell magics. For the detailed discussions on magics integration please refer to our discussion on code overrides (which is our term for generalisation of magics, shell expressions and pinfo
?
/??
syntax).Outlook towards notebook-specific IDE features
The team envisions a support for the notebook specific IDE features to be included in the future. This might involve upstream changes to the LSP specification, or custom jupyter-specific extension. Please see our community discussion for more details.
Minimal implementation details
jupyterlab-lsp
implements integration with JupyterLab and its default CodeMirror editor; the design allows for incorporation of additional editors in the future, but large portions of code are CodeMirror 5-specific; it communicates withjupyter-lsp
to send/recieve messages from language servers and with JupyterLab to get information about currrent kerneljupyter-lsp
usesjupyter_server
,tornado
, sockets and IO streams for communication with servers and with frontend; it is not aware of a kernel's existencepytest
,jest
, androbot
(Selenium) test; the integration/acceptance tests for the bulk of the frontend testing; we test on Windows, Linux and MacOS, supporting thee Python versions at a time forjupyter-lsp
and doing tests with actual language serversPrevious discussions:
Please refer to:
The text was updated successfully, but these errors were encountered: