summaryrefslogtreecommitdiff
path: root/neovim/.config/nvim/lua/plugins/tabby.lua
diff options
context:
space:
mode:
authorMichaël Ball <michael.ball@krotosaudio.com>2024-08-23 09:36:12 +0100
committerMichaël Ball <michael.ball@krotosaudio.com>2024-08-23 09:36:12 +0100
commitac7583b0fbaa84c04164b3746b099407d9ff255e (patch)
treef704151fd9300047b83ab4036bf097d1cbb9c05f /neovim/.config/nvim/lua/plugins/tabby.lua
parent34d996020d70035cd84cd359ab06a19f91e3fb1c (diff)
Neovim changes
Diffstat (limited to 'neovim/.config/nvim/lua/plugins/tabby.lua')
-rw-r--r--neovim/.config/nvim/lua/plugins/tabby.lua27
1 files changed, 24 insertions, 3 deletions
diff --git a/neovim/.config/nvim/lua/plugins/tabby.lua b/neovim/.config/nvim/lua/plugins/tabby.lua
index b989ae5..0aa271e 100644
--- a/neovim/.config/nvim/lua/plugins/tabby.lua
+++ b/neovim/.config/nvim/lua/plugins/tabby.lua
@@ -4,16 +4,23 @@ return {
dependencies = {
'nvim-tree/nvim-web-devicons',
},
- config = function ()
+ 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',
+ current_win = 'TabLineSel',
win = 'TabLine',
tail = 'TabLine',
}
+ require('tabby').setup({
+ option = {
+ theme = theme,
+ nerdfont = true,
+ },
+ })
require('tabby.tabline').set(function(line)
return {
{
@@ -23,7 +30,6 @@ return {
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(''),
@@ -32,10 +38,25 @@ return {
margin = ' ',
}
end),
+ line.spacer(),
+ line.wins_in_tab(line.api.get_current_tab()).foreach(function(win)
+ local hl = win.is_current() and theme.current_win or theme.win
+ return {
+ line.sep('', hl, theme.fill),
+ win.file_icon(),
+ win.buf_name(),
+ line.sep('', hl, theme.fill),
+ hl = hl,
+ margin = ' ',
+ }
+ end),
+ {
+ line.sep('', theme.tail, theme.fill),
+ },
hl = theme.fill,
}
end)
end,
- cond = function() return vim.fn.has('gui_running') == 0 end,
+ --cond = function() return vim.fn.has('gui_running') == 0 end,
},
}