feat: pass entry to is_hidden_file and is_always_hidden callbacks
Problem: the is_hidden_file and is_always_hidden config callbacks only received (name, bufnr), making it impossible to filter by entry type, permissions, or other metadata without reimplementing entry lookup. Solution: pass the full oil.Entry as a third argument to both callbacks. Existing configs that only accept (name, bufnr) are unaffected since Lua silently ignores extra arguments. The internal should_display function signature changes from (name, bufnr) to (bufnr, entry) to reflect its new contract. Cherry-picked from: stevearc/oil.nvim#644
This commit is contained in:
parent
16f3d7bfa9
commit
4ab4765a84
4 changed files with 15 additions and 12 deletions
|
|
@ -176,7 +176,7 @@ M.parse = function(bufnr)
|
|||
local original_entries = {}
|
||||
for _, child in pairs(children) do
|
||||
local name = child[FIELD_NAME]
|
||||
if view.should_display(name, bufnr) then
|
||||
if view.should_display(bufnr, child) then
|
||||
original_entries[name] = child[FIELD_ID]
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue