Skip to content

Commit 7ee0f38

Browse files
committed
fix(filesystem): display git ignored items properly, fixes #407
1 parent 2cfebe6 commit 7ee0f38

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

lua/neo-tree/sources/filesystem/lib/fs_scan.lua

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,14 +191,16 @@ M.get_items = function(state, parent_id, path_to_reveal, callback, async, recurs
191191

192192
context.job_complete = function()
193193
local f = state.filtered_items or {}
194-
if f.hide_gitignored then
195-
local git_ignored = git.mark_ignored(state, context.all_items)
196-
if parent_id then
197-
vim.list_extend(state.git_ignored, git_ignored)
198-
else
199-
state.git_ignored = git_ignored
200-
end
194+
-- We need to check git_ignored at all times because even if they are not hidden
195+
-- they should be displayed differently.
196+
--if f.hide_gitignored then
197+
local git_ignored = git.mark_ignored(state, context.all_items)
198+
if parent_id then
199+
vim.list_extend(state.git_ignored, git_ignored)
200+
else
201+
state.git_ignored = git_ignored
201202
end
203+
--end
202204

203205
file_items.deep_sort(root.children)
204206
if parent_id then

0 commit comments

Comments
 (0)