✅ 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
})


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.
image.png
Was this page helpful?