|
40 | 40 |
|
41 | 41 | local function install_lsp_and_dap_if_needed() |
42 | 42 | require("installer").install_if_missing({ |
43 | | - "omnisharp", -- LSP |
| 43 | + -- "roslyn", -- LSP Needs to be manually installed from the Mason gui? |
44 | 44 | "netcoredbg", -- DAP |
45 | 45 | }) |
46 | 46 | end |
47 | 47 |
|
48 | 48 | local function configure_lsp() |
49 | | - local lsp = require("plugins.language-server") |
50 | | - |
51 | | - vim.lsp.config("omnisharp", { |
52 | | - cmd = { |
53 | | - vim.fn.executable("OmniSharp") == 1 and "OmniSharp" or "omnisharp", |
54 | | - "-z", -- https://github.com/OmniSharp/omnisharp-vscode/pull/4300 |
55 | | - "--hostPID", |
56 | | - tostring(vim.fn.getpid()), |
57 | | - "DotNet:enablePackageRestore=false", |
58 | | - "--encoding", |
59 | | - "utf-8", |
60 | | - "--languageserver", |
61 | | - }, |
62 | | - on_attach = function(client, bufnr) |
63 | | - -- https://github.com/OmniSharp/omnisharp-roslyn/issues/2483#issuecomment-1492605642 |
64 | | - local tokenModifiers = client.server_capabilities.semanticTokensProvider.legend.tokenModifiers |
65 | | - for i, v in ipairs(tokenModifiers) do |
66 | | - local tmp = string.gsub(v, " ", "_") |
67 | | - tokenModifiers[i] = string.gsub(tmp, "-_", "") |
68 | | - end |
69 | | - local tokenTypes = client.server_capabilities.semanticTokensProvider.legend.tokenTypes |
70 | | - for i, v in ipairs(tokenTypes) do |
71 | | - local tmp = string.gsub(v, " ", "_") |
72 | | - tokenTypes[i] = string.gsub(tmp, "-_", "") |
73 | | - end |
74 | | - lsp.on_attach(client, bufnr) |
75 | | - end, |
76 | | - handlers = { |
77 | | - ["textDocument/definition"] = require("omnisharp_extended").handler, |
78 | | - }, |
79 | | - }) |
80 | 49 | vim.lsp.enable("omnisharp") |
81 | 50 | end |
82 | 51 |
|
@@ -131,6 +100,6 @@ return { |
131 | 100 | ft = "cs", |
132 | 101 | virtual = true, |
133 | 102 | dependencies = { |
134 | | - "hoffs/omnisharp-extended-lsp.nvim", -- improve c# lsp |
| 103 | + "seblyng/roslyn.nvim", -- c# lsp |
135 | 104 | }, |
136 | 105 | } |
0 commit comments