|
|
@ -112,10 +112,11 @@ local function inspect(t)
|
|
|
|
return fmt([[{ %s }]], table.concat(list, ", "))
|
|
|
|
return fmt([[{ %s }]], table.concat(list, ", "))
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
function util.compile(theme)
|
|
|
|
function util.compile()
|
|
|
|
if vim.fn.has "nvim-0.7" == 0 then
|
|
|
|
if vim.fn.has "nvim-0.7" == 0 then
|
|
|
|
print "Compiling requires neovim 0.7"
|
|
|
|
print "Compiling requires neovim 0.7"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
local theme = require("catppuccin.core.mapper").apply()
|
|
|
|
local lines = { [[
|
|
|
|
local lines = { [[
|
|
|
|
-- This file is autogenerated by CATPPUCCIN.
|
|
|
|
-- This file is autogenerated by CATPPUCCIN.
|
|
|
|
-- Do not make changes directly to this file.
|
|
|
|
-- Do not make changes directly to this file.
|
|
|
@ -162,10 +163,15 @@ vim.g.colors_name = "catppuccin"]] }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
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", vim.loop.os_uname().sysname == 'Windows' and "" or "-p", config.compile.path))
|
|
|
|
print(string.format("mkdir %s %s", vim.loop.os_uname().sysname == 'Windows' and "" or "-p", config.compile.path))
|
|
|
|
|
|
|
|
local file = io.open(config.compile.path .. (vim.loop.os_uname().sysname == 'Windows' and "\\" or "/") .. vim.g.catppuccin_flavour .. config.compile.suffix .. ".lua", "w")
|
|
|
|
local file = io.open(config.compile.path .. (vim.loop.os_uname().sysname == 'Windows' and "\\" or "/") .. vim.g.catppuccin_flavour .. config.compile.suffix .. ".lua", "w")
|
|
|
|
file:write(table.concat(lines, "\n"))
|
|
|
|
file:write(table.concat(lines, "\n"))
|
|
|
|
file:close()
|
|
|
|
file:close()
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function util.clean()
|
|
|
|
|
|
|
|
local config = require("catppuccin.config").options
|
|
|
|
|
|
|
|
local compiled_path = config.compile.path .. (vim.loop.os_uname().sysname == 'Windows' and "\\" or "/") .. vim.g.catppuccin_flavour .. config.compile.suffix .. ".lua"
|
|
|
|
|
|
|
|
os.remove(compiled_path)
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
return util
|
|
|
|
return util
|
|
|
|