-
Notifications
You must be signed in to change notification settings - Fork 2.2k
csharp_ls
not correctly using root_dir using 0.11 setup
#3849
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
Comments
From what I can tell they have more or less identical root dir logic. So that's surprising. nvim-lspconfig/lsp/csharp_ls.lua Lines 15 to 18 in 61e5109
nvim-lspconfig/lua/lspconfig/configs/csharp_ls.lua Lines 6 to 8 in 61e5109
|
pardon me if this is not the correct place to report this. In both cases, lspconfig does found the correct root dir, but csharp_ls is not using the root dir under 0.11 setup. 0.11 setup (incorrect in bullet 3):
0.10 setup (correct):
|
what is the filename of the current buffer in each case? |
using |
but what is a concrete example? wondering how it compares to the cwd, etc. |
Here is the minimum config to reproduce this error -- init.lua
vim.opt.rtp:append("path/to/local/nvim-lspconfig")
-- Setup 1
------------------------------
vim.lsp.config("csharp_ls", {
capabilities = vim.lsp.protocol.make_client_capabilities()
})
vim.lsp.enable({"csharp_ls"})
-- Setup 2
-------------------------------
-- lspconfig = require("lspconfig")
-- lspconfig.csharp_ls.setup({}) Setup 1Note how csharp-ls attempting to find and load solution based on cwd instead of root project pwd and lsC:\Users\weilan\Desktop\test\My project\Packages\com.unity.render-pipelines.universal\Runtime
lsp messages
LspInfo
Setup 2pwd and ls
lsp messagesgood, correctly loaded the .sln and reports an error
LspInfo
I found depending on how I enter the file, directly |
Description
I have switched to the new 0.11 setup, both clangd and lua_ls work find. After inspecting lsp log, it seems csharp_ls is not looking for .sln and .csproj in root dir but in the current working directory. If I manually call the old
lspconfig.csharp_ls.setup{}
, It correctly use the root dir.The text was updated successfully, but these errors were encountered: