mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
plugins/lsp: remove string support for plugins.lsp.enabledServers elements
This commit is contained in:
parent
60638182b8
commit
e91333ae56
1 changed files with 26 additions and 33 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue