Skip to content

Commit

Permalink
fix(catppuccin): properly detect g:colors_name
Browse files Browse the repository at this point in the history
Ref: upstream breaking change [catppuccin/nvim@7a7a664]
  • Loading branch information
Jint-lzxy committed Apr 30, 2023
1 parent a014422 commit 226031b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lua/modules/configs/ui/bufferline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ return function()
highlights = {},
}

if vim.g.colors_name == "catppuccin" then
if vim.g.colors_name:find("catppuccin") then
local cp = require("modules.utils").get_palette() -- Get the palette.

local catppuccin_hl_overwrite = {
Expand Down
2 changes: 1 addition & 1 deletion lua/modules/utils/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ local palette = nil
---@return palette
local function init_palette()
if not palette then
palette = vim.g.colors_name == "catppuccin" and require("catppuccin.palettes").get_palette()
palette = vim.g.colors_name:find("catppuccin") and require("catppuccin.palettes").get_palette()
or {
rosewater = "#DC8A78",
flamingo = "#DD7878",
Expand Down

0 comments on commit 226031b

Please sign in to comment.