Hi Community,
I’m migrating the code analysis part of a VS Code extension into an LSP, and I’m trying to test it out with Jupyter Lab as well.
The LSP itself is not a separate npm package for now, but lives as a separate server module inside the VS Code extension’s repository. So, what I’m trying to do is point the Jupyter Lab LSP configuration to execute my compiled server.js
at a dedicated location on my file system.
I’m on a Windows 10 system, I have jupyterlab-lsp installed, and I’ve tried the following configuration but the language server doesn’t seem to spin up.
Based on Configuring backend — Language Server Protocol integration for Jupyter[Lab] I added a new file in c:\Users\<username>\AppData\Local\Programs\Python\Python311\etc\jupyter\jupyter_server_config.d\
called codiga_language_server.json
with the following content:
{
"LanguageServerManager": {
"language_servers": {
"codiga_language_server": {
"version": 2,
"argv": ["node", "d:\\vscode-plugin\\server\\out\\server.js", "--node-ipc"],
"languages": ["python"],
"mime_types": ["text/python"],
"display_name": "Codiga Language Server"
}
}
}
}
My understanding of argv
is that it should assemble a shell/cmd command that would invoke the server. Although, I’m confused about that because the few examples I’ve seen seem different from what I understand based on the documentation.
Then, I added the following in Settings > Advanced Settings Editor > Language Server > User Preferences based on https://github.com/jupyter-lsp/jupyterlab-lsp:
{
"language_servers": {
"codiga_language_server": {
"serverSettings": {
}
}
}
}
I don’t see any log message from Jupyter that it has picked up my LSP configuration (though I don’t know if there supposed to be any such message), and I have into-file logging in my LSP, that doesn’t even create the log file.
I’d appreciate some pointers on this, because I’m not sure if I’m missing any other configuration, or what have I possibly misconfigured. Thank you in advance.
PS: I’m new to Jupyter Lab, so any detail is useful.