@@ -423,6 +423,7 @@ Following is the default configuration. See |nvim-tree-opts| for details.
423423 root_folder_label = ":~:s?$?/..?",
424424 indent_width = 2,
425425 special_files = { "Cargo.toml", "Makefile", "README.md", "readme.md" },
426+ hidden_display = "none",
426427 symlink_destination = true,
427428 highlight_git = "none",
428429 highlight_diagnostics = "none",
@@ -878,6 +879,49 @@ Number of spaces for an each tree nesting level. Minimum 1.
878879A list of filenames that gets highlighted with `NvimTreeSpecialFile` .
879880 Type: `table` , Default: `{ "Cargo.toml", "Makefile", "README.md", "readme.md", }`
880881
882+ *nvim-tree.renderer.hidden_display*
883+ Show a summary of hidden files below the tree using `NvimTreeHiddenDisplay
884+ Type: `function | string`, Default: `" none" `
885+
886+ Possible string values are:
887+ - `" none" ` : Doesn't inform anything about hidden files.
888+ - `" simple" ` : Shows how many hidden files are in a folder.
889+ - `" all" ` : Shows how many files are hidden and the number of hidden
890+ files per reason why they're hidden.
891+
892+ Example `" all" ` :
893+ If a folder has 14 hidden items for various reasons, the display might
894+ show: >
895+ (14 total git: 5, dotfile: 9)
896+ <
897+ If a function is provided, it receives a table `hidden_stats` where keys are
898+ reasons and values are the count of hidden files for that reason.
899+
900+ The `hidden_stats` argument is structured as follows, where <num> is the
901+ number of hidden files related to the field: >
902+ hidden_stats = {
903+ bookmark = <num>,
904+ buf = <num>,
905+ custom = <num>,
906+ dotfile = <num>,
907+ git = <num>,
908+ live_filter = <num>,
909+ }
910+ <
911+ Example of function that can be passed: >
912+ function(hidden_stats)
913+ local total_count = 0
914+ for reason, count in pairs(hidden_stats) do
915+ total_count = total_count + count
916+ end
917+
918+ if total_count > 0 then
919+ return "(" .. tostring(total_count) .. " hidden)"
920+ end
921+ return nil
922+ end
923+ <
924+
881925*nvim-tree.renderer.symlink_destination*
882926Whether to show the destination of the symlink.
883927 Type: `boolean ` , Default: `true`
@@ -2461,6 +2505,9 @@ Hidden: >
24612505 NvimTreeModifiedFileHL NvimTreeHiddenIcon
24622506 NvimTreeModifiedFolderHL NvimTreeHiddenFileHL
24632507<
2508+ Hidden Display: >
2509+ NvimTreeHiddenDisplay Conceal
2510+ <
24642511Opened: >
24652512 NvimTreeOpenedHL Special
24662513<
@@ -2872,6 +2919,7 @@ highlight group is not, hard linking as follows: >
28722919| nvim-tree.renderer.add_trailing |
28732920| nvim-tree.renderer.full_name |
28742921| nvim-tree.renderer.group_empty |
2922+ | nvim-tree.renderer.hidden_display |
28752923| nvim-tree.renderer.highlight_bookmarks |
28762924| nvim-tree.renderer.highlight_clipboard |
28772925| nvim-tree.renderer.highlight_diagnostics |
0 commit comments