Skip to content

Bufferline separators are not colored properly #131

@blurridge

Description

@blurridge

image

As seen in the image, the highlights are not following properly which makes the separator misaligned. Is there any issues with how I setup bufferline.nvim and the colorscheme?

I tested out with tokyonight and the highlights are correct so this must be a colorscheme issue.

bufferline.lua:

return {
  {
    'akinsho/bufferline.nvim',
    dependencies = 'nvim-tree/nvim-web-devicons',
    config = function()
      require('bufferline').setup {
        options = {
          numbers = 'none', -- Show buffer numbers
          diagnostics = 'nvim_lsp', -- Integrate LSP diagnostics (optional)
          show_buffer_icons = true, -- Enable file type icons
          show_buffer_close_icons = false, -- Option to disable close icons on tabs
          show_close_icon = false,
          separator_style = 'thin', -- Style for separators (you can choose "thin", "slant", etc.)
          always_show_bufferline = true, -- Always show bufferline
          offsets = {
            {
              filetype = 'NvimTree',
              text = 'File Explorer',
              highlight = 'Directory',
              text_align = 'left',
            },
          },
        },
      }
      vim.api.nvim_set_keymap('n', '<Tab>', ':BufferLineCycleNext<CR>', { noremap = true, silent = true })
      vim.api.nvim_set_keymap('n', '<S-Tab>', ':BufferLineCyclePrev<CR>', { noremap = true, silent = true })
      vim.api.nvim_set_keymap('n', '<leader>w', ':bdelete<CR>', { noremap = true, silent = true })
    end,
  },
}

theme.lua:

return {
  { -- You can easily change to a different colorscheme.
    -- Change the name of the colorscheme plugin below, and then
    -- change the command in the config to whatever the name of that colorscheme is.
    --
    -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
    'Mofiqul/dracula.nvim',
    priority = 1000, -- Make sure to load this before all the other start plugins.
    init = function()
      -- Load the colorscheme here.
      -- Like many other themes, this one has different styles, and you could load
      -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
      vim.cmd.colorscheme 'dracula'

      -- You can configure highlights by doing something like:
      vim.cmd.hi 'Comment gui=none'
    end,
  },
}
-- vim: ts=2 sts=2 sw=2 et

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions