OmniSharp/csharp-language-server-protocol

Purpose of this library is not immediately obvious

mattgallagher92 opened this issue · 3 comments

I've come to this repo because I've seen a project which refers to it to create a language server.

After spending a while digging around, it's not obvious to me whether this is meant to be a language server for the C# language (which the project I've seen has hijacked), or a library that can be used to write a language server implemented in .NET (for any language). My assumption is that it's the latter, but I think it would be worth making it obvious with a sentence or two at the beginning of the README.

One example could be "csharp-language-server-protocol is a library that makes it easy to create language servers (and clients) that run on .NET, by abstracting away boilerplate. It can be used to implement language servers for any language."

It is the latter. See this pinned issue for examples: #193 But yes the documentation (and project as a whole) is needing some updates.

Thanks for clarifying!

If your "language" for which you want LSP support already has a compiler written in C# it's an obvious step to use this library, and the sample is a good stating point (was for me).

Also I'd suggest you take a look at the Azure Bicep implementation as this is also based on OmniSharp and has the entire Language ecosystem for other hints of how to make it all work together.

A good place to start is with a TextDocumentSyncHandler : TextDocumentSyncHandler implementation that you can hook in some kind of Compilation Manager via DI, so you can track compilation for each source file as they change.