Skip to content

Commit

Permalink
feat(c#): replace csharp_ls with roslyn.nvim
Browse files Browse the repository at this point in the history
  • Loading branch information
cpea2506 committed Oct 19, 2023
1 parent 194e7b7 commit 7d29478
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
6 changes: 0 additions & 6 deletions after/ftplugin/cs.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
require("lvim.lsp.manager").setup("csharp_ls", {
handlers = {
["textDocument/definition"] = require("csharpls_extended").handler,
},
})

local formatters = require "lvim.lsp.null-ls.formatters"
formatters.setup {
{
Expand Down
14 changes: 14 additions & 0 deletions lua/pea/config/roslyn.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
return function()
local lsp = require "lvim.lsp"

require("roslyn").setup {
on_attach = lsp.common_on_attach,
capabilities = vim.tbl_deep_extend("force", lsp.common_capabilities(), {
workspace = {
didChangeWatchedFiles = {
dynamicRegistration = true,
},
},
}),
}
end
2 changes: 0 additions & 2 deletions lua/pea/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ local lsp = {
"bashls",
"clangd",
"cmake",
"csharp_ls",
"jsonls",
"lua_ls",
"marksman",
Expand All @@ -22,7 +21,6 @@ local lsp = {
automatic_configuration = {
skipped_servers = {
"clangd",
"csharp_ls",
"rust_analyzer",
unpack(lvim.lsp.automatic_configuration.skipped_servers),
},
Expand Down
9 changes: 5 additions & 4 deletions lua/pea/plugins.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
local plugins = {
"cpea2506/one_monokai.nvim",
{
"jmederosalvarado/roslyn.nvim",
config = require "pea.config.roslyn",
ft = "cs",
},
{
"hinell/lsp-timeout.nvim",
dependencies = "neovim/nvim-lspconfig",
Expand All @@ -23,10 +28,6 @@ local plugins = {
"cpea2506/relative-toggle.nvim",
event = "BufRead",
},
{
"Decodetalkers/csharpls-extended-lsp.nvim",
ft = "cs",
},
{
"chrishrb/gx.nvim",
event = "BufEnter",
Expand Down

0 comments on commit 7d29478

Please sign in to comment.