feat: rewrite nvimtree configuration and rename nvimTreeLua to nvimTree

WARNING: breaking change - see #109
This commit is contained in:
raf 2023-07-31 13:50:10 +03:00 committed by GitHub
commit f0dffff72e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 1432 additions and 594 deletions

View file

@ -13,12 +13,17 @@
else "'${value}'";
# convert an expression to lua
expToLua = exp:
if builtins.isList exp
then listToLuaTable exp
then listToLuaTable exp # if list, convert to lua table
else if builtins.isAttrs exp
then attrsetToLuaTable exp
else ("\"" + builtins.toJSON exp + "\"");
then attrsetToLuaTable exp # if attrs, convert to table
else if builtins.isBool exp
then lib.boolToString exp # if bool, convert to string
else if builtins.isInt exp
then builtins.toString exp # if int, convert to string
else (builtins.toJSON exp); # otherwise jsonify the value and print as is
# convert list to a lua table
listToLuaTable = list: