Skip to content

Commit b8279cb

Browse files
committed
fix: merge user options before asserting options
1 parent 21ba280 commit b8279cb

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

lua/catppuccin/init.lua

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,16 +149,17 @@ function M.setup(user_conf)
149149
-- Parsing user config
150150
user_conf = user_conf or {}
151151

152-
if user_conf.auto_integrations ~= false then
153-
user_conf.integrations = vim.tbl_deep_extend(
152+
M.options = vim.tbl_deep_extend("keep", user_conf, M.default_options)
153+
154+
if M.options.auto_integrations then
155+
M.options.integrations = vim.tbl_deep_extend(
154156
"force",
155157
require("catppuccin.lib.detect_integrations").create_integrations_table(),
156-
user_conf.integrations or {}
158+
M.options.integrations or {}
157159
)
158160
end
159161

160-
M.options = vim.tbl_deep_extend("keep", user_conf, M.default_options)
161-
M.options.highlight_overrides.all = user_conf.custom_highlights or M.options.highlight_overrides.all
162+
M.options.highlight_overrides.all = M.options.custom_highlights or M.options.highlight_overrides.all
162163

163164
-- Get cached hash
164165
local cached_path = M.options.compile_path .. M.path_sep .. "cached"

0 commit comments

Comments
 (0)