mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
lib/options: add mkNullOrLua'
variant
This commit is contained in:
parent
3a151bbf09
commit
207bfc6e69
1 changed files with 10 additions and 8 deletions
|
@ -32,14 +32,16 @@ rec {
|
||||||
mkNullOrStr' = args: mkNullOrOption' (args // { type = with nixvimTypes; maybeRaw str; });
|
mkNullOrStr' = args: mkNullOrOption' (args // { type = with nixvimTypes; maybeRaw str; });
|
||||||
mkNullOrStr = description: mkNullOrStr' { inherit description; };
|
mkNullOrStr = description: mkNullOrStr' { inherit description; };
|
||||||
|
|
||||||
mkNullOrLua =
|
mkNullOrLua' =
|
||||||
desc:
|
args:
|
||||||
lib.mkOption {
|
mkNullOrOption' (
|
||||||
type = lib.types.nullOr nixvimTypes.strLua;
|
args
|
||||||
default = null;
|
// {
|
||||||
description = desc;
|
type = nixvimTypes.strLua;
|
||||||
apply = mkRaw;
|
apply = mkRaw;
|
||||||
};
|
}
|
||||||
|
);
|
||||||
|
mkNullOrLua = description: mkNullOrLua' { inherit description; };
|
||||||
|
|
||||||
mkNullOrLuaFn =
|
mkNullOrLuaFn =
|
||||||
desc:
|
desc:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue