Skip to content

Commit e889d06

Browse files
committed
Add folder_empty_open icon config
1 parent c86d762 commit e889d06

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lua/neo-tree/defaults.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ local config = {
196196
folder_closed = "",
197197
folder_open = "",
198198
folder_empty = "",
199+
folder_empty_open = "",
199200
-- The next two settings are only a fallback, if you use nvim-web-devicons and configure default icons there
200201
-- then these will never be used.
201202
default = "*",

lua/neo-tree/sources/common/components.lua

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,15 +265,14 @@ end
265265

266266

267267
M.icon = function(config, node, state)
268-
local empty = ""
269-
local empty_open = ""
270-
271268
local icon = config.default or " "
272269
local highlight = config.highlight or highlights.FILE_ICON
273270
if node.type == "directory" then
274271
highlight = highlights.DIRECTORY_ICON
275272
if node.loaded and not node:has_children() then
276-
icon = not node.empty_expanded and empty or empty_open
273+
icon = not node.empty_expanded
274+
and config.folder_empty
275+
or config.folder_empty_open
277276
elseif node:is_expanded() then
278277
icon = config.folder_open or "-"
279278
else

0 commit comments

Comments
 (0)