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