mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-22 13:20:44 +00:00
dev: cleanup
This commit is contained in:
parent
72a715b1bd
commit
0d7875d0af
2 changed files with 9 additions and 11 deletions
|
@ -112,15 +112,8 @@ inputs: let
|
|||
};
|
||||
|
||||
vim.filetree = {
|
||||
nvimTreeLua = {
|
||||
nvimTree = {
|
||||
enable = true;
|
||||
renderer = {
|
||||
rootFolderLabel = null;
|
||||
};
|
||||
view = {
|
||||
width = 25;
|
||||
cursorline = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
11
lib/lua.nix
11
lib/lua.nix
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue