Closed ckangnz closed 3 months ago
Found a solution on my own 🙂
Here is an example of what i've done if anyone is interested
fmt = function(name, context)
if vim.bo.filetype == 'TelescopePrompt' then
return '🔍Searching...'
elseif vim.startswith(name, 'fugitive:') then
return ''
elseif vim.startswith(name, 'Merginal:branchlist') then
return ' Branches'
elseif vim.endswith(name, '--graph --all') then
return ' GV'
elseif vim.bo.filetype == 'qf' then
return ' quickfix'
elseif vim.bo.filetype == 'oil' then
return '📂 Files'
elseif vim.bo.filetype == 'octo' then
return ' Pull Request'
elseif vim.bo.filetype == 'octo_panel' then
return ' PR Review'
elseif vim.bo.filetype == 'vim-plug' then
return '🧩 Vim Plug'
elseif name == '[No Name]' then
return '📄 New file'
elseif name == vim.fn.expand('%:t') then
return ' ' .. context.tabnr
end
return ' ' .. name
end
Requested feature
When I create a new tab, I want the tab to show an icon with tab number
1
. But when I rename the tab using :lualineRenameTab, I want it to show RenamedTab
Motivation
It's visually distracting to see the file name on my tab bar when I can already see it in
windows
. So I want to remove the texts from my tabs. But when I work on multiple projects on each tab, I want to to rename my tabs so that it's easy to identify which project i'm on.