From d631352be519906e647e8223da42262841928594 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Sun, 13 Oct 2024 19:29:01 +0300 Subject: [PATCH] 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. --- lua/lazyvim/plugins/ui.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 14807497..3a1292d1 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -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" }, {