nvim-tree: remove deprecated 'hideRootFolder' option (#623)

* nvim-tree: remove deprecated 'hideRootFolder' option

also adds missing option to specify boolean for 'rootFolderLabel'

* nvim-tree: marks 'hideRootFolder' as deprecated
This commit is contained in:
Shayan Rashid 2023-10-05 15:26:24 -04:00 committed by GitHub
parent 73f21c063d
commit a0c35acab5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 7 deletions

View file

@ -30,6 +30,12 @@ with lib; let
They will be overridden to fit the file_popup content. They will be overridden to fit the file_popup content.
''; '';
in { 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 = options.plugins.nvim-tree =
helpers.extraOptionsOptions helpers.extraOptionsOptions
// { // {
@ -365,10 +371,6 @@ in {
Increase if you experience performance issues around screen refresh. 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 = width =
helpers.defaultNullOpts.mkNullable helpers.defaultNullOpts.mkNullable
(types.oneOf [ (types.oneOf [
@ -471,7 +473,7 @@ in {
rootFolderLabel = rootFolderLabel =
helpers.defaultNullOpts.mkNullable helpers.defaultNullOpts.mkNullable
# Type # Type
(types.either types.str helpers.rawType) (with types; oneOf [str bool helpers.rawType])
# Default # Default
":~:s?$?/..?" ":~:s?$?/..?"
# Description # Description
@ -479,6 +481,8 @@ in {
In what format to show root folder. See `:help filename-modifiers` for available `string` In what format to show root folder. See `:help filename-modifiers` for available `string`
options. 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 This can also be a `function(root_cwd)` which is passed the absolute path of the root folder
and should return a string. and should return a string.
e.g. e.g.
@ -949,7 +953,6 @@ in {
centralize_selection = centralizeSelection; centralize_selection = centralizeSelection;
inherit cursorline; inherit cursorline;
debounce_delay = debounceDelay; debounce_delay = debounceDelay;
hide_root_folder = hideRootFolder;
inherit width; inherit width;
inherit side; inherit side;
preserve_window_proportions = preserveWindowProportions; preserve_window_proportions = preserveWindowProportions;

View file

@ -79,7 +79,6 @@
centralizeSelection = false; centralizeSelection = false;
cursorline = true; cursorline = true;
debounceDelay = 15; debounceDelay = 15;
hideRootFolder = false;
width = { width = {
min = 30; min = 30;
max = -1; max = -1;