mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
docs: optionally add a description to plugins
This commit is contained in:
parent
2d4ebda245
commit
848543d527
4 changed files with 24 additions and 7 deletions
|
@ -65,12 +65,14 @@ with lib; let
|
|||
if builtins.length path >= 2 && lib.hasAttrByPath path nixvimInfo
|
||||
then let
|
||||
info = lib.getAttrFromPath path nixvimInfo;
|
||||
maintainers = lib.unique (options.config.meta.maintainers."${info.file}" or []);
|
||||
maintainers = lib.unique (options.config.meta.maintainers.${info.file} or []);
|
||||
maintainersNames = builtins.map (m: m.name) maintainers;
|
||||
in
|
||||
"# ${lib.last path}\n\n"
|
||||
+ (lib.optionalString (info.url != null) "Url: [${info.url}](${info.url})\n\n")
|
||||
+ (lib.optionalString (info.description != null) "${info.description}\n\n")
|
||||
+ (lib.optionalString (info.url != null) "**Url:** [${info.url}](${info.url})\n\n")
|
||||
+ (lib.optionalString (builtins.length maintainers > 0)
|
||||
"Maintainers: ${lib.concatStringsSep ", " (builtins.map (m: m.name) maintainers)}\n\n")
|
||||
"**Maintainers:** ${lib.concatStringsSep ", " maintainersNames}\n\n")
|
||||
else null;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue