diff --git a/plugins/filetrees/nvim-tree.nix b/plugins/filetrees/nvim-tree.nix index d1962647..cc98738b 100644 --- a/plugins/filetrees/nvim-tree.nix +++ b/plugins/filetrees/nvim-tree.nix @@ -30,6 +30,12 @@ with lib; let They will be overridden to fit the file_popup content. ''; in { + imports = [ + ( + mkRemovedOptionModule ["plugins" "nvim-tree" "view" "hideRootFolder"] + "Set `plugins.nvim-tree.renderer.rootFolderLabel` to `false` to hide the root folder." + ) + ]; options.plugins.nvim-tree = helpers.extraOptionsOptions // { @@ -365,10 +371,6 @@ in { Increase if you experience performance issues around screen refresh. ''; - hideRootFolder = helpers.defaultNullOpts.mkBool false '' - Hide the path of the current working directory on top of the tree. - ''; - width = helpers.defaultNullOpts.mkNullable (types.oneOf [ @@ -471,7 +473,7 @@ in { rootFolderLabel = helpers.defaultNullOpts.mkNullable # Type - (types.either types.str helpers.rawType) + (with types; oneOf [str bool helpers.rawType]) # Default ":~:s?$?/..?" # Description @@ -479,6 +481,8 @@ in { In what format to show root folder. See `:help filename-modifiers` for available `string` options. + Set to `false` to hide the root folder. + This can also be a `function(root_cwd)` which is passed the absolute path of the root folder and should return a string. e.g. @@ -949,7 +953,6 @@ in { centralize_selection = centralizeSelection; inherit cursorline; debounce_delay = debounceDelay; - hide_root_folder = hideRootFolder; inherit width; inherit side; preserve_window_proportions = preserveWindowProportions; diff --git a/tests/test-sources/plugins/filetrees/nvim-tree.nix b/tests/test-sources/plugins/filetrees/nvim-tree.nix index 971bf9e7..99c0e561 100644 --- a/tests/test-sources/plugins/filetrees/nvim-tree.nix +++ b/tests/test-sources/plugins/filetrees/nvim-tree.nix @@ -79,7 +79,6 @@ centralizeSelection = false; cursorline = true; debounceDelay = 15; - hideRootFolder = false; width = { min = 30; max = -1;