lib/neovim-plugin: allow configLocation to be wrapped using mkOrder

This commit is contained in:
Matt Sturgeon 2024-12-14 01:26:45 +00:00
parent c181014422
commit 6a192a8604
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
4 changed files with 41 additions and 4 deletions

View file

@ -451,6 +451,34 @@ let
EOFFF'';
};
};
testMkLuaConfig = {
expr = lib.mapAttrs (_: loc: helpers.modules.mkConfigAt loc "Hello!") {
"simple string" = "foo";
"simple list" = [
"foo"
"bar"
];
"mkBefore string" = lib.mkBefore "foo";
"mkBefore list" = lib.mkBefore [
"foo"
"bar"
];
"mkAfter string" = lib.mkAfter "foo";
"mkAfter list" = lib.mkAfter [
"foo"
"bar"
];
};
expected = {
"simple string".foo = "Hello!";
"simple list".foo.bar = "Hello!";
"mkBefore string".foo = lib.mkBefore "Hello!";
"mkBefore list".foo.bar = lib.mkBefore "Hello!";
"mkAfter string".foo = lib.mkAfter "Hello!";
"mkAfter list".foo.bar = lib.mkAfter "Hello!";
};
};
};
in
if results == [ ] then