mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-26 18:59:00 +02:00
feat(extras): added simple csharp extra
This commit is contained in:
parent
f892ba5cff
commit
afdcec5b4a
1 changed files with 51 additions and 0 deletions
51
lua/lazyvim/plugins/extras/lang/omnisharp.lua
Normal file
51
lua/lazyvim/plugins/extras/lang/omnisharp.lua
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
return {
|
||||||
|
{ "Hoffs/omnisharp-extended-lsp.nvim", lazy = true },
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
opts = function(_, opts)
|
||||||
|
if type(opts.ensure_installed) == "table" then
|
||||||
|
vim.list_extend(opts.ensure_installed, { "c_sharp" })
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"jose-elias-alvarez/null-ls.nvim",
|
||||||
|
opts = function(_, opts)
|
||||||
|
local nls = require("null-ls")
|
||||||
|
table.insert(opts.sources, nls.builtins.formatting.csharpier)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"williamboman/mason.nvim",
|
||||||
|
opts = function(_, opts)
|
||||||
|
opts.ensure_installed = opts.ensure_installed or {}
|
||||||
|
table.insert(opts.ensure_installed, "csharpier")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
opts = {
|
||||||
|
servers = {
|
||||||
|
omnisharp = {
|
||||||
|
handlers = {
|
||||||
|
["textDocument/definition"] = function(...)
|
||||||
|
return require("omnisharp_extended").handler(...)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"gd",
|
||||||
|
function()
|
||||||
|
require("omnisharp_extended").telescope_lsp_definitions()
|
||||||
|
end,
|
||||||
|
desc = "Goto Definition",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
enable_roslyn_analyzers = true,
|
||||||
|
organize_imports_on_format = true,
|
||||||
|
enable_import_completion = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue