fix: structure

dev-assets
Pocco81 3 years ago
parent cc54a4c68f
commit 6c0bad9846

@ -1,18 +1,7 @@
local M = {} local M = {}
function M.load() function M.load()
local catppuccino = require("catppuccino")
if (catppuccino.before_loading ~= nil) then
catppuccino.before_loading()
end
require("catppuccino.main").main("load") require("catppuccino.main").main("load")
if (catppuccino.after_loading ~= nil) then
catppuccino.after_loading()
end
end end
function M.setup(custom_opts, remaps) function M.setup(custom_opts, remaps)

@ -2,13 +2,27 @@ local M = {}
local utils = require("catppuccino.utils.util") local utils = require("catppuccino.utils.util")
local function load(args)
local catppuccino = require("catppuccino")
if (catppuccino.before_loading ~= nil) then
catppuccino.before_loading()
end
utils.load(require("catppuccino.core.mapper").apply(args))
if (catppuccino.after_loading ~= nil) then
catppuccino.after_loading()
end
end
function M.main(option, args) function M.main(option, args)
option = option or "load" option = option or "load"
if (option == "load") then if (option == "load") then
utils.load(require("catppuccino.core.mapper").apply(args)) load(args)
else else
print("Catppuccino: Command was not recognized") print("Catppuccino: command was not recognized")
end end
end end

Loading…
Cancel
Save