@@ -1808,50 +1808,6 @@ highlight group is not, hard linking as follows: >
18081808 NvimTreeLspDiagnosticsHintFolderText NvimTreeDiagnosticHintFolderHL
18091809<
18101810
1811- ==============================================================================
1812- Hidden Display *nvim-tree-hidden-display*
1813-
1814- Show a summary of hidden files below the tree highlighted with `NvimTreeHiddenDisplay
1815-
1816- Configure via | nvim_tree.config.renderer | {hidden_display}
1817-
1818- *nvim_tree.config.renderer.hidden_display*
1819- • `none ` : disabled
1820- • `simple` : show how many hidden files are in a folder
1821- • `all ` : show how many hidden and the number of hidden files by reason
1822- • `fun(hidden_stats: table<string, integer>): string`: returns a summary of hidden stats
1823-
1824- Example `" all" ` :
1825- If a folder has 14 hidden items for various reasons, the display might show: >
1826- (14 total git: 5, dotfile: 9)
1827- <
1828- If a function is provided, it receives a table `hidden_stats` where keys are
1829- reasons and values are the count of hidden files for that reason.
1830-
1831- The `hidden_stats` argument is structured as follows, where <num> is the number
1832- of hidden files related to the field: >
1833- hidden_stats = {
1834- bookmark = <num>,
1835- buf = <num>,
1836- custom = <num>,
1837- dotfile = <num>,
1838- git = <num>,
1839- live_filter = <num>,
1840- }
1841- <
1842- Example of function that can be passed: >lua
1843- function(hidden_stats)
1844- local total_count = 0
1845- for reason, count in pairs(hidden_stats) do
1846- total_count = total_count + count
1847- end
1848-
1849- if total_count > 0 then
1850- return "(" .. tostring(total_count) .. " hidden)"
1851- end
1852- return nil
1853- end
1854- <
18551811
18561812==============================================================================
18571813Config *nvim-tree-config*
@@ -2104,6 +2060,19 @@ Config: renderer *nvim-tree-config-renderer*
21042060 end
21052061<
21062062
2063+ {hidden_display} *nvim_tree.config.renderer.hidden_display*
2064+
2065+ Summary of hidden nodes, below the last node in the directory, highlighted
2066+ with `NvimTreeHiddenDisplay` .
2067+ • `" none" ` : disabled, default
2068+ • `" simple" ` : total number of hidden files e.g.
2069+ • (3 hidden)
2070+ • `" all" ` : total and by reason: the filter that hid the node e.g.
2071+ • (14 total git: 5, dotfile: 9)
2072+ • `(fun(hidden_stats: nvim_tree.config.renderer.hidden_stats): string)`
2073+
2074+ See | nvim_tree.config.renderer.hidden_stats | for details and example.
2075+
21072076 Fields: ~
21082077 • {add_trailing}? (`boolean ` , default: `false` ) Appends a
21092078 trailing slash to folder and symlink folder
@@ -2121,7 +2090,7 @@ Config: renderer *nvim-tree-config-renderer*
21212090 • {indent_width}? (`integer` , default: `2 ` ) Number of spaces
21222091 for each tree nesting level. Minimum 1.
21232092 • {hidden_display}? (`nvim_tree.config.renderer.hidden_display` , default: `none ` )
2124- | nvim-tree-hidden-display |
2093+ | nvim_tree.config.renderer.hidden_display |
21252094 • {symlink_destination}? (`boolean ` , default: `true` ) Appends an
21262095 arrow followed by the target of the
21272096 symlink.
@@ -2150,6 +2119,35 @@ Config: renderer *nvim-tree-config-renderer*
21502119 • {icons} ? (`nvim_tree.config.renderer.icons` )
21512120 | nvim_tree.config.renderer.icons |
21522121
2122+ *nvim_tree.config.renderer.hidden_stats*
2123+ Number of hidden nodes in a directory by reason: the filter that hid the
2124+ node.
2125+
2126+ Passed to your | nvim_tree.config.renderer.hidden_display | function e.g. >lua
2127+
2128+ ---@param hidden_stats nvim_tree.config.renderer.hidden_stats
2129+ ---@return string? summary
2130+ local my_hidden_display = function(hidden_stats)
2131+ local total_count = 0
2132+ for reason, count in pairs(hidden_stats) do
2133+ total_count = total_count + count
2134+ end
2135+
2136+ if total_count > 0 then
2137+ return "(" .. tostring(total_count) .. " hidden)"
2138+ end
2139+ return nil
2140+ end
2141+ <
2142+
2143+ Fields: ~
2144+ • {bookmark} (`integer` )
2145+ • {buf} (`integer` )
2146+ • {custom} (`integer` )
2147+ • {dotfile} (`integer` )
2148+ • {git} (`integer` )
2149+ • {live_filter} (`integer` )
2150+
21532151*nvim_tree.config.renderer.icons*
21542152 Icons and separators
21552153
0 commit comments