Skip to content

Change color of filepath/filename based on file being in gitignore #1770

Answered by ibhagwan
ogrish55 asked this question in Q&A
Discussion options

You must be logged in to vote

You’d need to write your custom formatted for that, take a look at the implantation of path.filename_first if you wish to do that:

_to = function(o, v)
local _, hl_dir = utils.ansi_from_hl(o.hls.dir_part, "foo")
local _, hl_file = utils.ansi_from_hl(o.hls.file_part, "foo")
local v2 = tonumber(v) ~= 2 and "" or [[, "\xc2\xa0" .. string.rep(" ", 200) .. s]]
return ([[
return function(s, _, m)
local _path, _utils = m.path, m.utils
local _hl_dir = "%s"
local _hl_file = "%s"
local tail = _path.tail(s)
local parent = _path.parent(s)
if #_hl_file > 0 then
t…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@ibhagwan
Comment options

@ogrish55
Comment options

@ibhagwan
Comment options

@ogrish55
Comment options

@ibhagwan
Comment options

Answer selected by ogrish55
# for free to join this conversation on GitHub. Already have an account? # to comment
Category
Q&A
Labels
None yet
2 participants