mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-24 01:38:40 +02:00
helpers/mkPlugin: add default value for description (use name)
This commit is contained in:
parent
97fb6d6a29
commit
e3ef5dae2b
1 changed files with 6 additions and 7 deletions
|
@ -313,7 +313,7 @@ with lib; rec {
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
name,
|
name,
|
||||||
description,
|
description ? null,
|
||||||
package ? null,
|
package ? null,
|
||||||
extraPlugins ? [],
|
extraPlugins ? [],
|
||||||
extraPackages ? [],
|
extraPackages ? [],
|
||||||
|
@ -323,11 +323,6 @@ with lib; rec {
|
||||||
}: let
|
}: let
|
||||||
cfg = config.plugins.${name};
|
cfg = config.plugins.${name};
|
||||||
|
|
||||||
description =
|
|
||||||
if description is null
|
|
||||||
then name
|
|
||||||
else description;
|
|
||||||
|
|
||||||
# TODO support nested options!
|
# TODO support nested options!
|
||||||
pluginOptions =
|
pluginOptions =
|
||||||
mapAttrs
|
mapAttrs
|
||||||
|
@ -374,7 +369,11 @@ with lib; rec {
|
||||||
in {
|
in {
|
||||||
options.plugins.${name} =
|
options.plugins.${name} =
|
||||||
{
|
{
|
||||||
enable = mkEnableOption description;
|
enable = mkEnableOption (
|
||||||
|
if description == null
|
||||||
|
then name
|
||||||
|
else description
|
||||||
|
);
|
||||||
}
|
}
|
||||||
// extraConfigOption
|
// extraConfigOption
|
||||||
// packageOption
|
// packageOption
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue