Skip to content

Commit

Permalink
Merge pull request #264 from Jint-lzxy/catppuccin-compile-legacy
Browse files Browse the repository at this point in the history
chore(catppuccin): Update compile fn. [0.7]
  • Loading branch information
ayamir authored Oct 7, 2022
2 parents 3008c76 + cd93175 commit 212217e
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions lua/modules/ui/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -163,30 +163,9 @@ function config.catppuccin()
return cp
end

local function set_auto_compile(enable_compile)
-- Setting auto-compile for catppuccin.
if enable_compile then
vim.api.nvim_create_augroup("_catppuccin", { clear = true })

vim.api.nvim_create_autocmd("User", {
group = "_catppuccin",
pattern = "PackerCompileDone",
callback = function()
require("catppuccin").compile()
vim.defer_fn(function()
vim.cmd([[colorscheme catppuccin]])
end, 0)
end,
})
end
end

vim.g.catppuccin_flavour = "mocha" -- Set flavour here
local cp = get_modified_palette()

local enable_compile = true -- Set to false if you would like to disable catppuccin cache. (Not recommended)
set_auto_compile(enable_compile)

require("catppuccin").setup({
dim_inactive = {
enabled = false,
Expand All @@ -197,10 +176,7 @@ function config.catppuccin()
},
transparent_background = false,
term_colors = true,
compile = {
enabled = enable_compile,
path = vim.fn.stdpath("cache") .. "/catppuccin",
},
compile_path = vim.fn.stdpath("cache") .. "/catppuccin",
styles = {
comments = { "italic" },
properties = { "italic" },
Expand Down

0 comments on commit 212217e

Please sign in to comment.