plugins/lsp: remove string support for plugins.lsp.enabledServers elements

This commit is contained in:
Gaetan Lepage 2025-04-23 09:54:47 +02:00
parent 60638182b8
commit e91333ae56

View file

@ -81,9 +81,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
enabledServers = mkOption {
type =
with types;
listOf (oneOf [
str
(submodule {
listOf (submodule {
options = {
name = mkOption {
type = str;
@ -104,8 +102,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
description = "Extra options for the server";
};
};
})
]);
});
description = "A list of enabled LSP servers. Don't use this directly.";
default = [ ];
internal = true;
@ -245,9 +242,6 @@ lib.nixvim.plugins.mkNeovimPlugin {
}"}
for i, server in ipairs(__lspServers) do
if type(server) == "string" then
require("lspconfig")[server].setup(__setup)
else
local options = ${runWrappers cfg.setupWrappers "server.extraOptions"}
if options == nil then
@ -258,7 +252,6 @@ lib.nixvim.plugins.mkNeovimPlugin {
require("lspconfig")[server.name].setup(options)
end
end
${cfg.postConfig}
end