Skip to content

Request: Pre-Start command #1017

@AlexanderLanin

Description

@AlexanderLanin

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

No one assigned

    Labels

    enhancementNew feature or requestide:vscodeIssues that relate to the Esbonio vscode extension

    Type

    No type

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions