-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to start language server (?) #933
Comments
I tried running the sample server and it does the same thing. Unfortunately that has also affected the OmniSharp-Roslyn builds as the LSP function hangs on https://github.com/OmniSharp/csharp-language-server-protocol/blob/master/src/Server/LanguageServer.cs#L289 |
Hi @p-lindberg , @rogerfar have you found a solution / workaround for this issue? I'm also having problems getting the sample server to run. |
Unfortunately not, this project looks to be abandoned if you look at the log: https://github.com/OmniSharp/csharp-language-server-protocol/commits/master We're now 6 months in without a proper commit. |
Same. I went down the route of building my own language server instead, using the libraries StreamJsonRpc and Microsoft.VisualStudio.LanguageServer.Protocol. Between those two, you're pretty much covered for everything that is not specific to your language. |
OK, that's annoying ... But thanks for your quick reply 👍 |
FWIW a lot of us are still using it (see #193) but yeah I don't know how much effort is being made to maintain it. I think I was the last one to contribute a bug fix, and last work I see by @david-driscoll is the work-in-progress for 3.17 in #893. David, do you have any insight into future plans for the project? |
Found a nice manageable example from @bjorkstromm https://github.com/bjorkstromm/lsp-example that helps to get started implementing a LSP server in C# including a VSCode client. However this demo is a bit older using "OmniSharp.Extensions.LanguageServer" Version="0.10.0". Seems like this demo stopped working with version 0.14.0. Some fundamental changes have been implemented with this version. Tried to rewrite this example for current version 0.19.7, but server doesn't work anymore and apparently, it is in the state that @rogerfar described. Does anyone have any idea what is missing to get the demo running with current version? |
This comment was marked as spam.
This comment was marked as spam.
Update: Finally I revisited the issue and got a small LSP running with current version 0.19.7.
Sample for a CompletionHander scaffold:
Sample initializing the server:
|
Any update on this? This is very annoying... Friendly ping @david-driscoll |
It is very likely that this issue can be traced back to faulty implemeted handlers. Initially, I had the same problem. The small sample code above should work. |
This issue still exists in 2024. |
Are you guys sending the initialize and initialized lsp client requests? |
I'm considering using the OmniSharp LanguageServer for one of my projects, but was unable to get the server to start. I read all of the documentation I could find and followed the implementation of the sample server, but still could not figure out what was wrong. I even tried running the sample server as-is, but could not get that to work.
The application gets as far as line 246 in LanguageServer.cs, where it will
await _initializingTask.ConfigureAwait(false);
, which never runs to completion.At this point, the server does not respond to any messages passed on the input stream. Connecting with a client (lsp4intellij) fails, and sending an initialisation message manually by pasting it into stdin yields no response. It does not even give you any errors if you send a malformed message or just plain gibberish.
I'm running this on MacOS 13.0, and tried both .NET 6.0 and 7.0.
The text was updated successfully, but these errors were encountered: