-
Notifications
You must be signed in to change notification settings - Fork 25
Description
What would you like to see
Problem description
In our setup python is provided by bazel. So it's not available directly at startup. Only after the user has executed bazel run //docs:ide_support python is available in an .venv directory. By that time the extension has already started and loaded the python parts - which fails.
While that might be a little specific, in general the extension simply assumes python is pre-installed, which may not always be the case.
[Error - 6:43:31 PM] Esbonio Language Server client: couldn't create connection to server.
Launching server using command /home/lla2hi/score/score/.venv_docs/bin/python failed. Error: spawn /home/lla2hi/score/score/.venv_docs/bin/python ENOENT
[client] Launching server using command /home/lla2hi/score/score/.venv_docs/bin/python failed. Error: spawn /home/lla2hi/score/score/.venv_docs/bin/python ENOENT
Workaround
When we run our command which provides python, and then reload the VS Code window (0.x).
With 1.x it's also sufficient to restart the language server. But it will only actually run once an rst file is open and not directly.
Proposal
Add an pre-start-for-language-server (startupAction, initializeCommand, onStartupCommand, preStartCommand etc) parameter where we could configure our bazel run //docs:ide_support command. Run that (once) before running any python code.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status