Skip to content

feat: pass entry to is_hidden_file and is_always_hidden#644

Open
johk06 wants to merge 1 commit into
stevearc:masterfrom
johk06:master
Open

feat: pass entry to is_hidden_file and is_always_hidden#644
johk06 wants to merge 1 commit into
stevearc:masterfrom
johk06:master

Conversation

@johk06
Copy link
Copy Markdown

@johk06 johk06 commented Jul 10, 2025

Having the entry available for is_hidden_file enables checks such as filtering by type (only show directories, only show symlinks etc.) as well as only showing files a user can actually access (by checking the user and group id for local files for instance).
The same applies to is_always_hidden.
Note: I've kept the old name parameter, since I don't think breaking existing configs makes sense here.

@github-actions github-actions Bot requested a review from stevearc July 10, 2025 18:07
barrettruth added a commit to barrettruth/canola.nvim that referenced this pull request Feb 20, 2026
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#644
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant