tabline stuff

This commit is contained in:
wires 2025-04-14 15:27:11 -04:00
parent 9c48f4f610
commit 2f1c6bc03d
Signed by: wires
SSH key fingerprint: SHA256:9GtP+M3O2IivPDlw1UY872UPUuJH2gI0yG6ExBxaaiM
3 changed files with 34 additions and 2 deletions

View file

@ -16,9 +16,11 @@ map('n', '<leader>kc', ':new<cr>', { desc = 'New buffer' })
map('n', '<leader>ko', '<cmd>%bd|e#<cr>', { desc = 'Close all buffers but the current one' }) -- https://stackoverflow.com/a/42071865/516188
-- tab navigation
map('n', '<leader>tp', ':tabprevious<cr>', { desc = 'Prev tab' })
map('n', '<leader>tn', ':tabnext<cr>', { desc = 'Next tab' })
map('n', '<leader>tn', ':tabnew<cr>', { desc = 'New tab' })
map('n', '<leader>th', ':tabprevious<cr>', { desc = 'Prev tab' })
map('n', '<leader>tl', ':tabnext<cr>', { desc = 'Next tab' })
map('n', '<leader>td', ':tabclose<cr>', { desc = 'Close tab' })
map('n', '<leader>tc', ':tcd', { desc = 'Change working directory for tab' })
-- plugin management
map('n', '<leader>pc', ':Lazy check<cr>', { desc = 'Check plugins' })

View file

@ -11,6 +11,7 @@ return {
overrides = {
CursorLine = { bg = '#1e1e2e' },
LineNr = { fg = '#45475a' },
TabLineSel = { bg = '#181825' },
},
},
}

29
lua/plugins/tabby.lua Normal file
View file

@ -0,0 +1,29 @@
local theme = {
fill = 'TabLineFill',
current_tab = 'TabLineSel',
tab = 'TabLine',
}
return {
'nanozuki/tabby.nvim',
config = function()
require('tabby').setup({
line = function(line)
return {
line.tabs().foreach(function(tab)
local hl = tab.is_current() and theme.current_tab or theme.tab
return {
' ',
tab.name(),
' ',
hl = hl,
}
end),
line.spacer(),
hl = theme.fill,
}
end,
})
end,
lazy = false,
}