TabNine
TabNine copied to clipboard
Semantic completion for C#
Hey, it'd be awesome if you supported C# semantically.
Hopefully this can be done?
Can you recommend an LSP server for C#?
I can't I'm afraid, but I'd be grateful if you replied to some of the issues we've tagged you in. These are more pressing
Here's one https://github.com/OmniSharp/csharp-language-server-protocol
Any updates on this? :)
I tried to make C# semantic completion to work by using @OmniSharp csharp-language-server-protocol LSP server, but could not do it since I'm not too familiar of how these things should work. I expected that after building that project (which I succeeded) I would have an executable server, which I just need to configure appropriately, but didn't find that executable.
Anyone else ideas how to make it work with TabNine?
I tried to make C# semantic completion to work by using @OmniSharp csharp-language-server-protocol LSP server, but could not do it since I'm not too familiar of how these things should work. I expected that after building that project (which I succeeded) I would have an executable server, which I just need to configure appropriately, but didn't find that executable.
Anyone else ideas how to make it work with TabNine?
Did you tried the Omnisharp Roslyn LSP from here >> https://github.com/OmniSharp/omnisharp-roslyn/blob/master/src/OmniSharp.Stdio.Driver/Program.cs
I suppose adding this to >> https://github.com/codota/TabNine/blob/master/TabNine.toml would suffice, can you please give it a shot and let us know if it works.
Good tip! I managed to compile https://github.com/OmniSharp/omnisharp-roslyn however when configuring it in TabNine.toml like this (for Vim):
[language.cs]
command = "C:\\bin\\win7-x64\\OmniSharp.exe"
I just see "The language server exited unexpectedly" in TabNine code completion window in Vim. Is there anywhere I could see any log files of TabNine?
I also tried -lsp switch (-lsp | --languageserver Use Language Server Protocol.), like this:
[language.cs]
command = "c:\\bin\\win7-x64\\OmniSharp.exe"
args = ["-lsp"]
No difference.
I think it should be asked in omnisharp repository.
What part? If I execute OmniSharp.exe myself then it seems to work as expected so it seems to be more like a TabNine or its configuration problem. That's why I asked if I could see any logs created by TabNine.
It is Tabnine related problem? I think Omnisharp behavior is different from other LSP commands.
Please test Omnisharp -lsp manually without Tabnine.
Do you have any suggestions as to how could I test it manually? By just running it, it does not show any output and keeps running (does not crash) - I expect it does wait for some input to give me some output. Can I pipe something into it to test if it works as expected?
I'm sorry, but I don't know too much about inner workings of LSP-s and have previously only setup some to run with TabNine (basically just configuring TabNine.toml).
So I should ask it on Omnisharp repository. Omnisharp LSP behavior is not same with others.
@Shougo do you know that this is the case or do you suspect that this is the case?
Tabnine use stdin and stdout to communicate. I think Omnisharp doesn't use the interface.
Looking at the code at https://github.com/OmniSharp/omnisharp-roslyn/blob/master/src/OmniSharp.Stdio.Driver/Program.cs and reading the name OmniSharp.Stdio.Driver imply that it should work over stdin/stdout.
[language.cs] command = "C:\\bin\\win7-x64\\OmniSharp.exe"
Use scoop to install omnisharp under windows system, and then configure TabNine.toml as follows(for emacs):
[language.csharp]
command = "omnisharp"
It work!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.