lib: switch to mkLuaInline

This commit is contained in:
Ching Pei Yang 2024-03-16 09:29:07 +00:00
commit 77d3cd5e0c
3 changed files with 9 additions and 7 deletions

View file

@ -145,13 +145,13 @@ in {
type = pluginsType;
};
rawLua = lib.mkOptionType {
name = "rawLua";
check = val: isString val || val ? __raw;
luaInline = lib.mkOptionType {
name = "luaInline";
check = x: lib.nvim.lua.isLuaInline x || builtins.isString x;
merge = loc: defs: let
val =
if isString loc
then {__raw = val;}
then lib.generators.mkLuaInline loc
else loc;
in
lib.mergeOneOption val defs;