seblj / roslyn.nvim

Roslyn LSP plugin for neovim
MIT License
7 stars 6 forks source link

Newer Microsoft.Roslyn.LanguageServer versions do not show diagnostics #5

Open marcinjahn opened 3 days ago

marcinjahn commented 3 days ago

The README suggests to use the latest version of Mirosoft.CodeAnalysis.LanguageServer from MS feed. At the time of writing, it's version 4.12.0-1.24327.4.

The server gets initialized, I am able to execute Go To Definition/Implementation, however, the diagnostic messages no longer show up. I can write code that will not compile, and no errors will show up.

The version that I'm using right now is 4.9.0-3.23604.10, it seems to work pretty well.

seblj commented 2 days ago

I am not able to reproduce this with the latest server. Do you have a repo I could try it with?

marcinjahn commented 2 days ago

@seblj I just tried the whole thing again, and you're right, it does work. The thing that got me though, is that on the newer version (4.12....) it doesn't load diagnostics until I insert any character. On version 4.9.. I'm starting to see the diagnostic messages maybe 3 seconds tops after I open my simple 3-file solution console app. And I don't have to do anything else than opening the file. With the new server (I tried a few times now), it never starts automatically. I have to enter any characters first, and only then it starts to work. Odd.

Sounds like some case for hacks.lua :smile:

seblj commented 2 days ago

Does it load diagnostics for 4.9 with the latest commit before going into insert mode? Because I remember I also stumbled upon that, but that was early in my refactoring of this, and I didn't bother to look into if it was because of some refactoring I did, or if it was issue with the server

marcinjahn commented 2 days ago

Well, now I'm confused myself, because I just switched back to 4.9 and it requires something to be inserted now as well... At this point, I'm no longer sure whether it loaded without insert or not :confused:

Weird, because when I was switching before between 4.9 and 4.12 I felt the difference somehow. I'll experiment more.

seblj commented 2 days ago

My initial thought at the time was that it was something with vim.lsp.start, because if I remember correctly, it started happening around the time I started to use that🤷‍♂️