ILanguageServerProvider Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Interface used to initialize, activate, and report the initialization result of a Language Server.
public interface ILanguageServerProvider : IDisposable
type ILanguageServerProvider = interface
interface IDisposable
Public Interface ILanguageServerProvider
Implements IDisposable
- Implements
Remarks
This interface is implemented by the LanguageServerProvider class which extension authors extend to expose their server to the internal LSP infrastructure.
Methods
| Name | Description |
|---|---|
| CreateServerConnectionAsync(CancellationToken) |
Method called by Visual Studio when a language server connection is requested. |
| InitializeAsync(ILanguageServerProviderClient, CancellationToken) |
This method is called by Visual Studio before any other methods of this interface to initialize the ILanguageServerProvider and retreive the LanguageServerOptions. |
| OnServerInitializationResultAsync(ServerInitializationResult, LanguageServerInitializationFailureInfo, CancellationToken) |
Method called by Visual Studio when the LSP server has completed the "initialized" step, allowing the extension to handle the success and failure scenarios. |
| TryEnableProviderAsync(CancellationToken) |
This method is called by Visual Studio to notify the extension that the language client has been loaded but not yet activated. Visual Studio can start the language server immediately, or wait for user action to start. |