Allow returning of path_style from path_display function
sarmong opened this issue · 2 comments
Is your feature request related to a problem? Please describe.
I like filename_first
option of path_display
, however I also want to be able to modify the path. So, I need to pass a function to path_display
. However, I am not able to replicate the way filename_first
looks, because I cannot pass TelescopeResultsComment
hl group.
Describe the solution you'd like
Allow returning optional second value from path_display
function.
I am also thinking now that maybe another approach for this problem is to make a function part of the list for path_display
?
So, one could do something like this:
path_display = {
'filename_first',
function(_, path)
return string.gsub(path, 'substr', 'mystr')
end
}
However, I would say that returning path_style
is still useful. This would just complement it.
Yeah letting users return an optional table of highlights is probably a good idea.
I'll take a look at your PR.