diff options
Diffstat (limited to 'lua/tabby.lua')
-rw-r--r-- | lua/tabby.lua | 58 |
1 files changed, 21 insertions, 37 deletions
diff --git a/lua/tabby.lua b/lua/tabby.lua index a189656..c2a1475 100644 --- a/lua/tabby.lua +++ b/lua/tabby.lua @@ -9,40 +9,24 @@ local theme = { close_sel = 'TabLineCloseSel', close = 'TabLineClose', } -require('tabby.tabline').set(function(line) - return { - { - { ' ', hl = theme.head }, - line.sep(' ', theme.head, theme.fill), - }, - line.tabs().foreach(function(tab) - local hl = tab.is_current() and theme.current_tab or theme.tab - return { - line.sep(' ', hl, theme.fill), - tab.is_current() and '' or '', - tab.number(), - tab.name(), - tab.close_btn({' ', hl = tab.is_current() and theme.close_sel or theme.close}), - line.sep(' ', hl, theme.fill), - hl = hl, - margin = ' ', - } - end), - line.spacer(), - line.wins_in_tab(line.api.get_current_tab()).foreach(function(win) - return { - line.sep(' ', theme.win, theme.fill), - win.is_current() and '·' or ' ', - win.buf_name(), - line.sep(' ', theme.win, theme.fill), - hl = theme.win, - margin = ' ', - } - end), - { - line.sep(' ', theme.tail, theme.fill), - { ' ', hl = theme.tail }, - }, - hl = theme.fill, - } -end) +require('tabby.tabline').use_preset('active_wins_at_tail', { + theme = { + fill = 'TabLineFill', -- tabline background + head = 'TabLine', -- head element highlight + current_tab = 'TabLineSel', -- current tab label highlight + tab = 'TabLine', -- other tab label highlight + win = 'TabLine', -- window highlight + tail = 'TabLine', -- tail element highlight + }, + nerdfont = true, -- whether use nerdfont + lualine_theme = nil, -- lualine theme name + -- tab_name = { + -- name_fallback = function(tabid) + -- return tabid + -- end, + -- }, + buf_name = { + mode = 'tail', + }, + +}) |