diff options
| author | triethyl <triethylammonium@pm.me> | 2025-07-08 15:44:17 -0400 |
|---|---|---|
| committer | triethyl <triethylammonium@pm.me> | 2025-07-08 15:44:17 -0400 |
| commit | a544c622d31187f245b34b9b8b17cbb63a941480 (patch) | |
| tree | 5f5f22c3ba814a6880d0849a7076aba10eb99b5e /pkgs/custom-neovim/config/lua/plugins/tabby.lua | |
| parent | 6646af18a28b5f2ecc56a7d6364b9ca6cb401b8f (diff) | |
configured lualine and tabby
Former-commit-id: 947770af8ae586dfc89c0d498a766c7aaa802dd2
Diffstat (limited to 'pkgs/custom-neovim/config/lua/plugins/tabby.lua')
| -rw-r--r-- | pkgs/custom-neovim/config/lua/plugins/tabby.lua | 56 |
1 files changed, 54 insertions, 2 deletions
diff --git a/pkgs/custom-neovim/config/lua/plugins/tabby.lua b/pkgs/custom-neovim/config/lua/plugins/tabby.lua index 2ad03ed..ecba331 100644 --- a/pkgs/custom-neovim/config/lua/plugins/tabby.lua +++ b/pkgs/custom-neovim/config/lua/plugins/tabby.lua @@ -1,2 +1,54 @@ -vim.o.showtabline = 1 -require('tabby').setup() +local general_theme = utils.generate_theme_from_lualine() +local colors = { + current = { fg = general_theme.modes.insert, bg = general_theme.background, style = 'bold'}, + not_current = { fg = general_theme.text.light, bg = general_theme.background }; + fill = { bg = general_theme.background }; +}; +local theme = { + fill = colors.fill, + -- Also you can do this: fill = { fg='#f2e9de', bg='#907aa9', style='italic' } + head = colors.fill, + current_tab = colors.current, + tab = colors.not_current, + win = colors.fill, + tail = colors.fill, +} +require('tabby').setup({ + line = 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(), + 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, + -- option = {}, -- setup modules' option, +}) |
