feat(extras): renamed extra omnisharp -> dotnet + added fautocomplete to lspconfig

This commit is contained in:
Folke Lemaitre
2025-10-20 08:47:38 +02:00
parent 37ecd06fad
commit 1b2e6e8986
2 changed files with 17 additions and 1 deletions

View File

@@ -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(...)

View File

@@ -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."