feat(compiler): Only set compile commands when enabled = true

dev
nullchilly 2 years ago
parent f34f19fae6
commit 5daefaf006

@ -20,14 +20,6 @@ end, {
end, end,
}) })
command("CatppuccinCompile", function()
require("catppuccin.lib.compiler").compile()
end, {})
command("CatppuccinClean", function()
require("catppuccin.lib.compiler").clean()
end, {})
function M.load() function M.load()
local catppuccin = require("catppuccin") local catppuccin = require("catppuccin")
@ -65,6 +57,17 @@ end
function M.setup(custom_opts) function M.setup(custom_opts)
require("catppuccin.config").set_options(custom_opts) require("catppuccin.config").set_options(custom_opts)
-- Only set compile commands when enabled = true
if custom_opts.compile.enabled == true then
command("CatppuccinCompile", function()
require("catppuccin.lib.compiler").compile()
end, {})
command("CatppuccinClean", function()
require("catppuccin.lib.compiler").clean()
end, {})
end
end end
return M return M

Loading…
Cancel
Save