nanozuki / tabby.nvim

A declarative, highly configurable, and neovim style tabline plugin. Use your nvim tabs as a workspace multiplexer!
MIT License
570 stars 20 forks source link

Draft: the next of tabby #41

Closed nanozuki closed 2 years ago

nanozuki commented 2 years ago

Presets:

local option = {
  layout = 'active_wins_at_tail',
  preset = 'tabby',
}

local option = {
  layout = 'active_wins_at_tail',
  preset = 'lualine',
}

high level config:

image
nanozuki commented 2 years ago
local option = {
  layout = 'active_wins_at_tail',
  hl = 'TabLineFill',
  head = {
    { '  ', hl = tabby.hl:from('TabLine') },
    { '', hl = tabby.hl:from('TabLine'):sep('TabLineFill') },
  },
  tab = {
    hl = tabby.hl:from('TabLine'),
    sep = { left = '', right = '' },
    label = { '', tabby.tab.number, tabby.tab.name, tabby.tab.close_btn('x') },
    join = ' ',

    active = {
      hl = tabby.hl:from('TabLineSel'),
      label = { '', tabby.tab.number, tabby.tab.name, tabby.tab.close_btn('x') },
    },
  },
  win = {
    hl = tabby.hl:from('TabLine'),
    label = { '', tabby.win.name('unique') },
    sep = { left = '', right = '' },
    join = ' ',

    top = {
      label = { '', tabby.win.name('unique') },
    },
  },
  tail = {
    { '', hl = tabby.hl:from('TabLine'):sep('TabLineFill') },
    { '  ', hl = tabby.hl:from('TabLine') },
  },
  ['tab.name'] = {
    default = function(tabid)
      tabby.win.unique_name(tabby.tab.focus_win(tabid))
    end,
  },
}
nanozuki commented 2 years ago

This target is too big, will be split.