Skip to content

Visual Studio sends 'shutdown' and 'exit' requests to Langauge Server on closing a Solution #543

@sajithpt

Description

@sajithpt

I am working on implementing a Language Server (LSP) as part of a Visual Studio Extension. We have a requirement of loading the Language Server when extension is loaded and keeping the Language Server loaded throughout the Visual Studio session till the package is disposed.

Language Server is loaded in Package Initialize following this -
How to load Language Server (LSP) when loading the extension package

Connection to Language Server is using Standard input/output streams.

But Visual Studio sends 'shutdown' followed by 'exit' messages to Language Server when a solution is closed in Visual Studio.
Even when no editor/file of Language Server's Content Type is opened, Visual Studio still sends 'shutdown' and 'exit' messages when a solution is closed.
It seems Visual Studio also closes the standard input/output streams of the Language Server process after sending ‘shutdown’ and ‘exit’ messages.

Is there a way to prevent Visual Studio exiting Language Server on closing a Solution?
Are there any events other than closing a Solution on which Visual Studio exit a Language Server?
How to have a Language Server that is loaded in Package Initialize to keep running till the Package is disposed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions