From 393cd838eadb5c000b904173ac83ab5c27c84a66 Mon Sep 17 00:00:00 2001 From: nullchilly Date: Thu, 14 Jul 2022 10:38:01 +0700 Subject: [PATCH 1/6] ci(github): Fix stylua config path --- .github/workflows/formatting.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/formatting.yaml b/.github/workflows/formatting.yaml index 50e1733..e7a6c91 100644 --- a/.github/workflows/formatting.yaml +++ b/.github/workflows/formatting.yaml @@ -13,4 +13,4 @@ jobs: - uses: JohnnyMorganz/stylua-action@1.0.0 with: token: ${{ secrets.GITHUB_TOKEN }} - args: --check --config-path=.stylua.toml . + args: --check --config-path=stylua.toml . From c750ef81a5ff0c29d4ab5281b02dd179f25dd23c Mon Sep 17 00:00:00 2001 From: nullchilly Date: Thu, 14 Jul 2022 10:43:29 +0700 Subject: [PATCH 2/6] feat(compiler): Fix silly table --- lua/catppuccin/lib/compiler.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/catppuccin/lib/compiler.lua b/lua/catppuccin/lib/compiler.lua index 4f26b8c..73c9e65 100644 --- a/lua/catppuccin/lib/compiler.lua +++ b/lua/catppuccin/lib/compiler.lua @@ -13,7 +13,7 @@ local function inspect(t) return fmt([[{ %s }]], table.concat(list, ", ")) end -function util.compile() +function M.compile() local theme = require("catppuccin.lib.mapper").apply() local lines = { [[ @@ -100,7 +100,7 @@ vim.g.colors_name = "catppuccin"]], file:close() end -function util.clean() +function M.clean() local config = require("catppuccin.config").options local compiled_path = config.compile.path .. (vim.loop.os_uname().sysname == "Windows" and "\\" or "/") @@ -109,3 +109,5 @@ function util.clean() .. ".lua" os.remove(compiled_path) end + +return M From 5c867090d9c9591e76f25a980bcbfcf41e58f89f Mon Sep 17 00:00:00 2001 From: nullchilly Date: Thu, 14 Jul 2022 10:49:53 +0700 Subject: [PATCH 3/6] ci(github): Add dev branch --- .github/workflows/formatting.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/formatting.yaml b/.github/workflows/formatting.yaml index e7a6c91..92dd131 100644 --- a/.github/workflows/formatting.yaml +++ b/.github/workflows/formatting.yaml @@ -1,7 +1,7 @@ name: stylua on: push: - branches: ["main"] + branches: ["main", "dev"] paths-ignore: - ".github/**" From e97cd8cb421eb024c6db53cce7129aa72fc29965 Mon Sep 17 00:00:00 2001 From: nullchilly Date: Thu, 14 Jul 2022 10:53:44 +0700 Subject: [PATCH 4/6] fix(highlight): Wrong option type --- lua/catppuccin/lib/highlighter.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/catppuccin/lib/highlighter.lua b/lua/catppuccin/lib/highlighter.lua index 4520347..2f1f2c5 100644 --- a/lua/catppuccin/lib/highlighter.lua +++ b/lua/catppuccin/lib/highlighter.lua @@ -24,9 +24,9 @@ function M.syntax(tbl) end end -function M.properties(tbl) +function M.properties(tbl, type) for property, value in pairs(tbl) do - vim.o[property] = value + vim[type][property] = value end end @@ -37,14 +37,14 @@ function M.load(theme) end g.colors_name = "catppuccin" - M.properties(theme.properties) + M.properties(theme.properties, "o") M.syntax(theme.editor) M.syntax(theme.syntax) M.syntax(theme.integrations) M.syntax(require("catppuccin.config").options.custom_highlights) if require("catppuccin.config").options["term_colors"] then - M.properties(theme.terminal) + M.properties(theme.terminal, "g") end end From a2282197172d09702d044990e73b4bd8e7731ffe Mon Sep 17 00:00:00 2001 From: nullchilly Date: Thu, 14 Jul 2022 10:56:50 +0700 Subject: [PATCH 5/6] ci(github): Add dev branch --- .github/workflows/formatting.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/formatting.yaml b/.github/workflows/formatting.yaml index 92dd131..f0c3310 100644 --- a/.github/workflows/formatting.yaml +++ b/.github/workflows/formatting.yaml @@ -1,7 +1,8 @@ name: stylua on: push: - branches: ["main", "dev"] + branches: + - dev paths-ignore: - ".github/**" From c58b14648d1a398fea38f8ba495362d714beb470 Mon Sep 17 00:00:00 2001 From: nullchilly Date: Thu, 14 Jul 2022 11:17:13 +0700 Subject: [PATCH 6/6] fix(compile): nil --- lua/catppuccin/lib/compiler.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lua/catppuccin/lib/compiler.lua b/lua/catppuccin/lib/compiler.lua index 73c9e65..74992d3 100644 --- a/lua/catppuccin/lib/compiler.lua +++ b/lua/catppuccin/lib/compiler.lua @@ -27,7 +27,6 @@ end vim.g.colors_name = "catppuccin"]], } local config = require("catppuccin.config").options - local custom_highlights = config.custom_highlights for property, value in pairs(theme.properties) do if type(value) == "string" then table.insert(lines, fmt('vim.o.%s = "%s"', property, value)) @@ -37,8 +36,8 @@ vim.g.colors_name = "catppuccin"]], table.insert(lines, fmt("vim.o.%s = %s", property, inspect(value))) end end - local tbl = vim.tbl_deep_extend("keep", theme.integrations, theme.base) - tbl = vim.tbl_deep_extend("keep", custom_highlights, tbl) + local tbl = vim.tbl_deep_extend("keep", theme.integrations, theme.editor) + tbl = vim.tbl_deep_extend("keep", config.custom_highlights, tbl) for group, color in pairs(tbl) do if color.link then