Add csharp support
This commit is contained in:
parent
bdcf55a34b
commit
0d7d0567ab
34
init.lua
34
init.lua
|
@ -412,7 +412,7 @@ require('lazy').setup({
|
||||||
'neovim/nvim-lspconfig',
|
'neovim/nvim-lspconfig',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
-- Automatically install LSPs and related tools to stdpath for Neovim
|
-- Automatically install LSPs and related tools to stdpath for Neovim
|
||||||
{ 'williamboman/mason.nvim', config = true }, -- NOTE: Must be loaded before dependants
|
{ 'williamboman/mason.nvim', config = true, opts = { ensure_installed = { "csharpier", "netcoredbg" }} }, -- NOTE: Must be loaded before dependants
|
||||||
'williamboman/mason-lspconfig.nvim',
|
'williamboman/mason-lspconfig.nvim',
|
||||||
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
||||||
|
|
||||||
|
@ -578,6 +578,26 @@ require('lazy').setup({
|
||||||
-- tsserver = {},
|
-- tsserver = {},
|
||||||
--
|
--
|
||||||
|
|
||||||
|
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,
|
||||||
|
},
|
||||||
|
|
||||||
lua_ls = {
|
lua_ls = {
|
||||||
-- cmd = {...},
|
-- cmd = {...},
|
||||||
-- filetypes = { ...},
|
-- filetypes = { ...},
|
||||||
|
@ -652,7 +672,8 @@ require('lazy').setup({
|
||||||
end,
|
end,
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
lua = { 'stylua' },
|
lua = { 'stylua' },
|
||||||
json = { 'jq' },
|
json = { 'fixjson' },
|
||||||
|
cs = { 'csharpier' },
|
||||||
-- Conform can also run multiple formatters sequentially
|
-- Conform can also run multiple formatters sequentially
|
||||||
-- You can use a sub-list to tell conform to run *until* a formatter
|
-- You can use a sub-list to tell conform to run *until* a formatter
|
||||||
-- is found.
|
-- is found.
|
||||||
|
@ -771,6 +792,9 @@ require('lazy').setup({
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"Issafalcon/neotest-dotnet",
|
||||||
|
},
|
||||||
|
|
||||||
{ -- You can easily change to a different colorscheme.
|
{ -- You can easily change to a different colorscheme.
|
||||||
-- Change the name of the colorscheme plugin below, and then
|
-- Change the name of the colorscheme plugin below, and then
|
||||||
|
@ -852,7 +876,7 @@ require('lazy').setup({
|
||||||
'nvim-treesitter/nvim-treesitter',
|
'nvim-treesitter/nvim-treesitter',
|
||||||
build = ':TSUpdate',
|
build = ':TSUpdate',
|
||||||
opts = {
|
opts = {
|
||||||
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'vim', 'vimdoc', 'python', 'rust', 'zig' },
|
ensure_installed = { 'bash', 'c_sharp', 'lua', 'luadoc', 'markdown', 'vim', 'python', 'rust', 'zig' },
|
||||||
-- Autoinstall languages that are not installed
|
-- Autoinstall languages that are not installed
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
highlight = {
|
highlight = {
|
||||||
|
@ -930,7 +954,7 @@ require('lazy').setup({
|
||||||
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
||||||
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
|
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
|
||||||
-- { import = 'custom.plugins' },
|
-- { import = 'custom.plugins' },
|
||||||
}, {
|
}, {
|
||||||
ui = {
|
ui = {
|
||||||
-- If you are using a Nerd Font: set icons to an empty table which will use the
|
-- If you are using a Nerd Font: set icons to an empty table which will use the
|
||||||
-- default lazy.nvim defined Nerd Font icons, otherwise define a unicode icons table
|
-- default lazy.nvim defined Nerd Font icons, otherwise define a unicode icons table
|
||||||
|
@ -950,7 +974,7 @@ require('lazy').setup({
|
||||||
lazy = '💤 ',
|
lazy = '💤 ',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||||
-- vim: ts=2 sts=2 sw=2 et
|
-- vim: ts=2 sts=2 sw=2 et
|
||||||
|
|
Loading…
Reference in New Issue