feat(bufferline): integration for catppuccin highlights

I'm not sure how to do this if `LazyVim.config.colorscheme` is a
function, because it doesn't return a string to compare to. I also tried
`vim.cmd("colorscheme")`, but it executes too late. If you know of a way
to also include the function please feel free to make any changes
necessary.
This commit is contained in:
Iordanis Petkakis 2024-10-13 19:29:01 +03:00
parent 13a4a84e34
commit d631352be5

View file

@ -81,6 +81,10 @@ return {
},
},
config = function(_, opts)
---@diagnostic disable-next-line: param-type-mismatch
if type(LazyVim.config.colorscheme) == "string" and vim.startswith(LazyVim.config.colorscheme, "catppuccin") then
opts.highlights = require("catppuccin.groups.integrations.bufferline").get()
end
require("bufferline").setup(opts)
-- Fix bufferline when restoring a session
vim.api.nvim_create_autocmd({ "BufAdd", "BufDelete" }, {