|
|
@ -13,7 +13,7 @@ local function inspect(t)
|
|
|
|
return fmt([[{ %s }]], table.concat(list, ", "))
|
|
|
|
return fmt([[{ %s }]], table.concat(list, ", "))
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
function util.compile()
|
|
|
|
function M.compile()
|
|
|
|
local theme = require("catppuccin.lib.mapper").apply()
|
|
|
|
local theme = require("catppuccin.lib.mapper").apply()
|
|
|
|
local lines = {
|
|
|
|
local lines = {
|
|
|
|
[[
|
|
|
|
[[
|
|
|
@ -27,7 +27,6 @@ end
|
|
|
|
vim.g.colors_name = "catppuccin"]],
|
|
|
|
vim.g.colors_name = "catppuccin"]],
|
|
|
|
}
|
|
|
|
}
|
|
|
|
local config = require("catppuccin.config").options
|
|
|
|
local config = require("catppuccin.config").options
|
|
|
|
local custom_highlights = config.custom_highlights
|
|
|
|
|
|
|
|
for property, value in pairs(theme.properties) do
|
|
|
|
for property, value in pairs(theme.properties) do
|
|
|
|
if type(value) == "string" then
|
|
|
|
if type(value) == "string" then
|
|
|
|
table.insert(lines, fmt('vim.o.%s = "%s"', property, value))
|
|
|
|
table.insert(lines, fmt('vim.o.%s = "%s"', property, value))
|
|
|
@ -37,8 +36,8 @@ vim.g.colors_name = "catppuccin"]],
|
|
|
|
table.insert(lines, fmt("vim.o.%s = %s", property, inspect(value)))
|
|
|
|
table.insert(lines, fmt("vim.o.%s = %s", property, inspect(value)))
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
local tbl = vim.tbl_deep_extend("keep", theme.integrations, theme.base)
|
|
|
|
local tbl = vim.tbl_deep_extend("keep", theme.integrations, theme.editor)
|
|
|
|
tbl = vim.tbl_deep_extend("keep", custom_highlights, tbl)
|
|
|
|
tbl = vim.tbl_deep_extend("keep", config.custom_highlights, tbl)
|
|
|
|
|
|
|
|
|
|
|
|
for group, color in pairs(tbl) do
|
|
|
|
for group, color in pairs(tbl) do
|
|
|
|
if color.link then
|
|
|
|
if color.link then
|
|
|
@ -100,7 +99,7 @@ vim.g.colors_name = "catppuccin"]],
|
|
|
|
file:close()
|
|
|
|
file:close()
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
function util.clean()
|
|
|
|
function M.clean()
|
|
|
|
local config = require("catppuccin.config").options
|
|
|
|
local config = require("catppuccin.config").options
|
|
|
|
local compiled_path = config.compile.path
|
|
|
|
local compiled_path = config.compile.path
|
|
|
|
.. (vim.loop.os_uname().sysname == "Windows" and "\\" or "/")
|
|
|
|
.. (vim.loop.os_uname().sysname == "Windows" and "\\" or "/")
|
|
|
@ -109,3 +108,5 @@ function util.clean()
|
|
|
|
.. ".lua"
|
|
|
|
.. ".lua"
|
|
|
|
os.remove(compiled_path)
|
|
|
|
os.remove(compiled_path)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return M
|
|
|
|