OneWare.OmniSharp.Extensions.LanguageProtocol
1.0.2
dotnet add package OneWare.OmniSharp.Extensions.LanguageProtocol --version 1.0.2
NuGet\Install-Package OneWare.OmniSharp.Extensions.LanguageProtocol -Version 1.0.2
<PackageReference Include="OneWare.OmniSharp.Extensions.LanguageProtocol" Version="1.0.2" />
<PackageVersion Include="OneWare.OmniSharp.Extensions.LanguageProtocol" Version="1.0.2" />
<PackageReference Include="OneWare.OmniSharp.Extensions.LanguageProtocol" />
paket add OneWare.OmniSharp.Extensions.LanguageProtocol --version 1.0.2
#r "nuget: OneWare.OmniSharp.Extensions.LanguageProtocol, 1.0.2"
#:package OneWare.OmniSharp.Extensions.LanguageProtocol@1.0.2
#addin nuget:?package=OneWare.OmniSharp.Extensions.LanguageProtocol&version=1.0.2
#tool nuget:?package=OneWare.OmniSharp.Extensions.LanguageProtocol&version=1.0.2
C# Language Server Protocol
This is an implementation of the Language Server Protocol written entirely in C# for .NET.
OneWare fork
This fork is published on NuGet under the OneWare. prefix, built against .NET 10 with full LSP 3.17/3.18 coverage.
| Upstream package | OneWare package |
|---|---|
OmniSharp.Extensions.LanguageProtocol |
OneWare.OmniSharp.Extensions.LanguageProtocol |
OmniSharp.Extensions.LanguageClient |
OneWare.OmniSharp.Extensions.LanguageClient |
OmniSharp.Extensions.LanguageServer |
OneWare.OmniSharp.Extensions.LanguageServer |
OmniSharp.Extensions.JsonRpc |
OneWare.OmniSharp.Extensions.JsonRpc |
Assembly names and the strong name key remain identical to upstream. Starting with 1.0.2, the request contracts are repository-owned MIT code instead of an external mediator dependency. This is a binary breaking change: recompile applications and plugins against the new packages, and upgrade the entire package closure together. Protocol model namespaces and wire formats remain unchanged.
<PackageReference Include="OneWare.OmniSharp.Extensions.LanguageClient" Version="1.0.2" />
<PackageReference Include="OneWare.OmniSharp.Extensions.LanguageProtocol" Version="1.0.2" />
Target frameworks: netstandard2.0, netstandard2.1, net8.0, net10.0.
Releasing
Push a v* tag (or run the release workflow manually) and
.github/workflows/release.yml builds, tests, packs and pushes to
nuget.org. It requires a NUGET_API_SECRET repository secret.
git tag v1.0.0 && git push origin v1.0.0
Getting Started
- git clone
- run
build.ps1/build.sh - ...
- Profit
Concepts
JSON-RPC
We have an implementation of JSON-RPC designed to implement the JSON-RPC as correctly as possible.
For more information about using the JsonRpcServer on it's own here.
Request dispatch
OmniSharp.Extensions.JsonRpc.Dispatching contains the repository-owned IRequest<TResponse>,
IRequestHandler<TRequest, TResponse>, Unit, IPipelineBehavior<TRequest, TResponse> and
IRequestDispatcher contracts. The implementation is original code under this repository's MIT license;
it does not copy, embed, downgrade or depend on MediatR.
For custom models, handlers or pipelines, replace using MediatR; with
using OmniSharp.Extensions.JsonRpc.Dispatching;. Handler methods retain their existing
Task<TResponse> Handle(TRequest, CancellationToken) signature; notifications return Task<Unit>.
Replace direct IMediator injection with IRequestDispatcher if you used the routing dispatcher.
This dispatcher only supports protocol requests (including notifications as unit-response requests),
not general-purpose publish, streaming, pre/post-processors or exception-handler registrations.
Custom behaviors still register through Services.AddTransient(typeof(IPipelineBehavior<,>), typeof(MyBehavior<,>)).
Routing selects the descriptor's handler within a separate DI scope for each invocation.
Behaviors execute in registration order, outermost first, and may short-circuit dispatch.
next() retains the current cancellation token; next(token) replaces it for downstream behaviors
and the handler. Exceptions and cancellation propagate to the existing JSON-RPC/LSP/DAP routing logic.
Only type adapters are cached, so handlers and scoped dependencies are never shared across requests.
Source generators use the same contracts, including the new Unit type.
To validate a local build before publishing:
dotnet pack src/Client/Client.csproj -c Release -p:OneWarePackageVersion=1.0.2 -o ./artifacts/nuget
# Pack JsonRpc.Generators, JsonRpc, Protocol, Shared and Server to the same directory as well.
dotnet restore path/to/Consumer.csproj --source ./artifacts/nuget --source https://api.nuget.org/v3/index.json
Microsoft.Extensions.*
We re-use some of the common packages used by .NET Core.
Microsoft.Extensions.Configurationfor common configurationMicrosoft.Extensions.DependencyInjectionfor common Dependency Injection abstractionsMicrosoft.Extensions.Loggingfor logging.
Language Server Protocol
We strive to ensure that we implement all the types, request and notifications that are defined by the Language Server Protocol. Sometimes this is difficult due to the nature of LSP TypeScript upbringing, but the goal is 100% conformance with the protocol itself.
For more information about using the LanguageClient / LanguageServer on it's own here.
Debug Adapter Protocol
We strive to ensure that we implement all the types, events and requests that are defined by the Debug Adapter Protocol.
For more information about using the DebugAdapterClient / DebugAdapterServer on it's own here.
Status
| Azure Pipelines | GitHub Actions |
|---|---|
License
Copyright © .NET Foundation, and contributors.
OmniSharp is provided as-is under the MIT license. For more information see LICENSE.
Code of Conduct
This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information see the .NET Foundation Code of Conduct.
Contribution License Agreement
By signing the CLA, the community is free to use your contribution to .NET Foundation projects.
.NET Foundation
This project is supported by the .NET Foundation.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Extensions.Configuration (>= 10.0.9)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.9)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.9)
- OneWare.OmniSharp.Extensions.JsonRpc (>= 1.0.2)
- OneWare.OmniSharp.Extensions.JsonRpc.Generators (>= 1.0.2)
-
.NETStandard 2.1
- Microsoft.Extensions.Configuration (>= 10.0.9)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.9)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.9)
- OneWare.OmniSharp.Extensions.JsonRpc (>= 1.0.2)
- OneWare.OmniSharp.Extensions.JsonRpc.Generators (>= 1.0.2)
-
net10.0
- Microsoft.Extensions.Configuration (>= 10.0.9)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.9)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.9)
- OneWare.OmniSharp.Extensions.JsonRpc (>= 1.0.2)
- OneWare.OmniSharp.Extensions.JsonRpc.Generators (>= 1.0.2)
-
net8.0
- Microsoft.Extensions.Configuration (>= 10.0.9)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.9)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.9)
- OneWare.OmniSharp.Extensions.JsonRpc (>= 1.0.2)
- OneWare.OmniSharp.Extensions.JsonRpc.Generators (>= 1.0.2)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on OneWare.OmniSharp.Extensions.LanguageProtocol:
| Package | Downloads |
|---|---|
|
OneWare.Essentials
Essentials Needed for One Ware Plugin Development |
|
|
OneWare.OmniSharp.Extensions.LanguageServer.Shared
Shared classes for language server protocol |
|
|
OneWare.OmniSharp.Extensions.LanguageClient
You can use this package to interact with a Language Server using the language server protocol |
|
|
OneWare.OmniSharp.Extensions.LanguageServer
You can use this package to create a language server, that will be consumed by many clients |
GitHub repositories
This package is not used by any popular GitHub repositories.