From cefc77ac7c00143d4b03e8db3a8c0feb29a23b99 Mon Sep 17 00:00:00 2001 From: sgoudham Date: Sat, 16 Jul 2022 02:17:05 +0100 Subject: [PATCH] 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 --- lua/catppuccin/lib/compiler.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/catppuccin/lib/compiler.lua b/lua/catppuccin/lib/compiler.lua index e0fb9db..ac7f148 100644 --- a/lua/catppuccin/lib/compiler.lua +++ b/lua/catppuccin/lib/compiler.lua @@ -29,6 +29,10 @@ end vim.g.colors_name = "catppuccin"]], } 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 if type(value) == "string" then table.insert(lines, fmt('vim.o.%s = "%s"', property, value))