diff options
author | Michaël Ball <michael.ball@krotosaudio.com> | 2024-07-18 09:07:05 +0100 |
---|---|---|
committer | Michaël Ball <michael.ball@krotosaudio.com> | 2024-07-18 09:07:05 +0100 |
commit | 457ce9e6017c081e02a566895fa1fe488cd87b9c (patch) | |
tree | 05f49a483fe99c9935f43e8e4c25f80ba5077452 /neovim/.config/nvim/lua/plugins/tabby.lua | |
parent | 4c2a7cc1b0fa0e437476e06c1c11e1778d9cc92f (diff) |
Refactor plugins for lazy.nvim
Diffstat (limited to 'neovim/.config/nvim/lua/plugins/tabby.lua')
-rw-r--r-- | neovim/.config/nvim/lua/plugins/tabby.lua | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/neovim/.config/nvim/lua/plugins/tabby.lua b/neovim/.config/nvim/lua/plugins/tabby.lua new file mode 100644 index 0000000..b989ae5 --- /dev/null +++ b/neovim/.config/nvim/lua/plugins/tabby.lua @@ -0,0 +1,41 @@ +return { + { + 'nanozuki/tabby.nvim', + dependencies = { + 'nvim-tree/nvim-web-devicons', + }, + config = function () + local theme = { + fill = 'TabLineFill', + -- Also you can do this: fill = { fg='#f2e9de', bg='#907aa9', style='italic' } + head = 'TabLine', + current_tab = 'TabLineSel', + tab = 'TabLine', + win = 'TabLine', + tail = 'TabLine', + } + require('tabby.tabline').set(function(line) + return { + { + 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(''), + line.sep('', hl, theme.fill), + hl = hl, + margin = ' ', + } + end), + hl = theme.fill, + } + end) + end, + cond = function() return vim.fn.has('gui_running') == 0 end, + }, +} |