Skip to content

Commit

Permalink
Revert integration_default (#563)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtnvgr authored Jul 29, 2023
1 parent 17ae783 commit 057c34f
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 17 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ require("catppuccin").setup({
},
color_overrides = {},
custom_highlights = {},
integration_default = nil, -- set to true/false to enable/disable integrations by default
integrations = {
cmp = true,
gitsigns = true,
Expand Down
1 change: 0 additions & 1 deletion doc/catppuccin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ options and settings.
},
color_overrides = {},
custom_highlights = {},
integration_default = nil, -- set to true/false to enable/disable integrations by default
integrations = {
cmp = true,
gitsigns = true,
Expand Down
13 changes: 1 addition & 12 deletions lua/catppuccin/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -141,18 +141,7 @@ function M.setup(user_conf)
did_setup = true
-- Parsing user config
user_conf = user_conf or {}
local options = M.default_options
if user_conf.integration_default ~= nil then
options = vim.deepcopy(M.default_options)
for key, _ in pairs(options.integrations) do
if type(options.integrations[key]) == "table" and options.integrations[key].enabled ~= nil then
options.integrations[key].enabled = user_conf.integration_default
else
options.integrations[key] = user_conf.integration_default
end
end
end
M.options = vim.tbl_deep_extend("keep", user_conf, options)
M.options = vim.tbl_deep_extend("keep", user_conf, M.default_options)
M.options.highlight_overrides.all = user_conf.custom_highlights or M.options.highlight_overrides.all

-- Get cached hash
Expand Down
3 changes: 0 additions & 3 deletions lua/catppuccin/types.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
---@field no_underline boolean
-- Handles the style of general hl groups (see `:h highlight-groups`).
---@field styles CtpStyles
-- Control default of integrations. `true` enables all integrations and `false` disables all integrations
-- If `nil`, use the defaults provided by Catppuccin
---@field integration_default boolean?
-- Toggle integrations. Integrations allow Catppuccin to set the theme of various plugins.
---@field integrations CtpIntegrations
-- Catppuccin colors can be overwritten here.
Expand Down

0 comments on commit 057c34f

Please sign in to comment.