mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-11-07 12:45:57 +01: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