From 3290efcce2a7555040f616d60e75b57783ed23d8 Mon Sep 17 00:00:00 2001 From: nullchilly Date: Thu, 14 Jul 2022 11:46:03 +0700 Subject: [PATCH 01/12] ci(github): Fix wrong file format --- .github/workflows/{formatting.yaml => formatting.yml} | 1 + 1 file changed, 1 insertion(+) rename .github/workflows/{formatting.yaml => formatting.yml} (95%) diff --git a/.github/workflows/formatting.yaml b/.github/workflows/formatting.yml similarity index 95% rename from .github/workflows/formatting.yaml rename to .github/workflows/formatting.yml index f0c3310..bbed4ea 100644 --- a/.github/workflows/formatting.yaml +++ b/.github/workflows/formatting.yml @@ -2,6 +2,7 @@ name: stylua on: push: branches: + - main - dev paths-ignore: - ".github/**" From 0e78f88e893d4c74c5c38f0e4269cb369048dfbd Mon Sep 17 00:00:00 2001 From: nullchilly Date: Thu, 14 Jul 2022 11:53:20 +0700 Subject: [PATCH 02/12] Check ci --- .github/workflows/formatting.yml | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/formatting.yml b/.github/workflows/formatting.yml index bbed4ea..f85fafc 100644 --- a/.github/workflows/formatting.yml +++ b/.github/workflows/formatting.yml @@ -1,18 +1,16 @@ name: stylua on: - push: - branches: - - main - - dev - paths-ignore: - - ".github/**" + push: + branches: ["main", "dev", "ci"] + paths-ignore: + - ".github/**" jobs: - stylua: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: JohnnyMorganz/stylua-action@1.0.0 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --check --config-path=stylua.toml . + stylua: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: JohnnyMorganz/stylua-action@1.0.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --check --config-path=stylua.toml . From e3fb003512d7e7852c2e3368724b0d33220c629a Mon Sep 17 00:00:00 2001 From: nullchilly Date: Thu, 14 Jul 2022 11:53:52 +0700 Subject: [PATCH 03/12] Check ci --- lua/catppuccin/init.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lua/catppuccin/init.lua b/lua/catppuccin/init.lua index 8d79ee3..352a5d1 100644 --- a/lua/catppuccin/init.lua +++ b/lua/catppuccin/init.lua @@ -41,10 +41,10 @@ function M.load() if config.compile.enable == true then local compiled_path = config.compile.path - .. (vim.loop.os_uname().sysname == "Windows" and "\\" or "/") - .. vim.g.catppuccin_flavour - .. config.compile.suffix - .. ".lua" + .. (vim.loop.os_uname().sysname == "Windows" and "\\" or "/") + .. vim.g.catppuccin_flavour + .. config.compile.suffix + .. ".lua" local f = io.open(compiled_path, "r") if f ~= nil then io.close(f) @@ -65,6 +65,7 @@ function M.load() end function M.setup(custom_opts) + hello require("catppuccin.config").set_options(custom_opts) end From 1ed41d98b37f720f7611b7f8980575f8fc93f589 Mon Sep 17 00:00:00 2001 From: nullchilly Date: Thu, 14 Jul 2022 11:54:15 +0700 Subject: [PATCH 04/12] ci(github): fix file format --- lua/catppuccin/init.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lua/catppuccin/init.lua b/lua/catppuccin/init.lua index 352a5d1..8d79ee3 100644 --- a/lua/catppuccin/init.lua +++ b/lua/catppuccin/init.lua @@ -41,10 +41,10 @@ function M.load() if config.compile.enable == true then local compiled_path = config.compile.path - .. (vim.loop.os_uname().sysname == "Windows" and "\\" or "/") - .. vim.g.catppuccin_flavour - .. config.compile.suffix - .. ".lua" + .. (vim.loop.os_uname().sysname == "Windows" and "\\" or "/") + .. vim.g.catppuccin_flavour + .. config.compile.suffix + .. ".lua" local f = io.open(compiled_path, "r") if f ~= nil then io.close(f) @@ -65,7 +65,6 @@ function M.load() end function M.setup(custom_opts) - hello require("catppuccin.config").set_options(custom_opts) end From 8e8fc12f0d461ba5420e17634e432cd5ef16d782 Mon Sep 17 00:00:00 2001 From: nullchilly Date: Thu, 14 Jul 2022 11:54:55 +0700 Subject: [PATCH 05/12] ci(github): confirm working --- .github/workflows/formatting.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/formatting.yml b/.github/workflows/formatting.yml index f85fafc..b37562e 100644 --- a/.github/workflows/formatting.yml +++ b/.github/workflows/formatting.yml @@ -1,7 +1,7 @@ name: stylua on: push: - branches: ["main", "dev", "ci"] + branches: ["main", "dev"] paths-ignore: - ".github/**" From 88d2b1bc7e0d0d4ceaf4e633845f68c3ba312915 Mon Sep 17 00:00:00 2001 From: nullchilly Date: Thu, 14 Jul 2022 16:44:53 +0700 Subject: [PATCH 06/12] chore(readme): Add autocmd example --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 7f48b05..e065ea5 100644 --- a/README.md +++ b/README.md @@ -327,6 +327,17 @@ use { } ``` +To auto-compile catppuccin after `:PackerCompile`, create an autocmd: + +``` +vim.api.nvim_create_autocmd("User PackerCompileDone", { + pattern = "*", + callback = function() + vim.cmd ":CatppuccinCompile" + end, +}) +``` + Acknowledge: [nightfox.nvim#compile](https://github.com/EdenEast/nightfox.nvim#compile) ### Extra From 84d44c94d5228313a254c33d815ee0631d1895f6 Mon Sep 17 00:00:00 2001 From: nullchilly Date: Thu, 14 Jul 2022 16:46:38 +0700 Subject: [PATCH 07/12] chore(readme): Add autocmd example --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e065ea5..bf377d9 100644 --- a/README.md +++ b/README.md @@ -333,7 +333,7 @@ To auto-compile catppuccin after `:PackerCompile`, create an autocmd: vim.api.nvim_create_autocmd("User PackerCompileDone", { pattern = "*", callback = function() - vim.cmd ":CatppuccinCompile" + vim.cmd "CatppuccinCompile" end, }) ``` From f66ec68b58f275fbe6e569a6970f84dc170f5120 Mon Sep 17 00:00:00 2001 From: nullchilly Date: Thu, 14 Jul 2022 16:48:40 +0700 Subject: [PATCH 08/12] chore(readme): Fix highlighting --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bf377d9..bffc745 100644 --- a/README.md +++ b/README.md @@ -312,7 +312,7 @@ By default catppuccin writes the compiled results into the system's cache direct Catppuccin provides these commands to work with the catppuccin compiler. -```vim +```bash :CatppuccinCompile # Create/update the compile file :CatppuccinClean # Delete compiled file ``` From 8554195d7b1cf36fc3cf50a6d3d4c0323faa623d Mon Sep 17 00:00:00 2001 From: nullchilly Date: Thu, 14 Jul 2022 16:49:09 +0700 Subject: [PATCH 09/12] chore(readme): Fix lua highlighting --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bffc745..32a0985 100644 --- a/README.md +++ b/README.md @@ -319,7 +319,7 @@ Catppuccin provides these commands to work with the catppuccin compiler. It's recommended to add `:CatppuccinCompile` to run everytime you update your config. For example: -``` +```lua use { "catppuccin/nvim", as = "catppuccin", @@ -329,7 +329,7 @@ use { To auto-compile catppuccin after `:PackerCompile`, create an autocmd: -``` +```lua vim.api.nvim_create_autocmd("User PackerCompileDone", { pattern = "*", callback = function() From f6776fb77dbb7e34bc14a2734c1d7d628a0b3241 Mon Sep 17 00:00:00 2001 From: nullchilly Date: Thu, 14 Jul 2022 17:21:15 +0700 Subject: [PATCH 10/12] chore(readme): Fix inconsistent spacing --- README.md | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 32a0985..cf5f272 100644 --- a/README.md +++ b/README.md @@ -262,10 +262,10 @@ let g:lightline = {'colorscheme': 'catppuccin'} ```lua require('lualine').setup { - options = { - theme = "catppuccin" - -- ... the rest of your lualine config - } + options = { + theme = "catppuccin" + -- ... the rest of your lualine config + } } ``` @@ -274,22 +274,22 @@ require('lualine').setup { ```lua integration = { - nvimtree = { - enabled = true, - show_root = true, -- makes the root folder not transparent - transparent_panel = false, -- make the panel transparent - } + nvimtree = { + enabled = true, + show_root = true, -- makes the root folder not transparent + transparent_panel = false, -- make the panel transparent + } } ``` - **Neo-tree:** setting `enabled` to `true` enables this integration: ```lua integration = { - neotree = { - enabled = true, - show_root = true, -- makes the root folder not transparent - transparent_panel = false, -- make the panel transparent - } + neotree = { + enabled = true, + show_root = true, -- makes the root folder not transparent + transparent_panel = false, -- make the panel transparent + } } ``` @@ -381,9 +381,9 @@ Colors can be overwritten using `vim.g.catppucin_override_colors`: ```lua vim.g.catppuccin_override_colors = { - base = "#ff0000", - mantle = "#242424", - crust = "#474747", + base = "#ff0000", + mantle = "#242424", + crust = "#474747", } ``` @@ -412,11 +412,11 @@ Instead of `after_loading` hook, you can use autocmd event like this: ```lua vim.api.nvim_create_autocmd("User", { - pattern = "CatppuccinLoaded", - callback = function() - local colors = require("catppuccin.api.colors").get_colors() - -- do something with colors - end + pattern = "CatppuccinLoaded", + callback = function() + local colors = require("catppuccin.api.colors").get_colors() + -- do something with colors + end }) ``` From 5e975a3752c9e19bd0f46562e64b3576211513cf Mon Sep 17 00:00:00 2001 From: nullchilly Date: Thu, 14 Jul 2022 17:27:21 +0700 Subject: [PATCH 11/12] config(tree): show_root = true --- README.md | 4 ++-- lua/catppuccin/config.lua | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cf5f272..16a5803 100644 --- a/README.md +++ b/README.md @@ -132,12 +132,12 @@ integrations = { telescope = true, nvimtree = { enabled = true, - show_root = false, + show_root = true, transparent_panel = false, }, neotree = { enabled = false, - show_root = false, + show_root = true, transparent_panel = false, }, which_key = false, diff --git a/lua/catppuccin/config.lua b/lua/catppuccin/config.lua index e518fa9..3d9ebae 100644 --- a/lua/catppuccin/config.lua +++ b/lua/catppuccin/config.lua @@ -54,12 +54,12 @@ config.options = { telescope = false, nvimtree = { enabled = true, - show_root = false, + show_root = true, transparent_panel = false, }, neotree = { enabled = false, - show_root = false, + show_root = true, transparent_panel = false, }, which_key = false, From a55e0bbdc79c697dc02c975548cad4eae9bbe678 Mon Sep 17 00:00:00 2001 From: nullchilly Date: Thu, 14 Jul 2022 18:19:41 +0700 Subject: [PATCH 12/12] chore(readme): Fix pattern --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 16a5803..b49f1a9 100644 --- a/README.md +++ b/README.md @@ -327,11 +327,13 @@ use { } ``` -To auto-compile catppuccin after `:PackerCompile`, create an autocmd: +To auto-compile catppuccin after `:PackerCompile`, create an autocmd `PackerCompileDone` in User group + +For example, if your plugin specification is in `~/.config/nvim/lua/plugins.lua` then the pattern is `plugins.lua` ```lua vim.api.nvim_create_autocmd("User PackerCompileDone", { - pattern = "*", + pattern = "plugins.lua", callback = function() vim.cmd "CatppuccinCompile" end,