|
|
|
@ -2,6 +2,8 @@ local M = {}
|
|
|
|
|
|
|
|
|
|
-- Credit: https://github.com/EdenEast/nightfox.nvim
|
|
|
|
|
local fmt = string.format
|
|
|
|
|
local is_windows = vim.startswith(vim.loop.os_uname().sysname, "Windows")
|
|
|
|
|
|
|
|
|
|
local function inspect(t)
|
|
|
|
|
local list = {}
|
|
|
|
|
for k, v in pairs(t) do
|
|
|
|
@ -18,7 +20,7 @@ function M.compile()
|
|
|
|
|
local lines = {
|
|
|
|
|
[[
|
|
|
|
|
-- This file is autogenerated by CATPPUCCIN.
|
|
|
|
|
-- Do not make changes directly to this file.
|
|
|
|
|
-- DO NOT make changes directly to this file.
|
|
|
|
|
|
|
|
|
|
vim.cmd("hi clear")
|
|
|
|
|
if vim.fn.exists("syntax_on") then
|
|
|
|
@ -27,6 +29,10 @@ end
|
|
|
|
|
vim.g.colors_name = "catppuccin"]],
|
|
|
|
|
}
|
|
|
|
|
local config = require("catppuccin.config").options
|
|
|
|
|
if is_windows then
|
|
|
|
|
config.compile.path = config.compile.path:gsub("/", "\\")
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
for property, value in pairs(theme.properties) do
|
|
|
|
|
if type(value) == "string" then
|
|
|
|
|
table.insert(lines, fmt('vim.o.%s = "%s"', property, value))
|
|
|
|
@ -67,12 +73,10 @@ vim.g.colors_name = "catppuccin"]],
|
|
|
|
|
table.insert(lines, fmt('vim.g.%s = "%s"', k, v))
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
os.execute(
|
|
|
|
|
string.format("mkdir %s %s", vim.loop.os_uname().sysname == "Windows" and "" or "-p", config.compile.path)
|
|
|
|
|
)
|
|
|
|
|
os.execute(string.format("mkdir %s %s", is_windows and "" or "-p", config.compile.path))
|
|
|
|
|
local file = io.open(
|
|
|
|
|
config.compile.path
|
|
|
|
|
.. (vim.loop.os_uname().sysname == "Windows" and "\\" or "/")
|
|
|
|
|
.. (is_windows and "\\" or "/")
|
|
|
|
|
.. vim.g.catppuccin_flavour
|
|
|
|
|
.. config.compile.suffix
|
|
|
|
|
.. ".lua",
|
|
|
|
@ -85,7 +89,7 @@ end
|
|
|
|
|
function M.clean()
|
|
|
|
|
local config = require("catppuccin.config").options
|
|
|
|
|
local compiled_path = config.compile.path
|
|
|
|
|
.. (vim.loop.os_uname().sysname == "Windows" and "\\" or "/")
|
|
|
|
|
.. (is_windows and "\\" or "/")
|
|
|
|
|
.. vim.g.catppuccin_flavour
|
|
|
|
|
.. config.compile.suffix
|
|
|
|
|
.. ".lua"
|
|
|
|
|