mirror of https://github.com/sgoudham/nvim.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
651 B
Lua
38 lines
651 B
Lua
3 years ago
|
local M = {}
|
||
|
|
||
|
local utils = require("catppucin.utils.util")
|
||
|
|
||
|
local function load()
|
||
|
local catppucin = require("catppucin")
|
||
|
|
||
|
if catppucin.before_loading ~= nil then
|
||
|
catppucin.before_loading()
|
||
|
end
|
||
|
|
||
|
-- colorscheme gets evaluated from mapper.lua
|
||
|
local theme = require("catppucin.core.mapper").apply()
|
||
|
utils.load(theme)
|
||
|
|
||
|
if catppucin.after_loading ~= nil then
|
||
|
catppucin.after_loading()
|
||
|
end
|
||
|
end
|
||
|
|
||
|
local function clear()
|
||
|
vim.cmd("hi clear")
|
||
|
end
|
||
|
|
||
|
function M.main(option)
|
||
|
option = option or "load"
|
||
|
|
||
|
if option == "load" then
|
||
|
load()
|
||
|
elseif option == "clear" then
|
||
|
clear()
|
||
|
else
|
||
|
print("catppucin: option was not recognized")
|
||
|
end
|
||
|
end
|
||
|
|
||
|
return M
|