Best way to provide language diagnostics from a remote server resolved by a JupyterServerProvider? #17092
Unanswered
kevineger
asked this question in
Questions and Answers
Replies: 1 comment
-
|
I've managed to hookup a Now the complexity is having a connection to each remote language server (unique per |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've implemented a
JupyterServerProviderwhich resolves remote kernels, running on remote machines. The servers running these kernels have some libraries pre-installed (e.g.numpy). Pylance is reporting them as missing, e.g.: Import "numpy" could not be resolvedPylance (reportMissingImports).Is there anything available I can configure so that the user's local Python environment (where VS Code is running) is not used, and instead the remote one is? Remoting (by SSH or otherwise) into the underlying server is not an option. Will this require some kind of typing mirroring and telling Pylance to use them for the connected notebook? Sorry for the naive question, this is all new to me. I'll keep digging and update this discussion as I find things.
So far the only option sticking out to me I could explore would be to expose a language server on my remote server. Then my extension would register a new language client per server. Not sure how exactly I'd trigger/toggle it for just notebooks connected to specific servers... Need to investigate further.
Current
/api/kernelspecsreturn:{ "default": "python3", "kernelspecs": { "julia": { ... }, "python3": { "name": "python3", "spec": { "argv": [ "/usr/bin/python3", "-m", "custom_launcher", "-f", "{connection_file}" ], "env": {}, "display_name": "Python 3 (ipykernel)", "language": "python", "interrupt_mode": "signal", "metadata": { "debugger": true, "interpreter": { "path": "/usr/bin/python3" } } }, "resources": { ... } }, "ir": { ... }, } }The Python Language Server logs seem to be only using the local Python env:
Beta Was this translation helpful? Give feedback.
All reactions