From 0d7875d0af7b15d1b3f0aa79aa9931df7914b1ce Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sun, 30 Jul 2023 11:41:52 +0300 Subject: [PATCH] dev: cleanup --- configuration.nix | 9 +-------- lib/lua.nix | 11 ++++++++--- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/configuration.nix b/configuration.nix index 5b7c578..1438b00 100644 --- a/configuration.nix +++ b/configuration.nix @@ -112,15 +112,8 @@ inputs: let }; vim.filetree = { - nvimTreeLua = { + nvimTree = { enable = true; - renderer = { - rootFolderLabel = null; - }; - view = { - width = 25; - cursorline = false; - }; }; }; diff --git a/lib/lua.nix b/lib/lua.nix index 75f96e1..1d4cdb9 100644 --- a/lib/lua.nix +++ b/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: