feat: pass oil bufnr to custom filename highlight function (#552)

This enables you to determine the full directory path, enabling e.g.,
HL groups for Git
This commit is contained in:
Ian Wright 2025-01-07 21:56:03 -05:00 committed by GitHub
parent a6a4f48b14
commit f5c563a074
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 11 additions and 9 deletions

View file

@ -286,7 +286,7 @@ local M = {}
---@field natural_order boolean|"fast"
---@field case_insensitive boolean
---@field sort oil.SortSpec[]
---@field highlight_filename? fun(entry: oil.Entry, is_hidden: boolean, is_link_target: boolean, is_link_orphan: boolean): string|nil
---@field highlight_filename? fun(entry: oil.Entry, is_hidden: boolean, is_link_target: boolean, is_link_orphan: boolean, bufnr: integer): string|nil
---@class (exact) oil.SetupViewOptions
---@field show_hidden? boolean Show files and directories that start with "."