diff --git a/extra.nix b/extra.nix index 55a2f6a..02ee01c 100644 --- a/extra.nix +++ b/extra.nix @@ -88,6 +88,9 @@ inputs: let vim.filetree = { nvimTreeLua = { enable = true; + renderer = { + rootFolderLabel = null; + }; view = { width = 25; }; diff --git a/modules/filetree/nvimtree-lua/config.nix b/modules/filetree/nvimtree-lua/config.nix index 6546232..4267b02 100644 --- a/modules/filetree/nvimtree-lua/config.nix +++ b/modules/filetree/nvimtree-lua/config.nix @@ -80,7 +80,6 @@ in { width = ${toString cfg.view.width}, side = ${"'" + cfg.view.side + "'"}, adaptive_size = ${boolToString cfg.view.adaptiveSize}, - hide_root_folder = ${boolToString cfg.view.hideRootFolder}, }, git = { enable = ${boolToString cfg.git.enable}, @@ -119,6 +118,12 @@ in { -- TODO: those two add_trailing = ${boolToString cfg.renderer.trailingSlash}, group_empty = ${boolToString cfg.renderer.groupEmptyFolders}, + + rootFolderLabel = ${ + if cfg.renderer.rootFolderLabel == null + then "false" + else "''${toString cfg.rootFolderLabel}''" + }, }, system_open = { diff --git a/modules/filetree/nvimtree-lua/nvimtree-lua.nix b/modules/filetree/nvimtree-lua/nvimtree-lua.nix index fbd0fb6..33a5508 100644 --- a/modules/filetree/nvimtree-lua/nvimtree-lua.nix +++ b/modules/filetree/nvimtree-lua/nvimtree-lua.nix @@ -160,12 +160,6 @@ with builtins; { description = "Width of the tree in charecters"; type = types.int; }; - - hideRootFolder = mkOption { - default = true; - description = "Hide the root folder"; - type = types.bool; - }; }; git = { @@ -282,6 +276,12 @@ with builtins; { type = types.bool; }; + rootFolderLabel = mkOption { + default = null; + description = "Root folder label. Set null to disable"; + type = with types; nullOr str; + }; + icons = { show = { file = mkOption {