ycmd icon indicating copy to clipboard operation
ycmd copied to clipboard

[RFC] Switch C# completer to LSP

Open bstaletic opened this issue 1 year ago • 6 comments

Very much not finished. Needs a lot more testing.

Currently missing pieces:

  • ~~Omnisharp does not seem to be picking up docstrings in LSP mode.~~
  • ~~CodeActions are ill-formed and hit a million asserts in ycmd. Starting with this one.~~
  • ~~Currently only works with user_option roslyn_binary_path.~~
  • ~~GetProjectRootFiles returns an empty list, so users need to cd to their desired project root.~~
  • ~~I could not get omnisharp to log anything at all.~~

Diagostics work, rename works. I have not tried the rest tonight, but I remember them working.

@dkaszews This should be enough to try it out a bit.


This change is Reviewable

bstaletic avatar Aug 08 '24 21:08 bstaletic

CodeActions are ill-formed and hit a million asserts in ycmd. Starting with this one.

I got CodeActions working.

Omnisharp does not seem to be picking up docstrings in LSP mode.

It should be there! https://github.com/OmniSharp/omnisharp-roslyn/blob/dacc49a3176c30767d0c1604cce6073afb0a7f6e/src/OmniSharp.LanguageServerProtocol/Handlers/OmniSharpHoverHandler.cs#L41 I really need someone with a proper omnisharp/C# setup to try GetType and give me the logs.

Currently only works with user_option roslyn_binary_path.

This should only need an updated monisharp, via ./update_omnisharp.py.

GetProjectRootFiles returns an empty list, so users need to cd to their desired project root.

Fixed as well.

I could not get omnisharp to log anything at all.

Hmm... still true. not sure what I'm doing wrong.

bstaletic avatar Aug 11 '24 07:08 bstaletic

Currently only works with user_option roslyn_binary_path.

We can now communicate with the bundled server, but it won't initialize on my machine.

This is where my knowledge of C# mess ends and I will be needing help from here on out.

bstaletic avatar Aug 11 '24 08:08 bstaletic

All tests are passing on non-Winblows. Winblows is hanging for some reason.

bstaletic avatar Aug 13 '24 06:08 bstaletic

The only thing missing here is testing this branch on Windows. @dkaszews may I ask for such a favour?

bstaletic avatar Sep 12 '24 19:09 bstaletic

@bstaletic Once again you caught me on vacation, I'll give it a spin Sunday evening or Monday 🙂

dkaszews avatar Sep 12 '24 19:09 dkaszews

@dkaszews No worries and apologies for interrupting your vacation again!

bstaletic avatar Sep 14 '24 14:09 bstaletic