diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json index 2e53d92..38b7dbb 100644 --- a/nvim/lazy-lock.json +++ b/nvim/lazy-lock.json @@ -56,6 +56,7 @@ "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, "promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" }, "rainbow-delimiters.nvim": { "branch": "master", "commit": "011d98eaa3a73b5a51d82ce5bc6b1397dde95562" }, + "roslyn.nvim": { "branch": "main", "commit": "633a61c30801a854cf52f4492ec8702a8c4ec0e9" }, "rustaceanvim": { "branch": "master", "commit": "f03035fa03ccb36cd26d0792c946fbacba1d1a39" }, "snacks.nvim": { "branch": "main", "commit": "4e13b24e999e844ad4e6cd9dd1bc7021262ee4d6" }, "tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "3d3cd95e4a4135c250faf83dd5ed61b8e5502b86" }, diff --git a/nvim/lua/themystery/plugins/lsp.lua b/nvim/lua/themystery/plugins/lsp.lua index ba9ac5b..6f9e479 100644 --- a/nvim/lua/themystery/plugins/lsp.lua +++ b/nvim/lua/themystery/plugins/lsp.lua @@ -1,4 +1,4 @@ -local rust = { +return { { 'mrcjkb/rustaceanvim', version = '^5', -- Recommended @@ -26,20 +26,6 @@ local rust = { vim.keymap.set("n", "cf", crates.show_features_popup, opts) end, }, -} - -local go = { - { - "ray-x/go.nvim", - dependencies = { -- optional packages - "ray-x/guihua.lua", - }, - ft = { "go", 'gomod' }, - build = ':lua require("go.install").update_all_sync()' -- if you need to install/update all binaries - }, -} - -local lazydev = { { "folke/lazydev.nvim", ft = "lua", -- only load on lua files @@ -52,12 +38,20 @@ local lazydev = { }, }, { "Bilal2453/luvit-meta", lazy = true }, -- optional `vim.uv` typings -} - -return { - lazydev, - rust, - go, + { + "ray-x/go.nvim", + dependencies = { -- optional packages + "ray-x/guihua.lua", + }, + ft = { "go", 'gomod' }, + build = ':lua require("go.install").update_all_sync()' -- if you need to install/update all binaries + }, + { + "seblyng/roslyn.nvim", + ft = "cs", + opts = { + } + }, { 'VonHeikemen/lsp-zero.nvim', branch = 'v3.x', @@ -87,6 +81,7 @@ return { -- specific language servers 'mrcjkb/rustaceanvim', 'ray-x/go.nvim', + 'seblyng/roslyn.nvim' }, config = function() -- unknown filetypes(needed for some lsp servers) @@ -237,14 +232,6 @@ return { filetypes = { 'yaml', 'yaml.openapi' } } end, - csharp_ls = function() - require("lspconfig").csharp_ls.setup { - handlers = { - ["textDocument/definition"] = require("csharpls_extended").handler, - ["textDocument/typeDefinition"] = require("csharpls_extended").handler - } - } - end, clangd = function() require("lspconfig").clangd.setup { cmd = { 'clangd', '--offset-encoding=utf-16' }, @@ -284,9 +271,14 @@ return { end } - require("mason").setup(); + require("mason").setup({ + registries = { + 'github:mason-org/mason-registry', + 'github:Crashdummyy/mason-registry' + } + }); require("mason-lspconfig").setup({ - ensure_installed = { 'ts_ls', 'svelte', 'lua_ls', 'csharp_ls', 'rust_analyzer', 'gopls' }, + ensure_installed = { 'ts_ls', 'svelte', 'lua_ls', 'rust_analyzer', 'gopls' }, handlers = handlers, automatic_installation = false }) @@ -295,15 +287,15 @@ return { vim.diagnostic.config({ virtual_text = false, severity_sort = true, - signs = vim.g.have_nerd_font and { + signs = { text = { [vim.diagnostic.severity.ERROR] = '✘', [vim.diagnostic.severity.WARN] = '▲', [vim.diagnostic.severity.HINT] = '⚑', - [vim.diagnostic.severity.INFO] = '' + [vim.diagnostic.severity.INFO] = '󰋽' } - } or {}, + }, float = { style = 'minimal', border = 'rounded',