jupyterlab-monaco
jupyterlab-monaco copied to clipboard
changes to import monaco-lsp code into jupyterlab-monaco
here is a minimal set of changes i needed to get jupyterlab-monaco to build and run while importing monaco-languageclient
Excited to see this progress, especially in light of the upcoming release of the Python Language Server:
https://blogs.msdn.microsoft.com/pythonengineering/2018/07/18/introducing-the-python-language-server/
I just merged the latest from jupyterlab-monaco, and pushed the merged code to my branch. I think that ought to update the pull request
@juliandolby JupyterLab 0.33 is coming out this week. Can you update the PR to use that release of JupyterLab and then maybe we can merge this PR. @jasongrout do you think you will have a chance to help review this after the release?
A few thoughts about LSP integration:
- We probably want to have a jupyter notebook server extension that can act as a proxy between specific LSPs and the frontend, through a standard web socket protocol and URLs. I am thinking of new endpoints like
/lsp/python
or/lsp/R
and something that can return the list of available and running LSP servers. - A new set of classes on jupyterlab services that has a well designed client to those endpoints and which returns the actual client LSP objects that Monaco needs.
Do we want to try to tackle some of these at the JupyterCon sprint on Saturday? I have meetings in NYC the following M/T, but might be available to stay around on W.
@ellisonbg My project is a fork of jupyterlab/monaco, and I am not sure how this connects to the overall jupyterlab. My version is slightly back, I think, for when I type
jupyter lab --version
at the command line, I get 0.32.1
. I suspect this means I need to build jupyterlab itself from github to get the latest?
I definitely like the ideas for the Saturday sprint. This would allow us to interact with jupyter by simply configuring our analysis as an available server.
my latest commits have me reading the LSP server to use from system config. It is totally hackish right now, since I am adding my config item to an existing config entry. I have added a schema for the Monaco extension, but that does not seem to show up.
just merged to jupyterlab 0.33.10, and everything still seems to work. i have pushed those merges to the pull request.
@juliandolby JupyterLab 0.34 is out now - do you think you will have time to update/test with 0.34 this before JupyterCon?
@ellisonbg I just checked, and conda, which is how I install jupyterlab, only has jupyterlab 0.33.12 using conda-forge. The extension seems to work unchanged with 0.33.12
It may only be available with pip - sometimes Vonda takes a bit longer to show up
Sent from my iPhone
On Aug 18, 2018, at 11:13 AM, Julian Dolby [email protected] wrote:
@ellisonbg I just checked, and conda, which is how I install jupyterlab, only has jupyterlab 0.33.12 using conda-forge.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
There is a problem with the linter on conda-forge, waiting for that to be resolved.
Sent From Phone
From: Brian E. Granger [email protected] Sent: Saturday, August 18, 2018 2:13:33 PM To: jupyterlab/jupyterlab-monaco Cc: Subscribed Subject: Re: [jupyterlab/jupyterlab-monaco] changes to import monaco-lsp code into jupyterlab-monaco (#12)
It may only be available with pip - sometimes Vonda takes a bit longer to show up
Sent from my iPhone
On Aug 18, 2018, at 11:13 AM, Julian Dolby [email protected] wrote:
@ellisonbg I just checked, and conda, which is how I install jupyterlab, only has jupyterlab 0.33.12 using conda-forge.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/jupyterlab/jupyterlab-monaco/pull/12#issuecomment-414080315, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AB_99C_tUWIvfB2jwX5ALU-96D5pjXCcks5uSGddgaJpZM4U6FTU.
@juliandolby, jupyterlab
0.34
is now available on conda-forge, and if you rebase you'll pick up #18.
Just updated to 0.34. I pushed the very few needed changes, just adjustments of dependency versions.
:+1:
How would the LSP-Server be used? How can I install (or start?) LSPs and connect to them?
There is now a 'Monaco Editor' tab in the advanced settings menu, which currently has the sole option 'lspServer'. You can set this to any WebSocket URL that talks to an LSP server. For example, my analysis server uses URLs of the following form: "ws://localhost:8080/com.ibm.wala.cast.lsp.tomcat/websocket". Hence, my Monaco config is as follows:
{
// Monaco Editor
// jupyterlab-monaco:plugin
// Monaco editor settings.
// ************************
// [missing schema title]
// The configuration specific to Monaco editors.
"lspServer": "ws://localhost:8080/com.ibm.wala.cast.lsp.tomcat/websocket"
}
I'm bummed that I wasn't able to attend the JupyterCon sprints and work on this! Do we have any updates since then?
The main update that I have is that code with the LSP server in a settings pane is committed to my branch.
On Sep 13, 2018, at 9:11 PM, Grant Nestor [email protected] wrote:
I'm bummed that I wasn't able to attend the JupyterCon sprints and work on this! Do we have any updates since JupyterCon?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jupyterlab/jupyterlab-monaco/pull/12#issuecomment-421199303, or mute the thread https://github.com/notifications/unsubscribe-auth/ABk3fpCfV3DKU35QXa2XpMjqDiyvvkOCks5uawJFgaJpZM4U6FTU.
Julian, I've just made you a collaborator, which I think means you should be able to merge things into this repo. Thanks again for working on all this!
Thanks @jasongrout! I decided to get ambitious and try to update the module to use monaco-languageclient-0.9.0 from TypeFox. The good news is that minimal changes make the code compile and link. The bad news is that 'jupyter labextension link' then blows up with errors that I have never seen before.
I am attaching my output logs, in case anyone else has seen errors like this before, and knows what they mean.
My minimal code changes are on the branch lsp-mlc090 in my fork.
A bit of hacking, and I have my updated code working in a Monaco demo, and it gets richer LSP information such as the 'related information'. the display looks as rich as vscode now. and it would all work in Jupyter too, but labextension link seems to hate the vscode engine.
@juliandolby, I just tried it locally and it installed fine, can you please try jupyter lab clean && jupyter lab build
, it looks like the classic broken node_modules
problem.
I still get the problem, even when i try the commands you suggested. I even tried a fresh git clone first to get a clean directory
git clone [email protected]:juliandolby/jupyterlab-monaco jupyterlab-monaco-mlc090
cd jupyterlab-monaco-mlc090/
git checkout lsp-mlc090
jupyter lab clean && jupyter lab build
What is node -v
?
bash-3.2$ node -v
v8.12.0
What is your PATH?
bash-4.4$ echo $PATH
/Users/dolby/anaconda3/bin:/Users/dolby/.opam/system/bin:/Users/dolby/.rvm/gems/ruby-2.4.1/bin:/Users/dolby/.rvm/gems/ruby-2.4.1@global/bin:/Users/dolby/.rvm/rubies/ruby-2.4.1/bin:/opt/local/bin:/opt/local/sbin:/Users/dolby/.opam/system/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/dolby/.rvm/bin:/opt/X11/bin:/Users/dolby/.rvm/bin:/Users/dolby/.rvm/bin
bash-4.4$ which node
/opt/local/bin/node
bash-4.4$ which jupyter
/Users/dolby/anaconda3/bin/jupyter
bash-4.4$ which yarn
/opt/local/bin/yarn
From /Users/dolby/anaconda3/share/jupyter/lab/staging/
, what does yarn list --pattern=vscode
give?
I get an error, I think:
bash-3.2$ pwd
/Users/dolby/anaconda3/share/jupyter/lab/staging
bash-3.2$ yarn list --pattern=vscode
yarn list v1.9.4
error No lockfile in this directory. Run `yarn install` to generate one.
info Visit https://yarnpkg.com/en/docs/cli/list for documentation about this command.
Ahh, I see, the error occurs when yarn is creating the lock file. Do you have any user or system level .npmrc
or .yarnrc
files?