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',
|
||||
dependencies = {
|
||||
-- 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',
|
||||
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
||||
|
||||
|
@ -578,6 +578,26 @@ require('lazy').setup({
|
|||
-- 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 = {
|
||||
-- cmd = {...},
|
||||
-- filetypes = { ...},
|
||||
|
@ -652,7 +672,8 @@ require('lazy').setup({
|
|||
end,
|
||||
formatters_by_ft = {
|
||||
lua = { 'stylua' },
|
||||
json = { 'jq' },
|
||||
json = { 'fixjson' },
|
||||
cs = { 'csharpier' },
|
||||
-- Conform can also run multiple formatters sequentially
|
||||
-- You can use a sub-list to tell conform to run *until* a formatter
|
||||
-- is found.
|
||||
|
@ -771,6 +792,9 @@ require('lazy').setup({
|
|||
}
|
||||
end,
|
||||
},
|
||||
{
|
||||
"Issafalcon/neotest-dotnet",
|
||||
},
|
||||
|
||||
{ -- You can easily change to a different colorscheme.
|
||||
-- Change the name of the colorscheme plugin below, and then
|
||||
|
@ -852,7 +876,7 @@ require('lazy').setup({
|
|||
'nvim-treesitter/nvim-treesitter',
|
||||
build = ':TSUpdate',
|
||||
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
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
|
@ -930,7 +954,7 @@ require('lazy').setup({
|
|||
-- 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`
|
||||
-- { import = 'custom.plugins' },
|
||||
}, {
|
||||
}, {
|
||||
ui = {
|
||||
-- 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
|
||||
|
@ -950,7 +974,7 @@ require('lazy').setup({
|
|||
lazy = '💤 ',
|
||||
},
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||
-- vim: ts=2 sts=2 sw=2 et
|
||||
|
|
Loading…
Reference in New Issue