A library to handle Language Server Protocol. (C#)
Clone or download
Latest commit d4decb5 Sep 6, 2018
Permalink
Failed to load latest commit information.
LanguageServer v7.0.1 Sep 6, 2018
nuget v7.0.1 Sep 6, 2018
.gitignore Initial commit May 23, 2017
LICENSE Initial commit May 23, 2017
LSP.sln Clean codes Jun 2, 2017
README.md Update README.md Aug 30, 2018

README.md

LanguageServerProtocol

A library to handle Language Server Protocol.

A sample program is available at: matarillo/vscode-languageserver-csharp-example

Installation

NuGet Package is available. Run the following command in NuGet Package Manager Console.

PM> Install-Package LanguageServerProtocol

Usage

LanguageServer.Connection is available.

  • To handle messages from client to server, call connection.RequestHandlers.Set method and/or connection.NotificationHandlers.Set method to register handler methods.
  • To handle messages from server to client, call methods of LanguageServer.Client.ClientProxy, LanguageServer.Client.WindowProxy, LanguageServer.Client.WorkspaceProxy, and LanguageServer.Client.TextDocumentProxy classes via Proxy property of the connection.
  • To start listening, call Listen() method of the connection.

For your convenience, LanguageServer.ServiceConnection is also available.

  • Define a connection class derived from LanguageServer.ServiceConnection.
  • To handle messages from client to server, override virtual methods.

Versioning

This library roughly follows SemVer, but its version is not synchronized with the protocol's.

  • Major - incremented when the release has breaking changes at .NET/IL level. Note that this may occur even if parameter types and/or return types are extended while keeping backward compatibility at JS/TS level.
  • Minor - incremented when the release has new non-breaking features.
  • Patch - incremented when other than those above.