mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-22 13:20:44 +00:00
lib/lua: move wrapLuaConfig to lib & structure arguments
This commit is contained in:
parent
522a1b9310
commit
d2d40362f4
1 changed files with 10 additions and 0 deletions
10
lib/lua.nix
10
lib/lua.nix
|
@ -5,6 +5,16 @@
|
|||
inherit (lib.strings) concatStringsSep concatMapStringsSep stringToCharacters;
|
||||
inherit (lib.trivial) boolToString;
|
||||
in rec {
|
||||
wrapLuaConfig = {
|
||||
luaBefore ? "",
|
||||
luaConfig,
|
||||
luaAfter ? "",
|
||||
}: ''
|
||||
lua << EOF
|
||||
${concatStringsSep "\n" [luaBefore luaConfig luaAfter]}
|
||||
EOF
|
||||
'';
|
||||
|
||||
# Convert a null value to lua's nil
|
||||
nullString = value:
|
||||
if value == null
|
||||
|
|
Loading…
Reference in a new issue