|
|
@ -2,7 +2,7 @@ local M = {}
|
|
|
|
|
|
|
|
|
|
|
|
-- Credit: https://github.com/EdenEast/nightfox.nvim
|
|
|
|
-- Credit: https://github.com/EdenEast/nightfox.nvim
|
|
|
|
local fmt = string.format
|
|
|
|
local fmt = string.format
|
|
|
|
local sysname = vim.loop.os_uname().sysname
|
|
|
|
local is_windows = vim.startswith(vim.loop.os_uname().sysname, "Windows")
|
|
|
|
|
|
|
|
|
|
|
|
local function inspect(t)
|
|
|
|
local function inspect(t)
|
|
|
|
local list = {}
|
|
|
|
local list = {}
|
|
|
@ -20,7 +20,7 @@ function M.compile()
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
vim.cmd("hi clear")
|
|
|
|
vim.cmd("hi clear")
|
|
|
|
if vim.fn.exists("syntax_on") then
|
|
|
|
if vim.fn.exists("syntax_on") then
|
|
|
@ -29,7 +29,7 @@ end
|
|
|
|
vim.g.colors_name = "catppuccin"]],
|
|
|
|
vim.g.colors_name = "catppuccin"]],
|
|
|
|
}
|
|
|
|
}
|
|
|
|
local config = require("catppuccin.config").options
|
|
|
|
local config = require("catppuccin.config").options
|
|
|
|
if sysname == "Windows" or sysname == "Windows_NT" then
|
|
|
|
if is_windows then
|
|
|
|
config.compile.path = config.compile.path:gsub("/", "\\")
|
|
|
|
config.compile.path = config.compile.path:gsub("/", "\\")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
@ -73,16 +73,10 @@ vim.g.colors_name = "catppuccin"]],
|
|
|
|
table.insert(lines, fmt('vim.g.%s = "%s"', k, v))
|
|
|
|
table.insert(lines, fmt('vim.g.%s = "%s"', k, v))
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
os.execute(
|
|
|
|
os.execute(string.format("mkdir %s %s", is_windows and "" or "-p", config.compile.path))
|
|
|
|
string.format(
|
|
|
|
|
|
|
|
"mkdir %s %s",
|
|
|
|
|
|
|
|
(sysname == "Windows" or sysname == "Windows_NT") and "" or "-p",
|
|
|
|
|
|
|
|
config.compile.path
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
local file = io.open(
|
|
|
|
local file = io.open(
|
|
|
|
config.compile.path
|
|
|
|
config.compile.path
|
|
|
|
.. ((sysname == "Windows" or sysname == "Windows_NT") and "\\" or "/")
|
|
|
|
.. (is_windows and "\\" or "/")
|
|
|
|
.. vim.g.catppuccin_flavour
|
|
|
|
.. vim.g.catppuccin_flavour
|
|
|
|
.. config.compile.suffix
|
|
|
|
.. config.compile.suffix
|
|
|
|
.. ".lua",
|
|
|
|
.. ".lua",
|
|
|
@ -95,7 +89,7 @@ end
|
|
|
|
function M.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
|
|
|
|
.. ((sysname == "Windows" or sysname == "Windows_NT") and "\\" or "/")
|
|
|
|
.. (is_windows and "\\" or "/")
|
|
|
|
.. vim.g.catppuccin_flavour
|
|
|
|
.. vim.g.catppuccin_flavour
|
|
|
|
.. config.compile.suffix
|
|
|
|
.. config.compile.suffix
|
|
|
|
.. ".lua"
|
|
|
|
.. ".lua"
|
|
|
|