mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-25 18:28:37 +02:00
docs: Allow to add an url in the online documentation (#1139)
* plugin/committia: Use correct maintainers import * plugins/neocord: Remove redyf as the entry is not in the list * docs: Allow to add an URL to the plugin
This commit is contained in:
parent
9d30e87455
commit
82a24d0d42
6 changed files with 88 additions and 6 deletions
|
@ -17,6 +17,47 @@
|
|||
../modules
|
||||
nixpkgsMaintainersList
|
||||
nixvimExtraArgsModule
|
||||
({lib, ...}:
|
||||
with lib; {
|
||||
# Attribute may contain the following fields:
|
||||
# - name: Name of the module
|
||||
# - kind: Either colorschemes or plugins
|
||||
# - url: Url for the plugin
|
||||
#
|
||||
# [kind name] will identify the plugin
|
||||
#
|
||||
# We need to use an attrs instead of a submodule to handle the merge.
|
||||
options.meta.nixvimInfo = mkOption {
|
||||
type =
|
||||
(types.nullOr types.attrs)
|
||||
// {
|
||||
# This will create an attrset of the form:
|
||||
# {
|
||||
# "path"."to"."plugin" = { "<name>" = <info>; };
|
||||
# }
|
||||
#
|
||||
# Where <info> is an attrset of the form:
|
||||
# {file = "path"; url = null or "<URL>";}
|
||||
merge = _: defs:
|
||||
lib.foldl' (acc: def:
|
||||
lib.recursiveUpdate acc {
|
||||
"${def.value.kind}"."${def.value.name}" = {
|
||||
inherit (def.value) url;
|
||||
inherit (def) file;
|
||||
};
|
||||
}) {
|
||||
plugins = {};
|
||||
colorschemes = {};
|
||||
}
|
||||
defs;
|
||||
};
|
||||
internal = true;
|
||||
default = null;
|
||||
description = ''
|
||||
Nixvim related information on the module
|
||||
'';
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue