Skip to content
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

Integration with nvim-lsp #1777

Closed
svermeulen opened this issue Apr 29, 2020 · 13 comments
Closed

Integration with nvim-lsp #1777

svermeulen opened this issue Apr 29, 2020 · 13 comments
Labels

Comments

@svermeulen
Copy link

It sounds like this project can be run as an LSP server. Has anyone been able to get this working with neovim's built-in support for LSP?

@razzmatazz
Copy link
Contributor

I believe #1791 was the main blocker for the issue of LSP server not working with many clients. Maybe the next release with this PR merged will fix it for you.

@filipw
Copy link
Member

filipw commented May 25, 2020

can you try again after the latest release?

@filipw
Copy link
Member

filipw commented Jun 26, 2020

I will close this aa resolved, feel free to provide more info in case you still have any issuew

@filipw filipw closed this as completed Jun 26, 2020
@adelarsq
Copy link

@filipw Thanks for notice. I can confirm that it's working with nvim-lsp. I'm already using but still didn't have time to send a pull request on the plugin repository. I will send on next week I think.

@Iron-E
Copy link

Iron-E commented Jun 28, 2020

@filipw Thanks for notice. I can confirm that it's working with nvim-lsp. I'm already using but still didn't have time to send a pull request on the plugin repository. I will send on next week I think.

How did you get it working? I just left a comment here because I had an issue getting the client and server to stay connected.

@adelarsq
Copy link

adelarsq commented Jun 28, 2020

@Iron-E The problem is on root_dir config, that don't generate the right path, so the omnisharp never starts.

On the documentation says that the config are similar to coc.nvim, but I find that isn't really like that for root directory patterns.

@svermeulen
Copy link
Author

@adelarsq Can you update this issue when you add a PR to nvim-lsp?

@adelarsq
Copy link

Yes, I can. I will take note to remember.

@adelarsq
Copy link

adelarsq commented Jul 6, 2020

@svermeulen Someone else has sended a PR for omnisharp neovim/nvim-lspconfig#291 (almost the same that I was preparing). We are investigating some issues about the diagnostics on there.

I also did send a PR to solve a issue with C#/F# language servers neovim/nvim-lspconfig#296, so we can use file patterns to detect the root directory (like *.sln for all files ended with sln). I'm already using for both C# and F#. Just waiting the merge to be approved.

Also I will send a F# support soon. I use daily, but the setup its a bit complex. I will try to simplify before to send.

@svermeulen
Copy link
Author

Thanks!

@svermeulen
Copy link
Author

BTW I am not an expert on this repo but after poking around in the code I made this change in my local build, in order to fix the issues with diagnostics not showing up when using neovim and nvim-lsp. I'm not sure if it actually makes sense or not, so I'm reluctant to make a PR, but posting here in case it's helpful

@Iron-E
Copy link

Iron-E commented Jul 13, 2020

I would go ahead and create the PR since it seems that others can confirm the fix as well. Mind pinging us here again when it's up?

@svermeulen
Copy link
Author

svermeulen commented Jul 21, 2020

After learning more about it, I am now more convinced that the change I link to above is a really bad idea. It seems to cause diagnostics to be constantly triggered on all files in the solution so will slow everything down significantly

In my case, it looks like the problem is caused by the "file open" event being triggered to omnisharp server before omnisharp server has fully loaded all the projects in the solution. This is why, if you go to a different file, diagnostics do work. They just don't work in the initial set of files that were opened before the omnisharp server has fully initialized

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants