mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-31 07:09:40 +02:00
plugins/lsp: use a no-default option when there is no default provided
This commit is contained in:
parent
0d2751b53c
commit
88302aa17a
2 changed files with 26 additions and 14 deletions
|
@ -179,15 +179,6 @@ let
|
|||
|
||||
lspPackages = import ../lsp-packages.nix;
|
||||
|
||||
getLspPackage =
|
||||
name:
|
||||
if lib.hasAttr name lspPackages.packages then
|
||||
{ package = lspPackages.packages.${name}; }
|
||||
else if lib.hasAttr name lspPackages.customCmd then
|
||||
{ inherit (lspPackages.customCmd.${name}) package cmd; }
|
||||
else
|
||||
{ package = null; };
|
||||
|
||||
generatedServers = lib.pipe ../../../generated/lspconfig-servers.json [
|
||||
lib.importJSON
|
||||
(lib.map (
|
||||
|
@ -200,8 +191,13 @@ let
|
|||
inherit name;
|
||||
description = desc;
|
||||
}
|
||||
// (getLspPackage name)
|
||||
// (lspExtraArgs.${name} or { })
|
||||
// lib.optionalAttrs (lspPackages.packages ? ${name}) {
|
||||
package = lspPackages.packages.${name};
|
||||
}
|
||||
// lib.optionalAttrs (lspPackages.customCmd ? ${name}) {
|
||||
inherit (lspPackages.customCmd.${name}) package cmd;
|
||||
}
|
||||
// lspExtraArgs.${name} or { }
|
||||
))
|
||||
];
|
||||
in
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue