diff --git a/lua/lazyvim/plugins/extras/lang/omnisharp.lua b/lua/lazyvim/plugins/extras/lang/dotnet.lua similarity index 96% rename from lua/lazyvim/plugins/extras/lang/omnisharp.lua rename to lua/lazyvim/plugins/extras/lang/dotnet.lua index af2daed6..433ab154 100644 --- a/lua/lazyvim/plugins/extras/lang/omnisharp.lua +++ b/lua/lazyvim/plugins/extras/lang/dotnet.lua @@ -33,12 +33,13 @@ return { }, { "mason-org/mason.nvim", - opts = { ensure_installed = { "csharpier", "netcoredbg", "fsautocomplete", "fantomas" } }, + opts = { ensure_installed = { "csharpier", "netcoredbg", "fantomas" } }, }, { "neovim/nvim-lspconfig", opts = { servers = { + fsautocomplete = {}, omnisharp = { handlers = { ["textDocument/definition"] = function(...) diff --git a/lua/lazyvim/util/plugin.lua b/lua/lazyvim/util/plugin.lua index 58063385..02e6834f 100644 --- a/lua/lazyvim/util/plugin.lua +++ b/lua/lazyvim/util/plugin.lua @@ -26,6 +26,9 @@ M.deprecated_extras = { Either use `basedpyright`, or copy the [old extra](https://github.com/LazyVim/LazyVim/blob/c1f5fcf9c7ed2659c9d5ac41b3bb8a93e0a3c6a0/lua/lazyvim/plugins/extras/lang/python-semshi.lua#L1) to your own config. ]], } +M.renamed_extras = { + ["lazyvim.plugins.extras.lang.omnisharp"] = "lazyvim.plugins.extras.lang.dotnet", +} M.deprecated_modules = {} @@ -94,6 +97,18 @@ function M.fix_imports() return false end end + local rename = M.renamed_extras[spec.import] + if rename then + LazyVim.warn( + ("The extra `%s` was renamed to `%s`.\nPlease update your config for `%s`"):format( + spec.import, + rename, + spec.importing or "LazyVim" + ), + { title = "LazyVim" } + ) + spec.import = rename + end local dep = M.deprecated_extras[spec and spec.import] if dep then dep = dep .. "\n" .. "Please remove the extra from `lazyvim.json` to hide this warning."