Closed hersi97 closed 7 months ago
Thanks for the report :)
Can you post your barbar config and colorscheme?
Edit: I see you found a fix. Since you said you were new, I want to give a couple tips about highlighting:
:highlight link
two groups together such that changes to one affect the other.
:hi link BufferVisibleSign BufferCurrentSign
guibg
and guifg
: given their absence, they will be inferred by context (e.g. the background depends on what is around it, if only foreground is defined).Sure! I'm using lazy.nvim to manage plugins. I haven't tried it in a vacuum, with only these 3 plugins, but I don't think anything else would modifiy the colors.
-- ~/.config/nvim/lua/plugins/theme.lua
return {
{
"folke/tokyonight.nvim",
lazy = false,
priority = 1000,
opts = {
style = "storm",
},
config = function(_, opts)
require("tokyonight").setup(opts)
vim.cmd([[colorscheme tokyonight]])
end
},
"nvim-tree/nvim-web-devicons",
{
'romgrk/barbar.nvim',
dependencies = {
'lewis6991/gitsigns.nvim', -- OPTIONAL: for git status
'nvim-tree/nvim-web-devicons', -- OPTIONAL: for file icons
},
init = function()
vim.g.barbar_auto_setup = false
end,
opts = {
-- lazy.nvim will automatically call setup for you. put your options here, anything missing will use the default:
-- animation = true,
-- insert_at_start = true,
-- …etc.
icons = {
separator = { left = "▎", right = "" },
separator_at_end = true,
},
},
version = '^1.0.0', -- optional: only update when a new 1.x version is released
config = function(_, opts)
require("keymap").loadkeys(require("plugins.mappings.barbar"))
require("barbar").setup(opts)
vim.cmd([[hi BufferCurrentSign guifg=#0db9d7]]) -- NOTE: workaround for separator color
end
},
}
Also, thank you for the tips! :)
It seems that this is because tokyonight has a custom definition for the Buffer*Sign
groups which makes them invisible.
You can fix this by:
tokyonight.setup
, or
I'm not really sure if this is a bug in barbar or how colors are handled in nvim generally. But I realized I did not have separator between tabs while my cursor was in the opened file buffer, but it was visible while in any other buffer (eg. Telescope, help pages, sidebar, etc)
Cursor in opened file: Cursor in any other buffers (eg. buffer opened with :h, neo-tree, Telescope floating windows, etc.):
I realize this is solved by setting highlight groups (like
:hi BufferCurrentSign guifg=#0db9d7
), but then I would need to haveBufferCurrent<Part>
set to the same asBufferVisible<Part>
, which would defeat the purpose, I think.My current highlight groups:
I am quite new to neovim, am I overlooking something simple?