staline.nvim
staline.nvim copied to clipboard
Cannot specify highlight group for user defined sections
I have a custom section like following. I also tried returning only the path, so my middle group would be either like mid = { { 'StalineFile', section_filename } }
or mid = { section_filename }
.
local function section_filename()
local dir = vim.fn.expand('%:p:h:t')
local file = vim.fn.expand('%:t')
local path = string.format('%s/%s', dir, file)
if vim.bo.modifiable and vim.bo.modified then path = path .. '*' end
if vim.bo.readonly then path = ' ' .. path end
return { 'StalineFile', path }
end
However, in the first case I get this:
And in the second case this:
Heyyo @xdeafbabe , i havent set parse function to accept highlight+function
yet.
Will be implementing it shortly 😅
I have sent a fix, let me know if it works when you have time😅
@tamton-aquib It works just as I expected it to, thank you a lot!