diff --git a/lua/lualine/components/tabs/tab.lua b/lua/lualine/components/tabs/tab.lua index e9d75ab..15edfb1 100644 --- a/lua/lualine/components/tabs/tab.lua +++ b/lua/lualine/components/tabs/tab.lua @@ -31,7 +31,9 @@ function Tab:label() local bufnr = buflist[winnr] local file = modules.utils.stl_escape(vim.api.nvim_buf_get_name(bufnr)) local buftype = vim.fn.getbufvar(bufnr, '&buftype') - if buftype == 'help' then + if vim.bo.filetype == 'fugitive' then + return 'fugitive: ' .. vim.fn.fnamemodify(file, ':h:h:t') + elseif buftype == 'help' then return 'help:' .. vim.fn.fnamemodify(file, ':t:r') elseif buftype == 'terminal' then local match = string.match(vim.split(file, ' ')[1], 'term:.*:(%a+)')