akinsho / bufferline.nvim

A snazzy bufferline for Neovim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: i am using [folke/tokyonight.nvim] theme, and the colors are not rendered properly

daUnknownCoder opened this issue · comments

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

i found #433 and #439 but didnt find anything useful, i am not able to render termguicolors bcoz i have set the theme transparent
2023-10-20-221543_hyprshot

check the image above, it is self-explanatory, so any workaround or i have to set my theme to be non-transparent?

What did you expect to happen?

Expected behaviour: there should be some colors 😞

Config

return {
  "akinsho/bufferline.nvim",
  event = "VeryLazy",
  keys = {
    { "<leader>bp", "<Cmd>BufferLineTogglePin<CR>", desc = "Toggle pin" },
    { "<leader>bP", "<Cmd>BufferLineGroupClose ungrouped<CR>", desc = "Delete non-pinned buffers" },
    { "<leader>bo", "<Cmd>BufferLineCloseOthers<CR>", desc = "Delete other buffers" },
    { "<leader>br", "<Cmd>BufferLineCloseRight<CR>", desc = "Delete buffers to the right" },
    { "<leader>bl", "<Cmd>BufferLineCloseLeft<CR>", desc = "Delete buffers to the left" },
    { "[b", "<cmd>BufferLineCyclePrev<cr>", desc = "Prev buffer" },
    { "]b", "<cmd>BufferLineCycleNext<cr>", desc = "Next buffer" },
  },
  opts = {
    options = {
      separator_style = "slope",
      hover = {
        enabled = true,
        delay = 200,
        reveal = { "close" },
      },
      diagnostics = "nvim_lsp",
      always_show_bufferline = true,
      diagnostics_indicator = function(_, _, diag)
        local icons = require("NeutronVim.core.icons").diagnostics
        local ret = (diag.error and icons.Error .. " " .. diag.error .. " " or "")
          .. (diag.warning and icons.Warning .. " " .. diag.warning or "")
        return vim.trim(ret)
      end,
      offsets = {
        {
          filetype = "NvimTree",
          text = "Nvim tree",
          highlight = "Directory",
          text_align = "center",
        },
      },
    },
  },
  config = function(_, opts)
    vim.opt.termguicolors = true
    require("bufferline").setup(opts)
  end,
}

Additional Information

check my colorscheme config too maybe:

return {
  "folke/tokyonight.nvim",
  config = function()
    local tokyonight_status_ok, tokyonight = pcall(require, "tokyonight")
    if not tokyonight_status_ok then
      print("tokyonight not found!")
    end
    tokyonight.setup({
      style = "night",
      transparent = true,
      styles = {
        sidebars = "transparent",
        floats = "transparent",
      },
      vim.cmd([[colorscheme tokyonight]]),
    })
  end,
}

commit

maybe all, 357cc8f

commented

@daUnknownCoder I apologise but issues re. what colourscheme is behaving in what what circumstance are issues I won't dive into. These are always very specific to the colourscheme and the users specific setup. I know that folke (tokyonight's author) uses or used bufferline for his config and for lazyvim so Im pretty sure this config works for most people and so there is likely not an issue with the colorscheme or the plugin