-
How could I get this tab style, like vscode? Currently the 'tab' navigation is on the right cornor, and no file name. |
Beta Was this translation helpful? Give feedback.
Answered by
adoyle-h
Jul 1, 2023
Replies: 1 comment 3 replies
-
Current one.nvim use tabby.nvim as tabline. Current config is my favorite. The tabby.nvim is highly configurable. You can override the config as you like. For example, below config comes from tabby.nvim document. require('one').setup {
plugins = {
{
'nanozuki/tabby.nvim',
config = function()
vim.o.showtabline = 2
-- see https://github.com/nanozuki/tabby.nvim#setup
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 {
{ { ' ', 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(''),
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)
end,
},
}
} It will look like that. The tabs on left, and wins_in_tab on right. |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
x2c3z4
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Current one.nvim use tabby.nvim as tabline. Current config is my favorite.
The tabby.nvim is highly configurable. You can override the config as you like. For example, below config comes from tabby.nvim document.