seblj / roslyn.nvim

Roslyn LSP plugin for neovim
MIT License
200 stars 23 forks source link

Is there anyway to refresh Lsp? #64

Closed JustBarnt closed 4 weeks ago

JustBarnt commented 4 weeks ago

I use neovim as my editor, but a lot of my C#/dotnet work is done with winforms, so I use Visual Studio purely for its winforms designer. But if make any changes there the roslyn lsp in neovim is unaware. So I have to stop the Lsp manually. Close the file then reopen it.

I was curious if it would be possible to add a custom command that can be ran to do this? running LspStop and 'LspStart' doesn't seem to do anything either.

seblj commented 4 weeks ago

Yeah that is kind of annoying, because it isn't registered in nvim-lspconfig, it doesn't really know of roslyn. I know there is plans to upstream some of this, but it doesn't seem like it is ready in the near future.

I have actually thought of implementing this as I have had a request for the same thing from one colleague. I will look into implementing it👍

JustBarnt commented 4 weeks ago

@seblj Awesome! Well, I look forward to it if you get the chance! This plugin has made working with C# so easy, so I really appreciate the work put into it!

seblj commented 4 weeks ago

Could you try the latest commit and see if they satisfy your needs? It should be :Roslyn stop and :Roslyn restart. I intentionally didn't add a start sucommand, since it is possible to just start it with :e since it is started on a BufEnter autocmd which is triggered on :e

JustBarnt commented 4 weeks ago

@seblj Yeah this is perfect! Thank you!