-
Notifications
You must be signed in to change notification settings - Fork 41
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
No parent project could be resolved #57
Comments
hm.. you may need to create a dummy .csproj for csharp-ls to work a basic minimum copied from the output dir from |
I came across the same problem on Windows and Neovim. The problem is Neovim lsp client makes the uri like
And it's not the problem of Neovim you can see available uri options here: https://en.wikipedia.org/wiki/File_URI_scheme |
thanks for great follow up.. will check now |
Things should work on Windows now too, hopefully
Hopefully f63f3e4 fixes your issues on Windows (I don't have Windows machine nearby to test though) If you're not able to compile/run csharp-ls to validate this fix I will release new version later. |
Not sure if this is related, but: csharp-ls finds the csproj file, no problem. The file is added to workspace and there's LSP goodness in the buffer. However, it seems like no other projects get loaded. When I get hover text on classes outside of the current csproj, it just gives me a generic first file:
Opening a 2nd file from a related project
On the other hand, if I open up the Edit: It seems to work fine if I pass in the solution as an argument |
mhm.. ok, I definitely need to setup a Windows VM to verify all this on my own machine.. otherwise I will never fix this properly :( |
I also had this issue. It seems to be related to special characters in folders. The latest commits fixed in a sense, I don't get that error anymore, but no action works. It can't find reference to the symbols or anything, it is like the project is not loaded. |
Anyone who use neovim with
You can solve it with:
Here's an example of how you should configure lsp: local lspconfig = require('lspconfig')
-- local csharp_ls_bin = "$HOME/git/csharp-language-server/src/CSharpLanguageServer/bin/Debug/net7.0/CSharpLanguageServer"
lspconfig.csharp_ls.setup {
-- cmd = { csharp_ls_bin }, -- specify if you build project locally (modify csharp_ls_bin path first), otherwise download using `dotnet tools` & keep that like ignored
-- custom handler to be able go-to-definition(vim.lsp.buf.definition())
handlers = {
-- [Decompiler repo](https://github.com/Decodetalkers/csharpls-extended-lsp.nvim)
["textDocument/definition"] = require('csharpls_extended').handler,
},
-- specify root_dir, so lsp can find all solutions related to your workspace
root_dir = function(startpath)
return lspconfig.util.root_pattern("*.sln")(startpath)
or lspconfig.util.root_pattern("*.csproj")(startpath)
or lspconfig.util.root_pattern("*.fsproj")(startpath)
or lspconfig.util.root_pattern(".git")(startpath)
end,
} Related issues to |
Hey there, since neovim/nvim-lspconfig#2885 has been merged, the default configuration for All you need to do is update the |
I'm trying to get csharp-ls to work with nvim coc within a Unity project. I'm getting the following error:
Any idea if there is a way to make it work? Is this a known issue?
The text was updated successfully, but these errors were encountered: