Condividi tramite


LanguageServerProvider Class

Definition

Language server provider for implementing language services using Visual Studio Extensibility extension parts.

[Microsoft.VisualStudio.Extensibility.ExtensionContract(typeof(Microsoft.VisualStudio.RpcContracts.LanguageServerProvider.ILanguageServerProvider), typeof(Microsoft.VisualStudio.Extensibility.LanguageServer.LanguageServerProviderService))]
[Microsoft.VisualStudio.Extensibility.ExtensionPart(typeof(Microsoft.VisualStudio.Extensibility.LanguageServer.LanguageServerProvider), new System.String[] { "LanguageServerProviderConfiguration" })]
public abstract class LanguageServerProvider : Microsoft.VisualStudio.Extensibility.ExtensionPart
[<Microsoft.VisualStudio.Extensibility.ExtensionContract(typeof(Microsoft.VisualStudio.RpcContracts.LanguageServerProvider.ILanguageServerProvider), typeof(Microsoft.VisualStudio.Extensibility.LanguageServer.LanguageServerProviderService))>]
[<Microsoft.VisualStudio.Extensibility.ExtensionPart(typeof(Microsoft.VisualStudio.Extensibility.LanguageServer.LanguageServerProvider), new System.String[] { "LanguageServerProviderConfiguration" })>]
type LanguageServerProvider = class
    inherit ExtensionPart
Public MustInherit Class LanguageServerProvider
Inherits ExtensionPart
Inheritance
LanguageServerProvider
Attributes

Constructors

LanguageServerProvider()

Initializes a new instance of the LanguageServerProvider class.

LanguageServerProvider(ExtensionCore, VisualStudioExtensibility)

Initializes a new instance of the LanguageServerProvider class.

Fields

LanguageServerBaseDocumentType

Base document type for language servers which define the scope of applicable documents for this server.

Properties

Enabled

Gets or sets a value indicating whether the server provider is enabled and should be started automatically when a matching content type document is opened.

LanguageServerOptions

Gets or sets LanguageServerProvider options used by Visual Studio to customize the server configuration.

LanguageServerProviderConfiguration

Gets the configuration object for this language server provider. The value of this property is evaluated at compile time when building the extension.

Methods

CreateServerConnectionAsync(CancellationToken)

This method is called by Visual Studio to notify the extension that the LSP server should be started.

Dispose(Boolean)

Disposes the instane and underlying services.

OnServerInitializationResultAsync(ServerInitializationResult, LanguageServerInitializationFailureInfo, CancellationToken)

Method called by Visual Studio when the LSP server has completed its start-up and configuration steps, allowing the extension to handle the success and failure scenarios.

Applies to