fix(compiler): Enable default support for Windows

Currently, the default path for compiling goes to '/catppuccin',
unfortunately this assumes that all users are on *nix based systems
which they are not. This commit ensures that the path is correctly
formatted if the user is on Windows by performing a global substitution
dev
sgoudham 2 years ago
parent 9dd074cca2
commit cefc77ac7c
Signed by: hammy
GPG Key ID: 44E818FD5457EEA4

@ -29,6 +29,10 @@ 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
config.compile.path = config.compile.path:gsub("/", "\\")
end
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))

Loading…
Cancel
Save