✅ Using Roslyn language server with Neovim lspconfig

Hi, I'm trying to make new Roslyn language server to work with Neovim. I configured it using lspconfig plugin like this:
local capabilities = require("cmp_nvim_lsp").default_capabilities()
configs.roslyn_ls = {
default_config = {
name = "roslyn-ls",
cmd = {
'dotnet',
'C:/Tools/roslyn-ls/Microsoft.CodeAnalysis.LanguageServer.dll',
'--logLevel=Information',
'--extensionLogDirectory=C:/Tools/roslyn-ls/Logs'
},
filetypes = { 'cs' },
root_dir = lspconfig.util.root_pattern("*.csproj", "*.sln"),
}
}

lspconfig.roslyn_ls.setup({
autostart = true,
capabilities = capabilities
})
local capabilities = require("cmp_nvim_lsp").default_capabilities()
configs.roslyn_ls = {
default_config = {
name = "roslyn-ls",
cmd = {
'dotnet',
'C:/Tools/roslyn-ls/Microsoft.CodeAnalysis.LanguageServer.dll',
'--logLevel=Information',
'--extensionLogDirectory=C:/Tools/roslyn-ls/Logs'
},
filetypes = { 'cs' },
root_dir = lspconfig.util.root_pattern("*.csproj", "*.sln"),
}
}

lspconfig.roslyn_ls.setup({
autostart = true,
capabilities = capabilities
})
and it seems like Neovim can see it in the available ls list (attached a screenshot). However, when I try to assign ls to the current buffer with :LspStart roslyn_ls, nothing happens. There are no logs in neither Neovim lsp log file nor Roslyn ls file. What am I missing? P.S. When I start omnisharp with :LspStart omnisharp everything works.
No description
2 Replies
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
WhiteBlackGoose
WhiteBlackGoose4mo ago
You can run the LS yourself with vim.lsp.start and pass your config in there