mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-19 07:29:49 +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.strings) concatStringsSep concatMapStringsSep stringToCharacters;
|
||||||
inherit (lib.trivial) boolToString;
|
inherit (lib.trivial) boolToString;
|
||||||
in rec {
|
in rec {
|
||||||
|
wrapLuaConfig = {
|
||||||
|
luaBefore ? "",
|
||||||
|
luaConfig,
|
||||||
|
luaAfter ? "",
|
||||||
|
}: ''
|
||||||
|
lua << EOF
|
||||||
|
${concatStringsSep "\n" [luaBefore luaConfig luaAfter]}
|
||||||
|
EOF
|
||||||
|
'';
|
||||||
|
|
||||||
# Convert a null value to lua's nil
|
# Convert a null value to lua's nil
|
||||||
nullString = value:
|
nullString = value:
|
||||||
if value == null
|
if value == null
|
||||||
|
|
Loading…
Reference in a new issue