added csharp lsp

This commit is contained in:
Arastoo Khajehee 2026-03-22 12:20:02 +09:00
parent fbdd010cc8
commit d92b2e58f1
1 changed files with 10 additions and 1 deletions

View File

@ -603,7 +603,16 @@ require('lazy').setup({
-- clangd = {}, -- clangd = {},
-- gopls = {}, -- gopls = {},
pyright = {}, pyright = {},
omnisharp = {}, csharp_ls = {
root_dir = function(bufnr, on_dir)
local util = require 'lspconfig.util'
local fname = vim.api.nvim_buf_get_name(bufnr)
on_dir(
util.root_pattern('*.sln', '*.slnx', '*.csproj', 'global.json')(fname)
or vim.fs.root(fname, function(name) return vim.tbl_contains({ '*.sln', '*.slnx' }, name) end)
)
end,
}, -- omnisharp = {},
-- rust_analyzer = {}, -- rust_analyzer = {},
-- --
-- Some languages (like typescript) have entire language plugins that can be useful: -- Some languages (like typescript) have entire language plugins that can be useful: