diff --git a/README.md b/README.md index abbf6b64..7bb355f7 100644 --- a/README.md +++ b/README.md @@ -123,6 +123,7 @@ require("catppuccin").setup({ }, color_overrides = {}, custom_highlights = {}, + default_integrations = true, integrations = { cmp = true, gitsigns = true, @@ -253,6 +254,14 @@ require("catppuccin").setup({ }) ``` +Some integrations are enabled by default, you can control this behaviour with `default_integrations` option. + +```lua +require("catppuccin").setup({ + default_integrations = false, +}) +``` + Below is a list of supported plugins and their corresponding integration module. > [!Important] diff --git a/doc/catppuccin.txt b/doc/catppuccin.txt index 56303fcf..37d00518 100644 --- a/doc/catppuccin.txt +++ b/doc/catppuccin.txt @@ -104,6 +104,7 @@ options and settings. }, color_overrides = {}, custom_highlights = {}, + default_integrations = true, integrations = { cmp = true, gitsigns = true, @@ -246,6 +247,15 @@ example: }) < +Some integrations are enabled by default, you can control this behaviour with +`default_integrations` option. + +>lua + require("catppuccin").setup({ + default_integrations = false, + }) +< + Below is a list of supported plugins and their corresponding integration module. diff --git a/lua/catppuccin/init.lua b/lua/catppuccin/init.lua index 85cdd177..d6460317 100644 --- a/lua/catppuccin/init.lua +++ b/lua/catppuccin/init.lua @@ -35,6 +35,7 @@ local M = { types = {}, operators = {}, }, + default_integrations = true, integrations = { alpha = true, cmp = true, @@ -165,6 +166,9 @@ function M.setup(user_conf) did_setup = true -- Parsing user config user_conf = user_conf or {} + + if user_conf.default_integrations == false then M.default_options.integrations = {} end + 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 diff --git a/lua/catppuccin/types.lua b/lua/catppuccin/types.lua index b4b8b70e..799e120b 100644 --- a/lua/catppuccin/types.lua +++ b/lua/catppuccin/types.lua @@ -31,6 +31,8 @@ ---@field no_underline boolean? -- Handles the style of general hl groups (see `:h highlight-groups`). ---@field styles CtpStyles? +-- Should default integrations be used. +---@field default_integrations boolean? -- Toggle integrations. Integrations allow Catppuccin to set the theme of various plugins. ---@field integrations CtpIntegrations? -- Catppuccin colors can be overwritten here.