mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
lib/options: add mkCompositeOption'
variant
This commit is contained in:
parent
fc542329cd
commit
9bf7724b98
1 changed files with 6 additions and 1 deletions
|
@ -22,7 +22,12 @@ rec {
|
|||
);
|
||||
mkNullOrOption = type: description: mkNullOrOption' { inherit type description; };
|
||||
|
||||
mkCompositeOption = desc: options: mkNullOrOption (types.submodule { inherit options; }) desc;
|
||||
mkCompositeOption' =
|
||||
{ options, ... }@args:
|
||||
mkNullOrOption' (
|
||||
(filterAttrs (n: _: n != "options") args) // { type = types.submodule { inherit options; }; }
|
||||
);
|
||||
mkCompositeOption = description: options: mkCompositeOption' { inherit description options; };
|
||||
|
||||
mkNullOrStr = mkNullOrOption (with nixvimTypes; maybeRaw str);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue