From 4f61f96dc1337fdd48b900a545bdf3bba67183d6 Mon Sep 17 00:00:00 2001 From: nullchilly Date: Thu, 14 Jul 2022 18:45:23 +0700 Subject: [PATCH 01/15] fix(telescope): Revert to old behavior --- .../core/integrations/telescope.lua | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/lua/catppuccin/core/integrations/telescope.lua b/lua/catppuccin/core/integrations/telescope.lua index 4321323..2861ff5 100644 --- a/lua/catppuccin/core/integrations/telescope.lua +++ b/lua/catppuccin/core/integrations/telescope.lua @@ -5,17 +5,18 @@ function M.get(cp) TelescopeBorder = { fg = cp.blue }, TelescopeSelectionCaret = { fg = cp.flamingo }, TelescopeSelection = { fg = cp.text, bg = cp.surface0, style = "bold" }, - TelescopeMatching = { fg = cp.blue }, - TelescopePromptPrefix = { bg = cp.crust }, - TelescopePromptNormal = { bg = cp.crust}, - TelescopeResultsNormal = { bg = cp.mantle}, - TelescopePreviewNormal = { bg = cp.crust }, - TelescopePromptBorder = { bg = cp.crust, fg = cp.crust }, - TelescopeResultsBorder = { bg = cp.mantle, fg = cp.crust }, - TelescopePreviewBorder = { bg = cp.crust, fg = cp.crust }, - TelescopePromptTitle = { fg = cp.crust }, - TelescopeResultsTitle = { fg = cp.text }, - TelescopePreviewTitle = { fg = cp.crust }, + -- Allow Telescope to hijack these highlights in order to achieve the old behavior + -- TelescopeMatching = { fg = cp.blue }, + -- TelescopePromptPrefix = { bg = cp.crust }, + -- TelescopePromptNormal = { bg = cp.crust}, + -- TelescopeResultsNormal = { bg = cp.mantle}, + -- TelescopePreviewNormal = { bg = cp.crust }, + -- TelescopePromptBorder = { bg = cp.crust, fg = cp.crust }, + -- TelescopeResultsBorder = { bg = cp.mantle, fg = cp.crust }, + -- TelescopePreviewBorder = { bg = cp.crust, fg = cp.crust }, + -- TelescopePromptTitle = { fg = cp.crust }, + -- TelescopeResultsTitle = { fg = cp.text }, + -- TelescopePreviewTitle = { fg = cp.crust }, } end From fe622c41b9ba8a821f4c665b40ad35267ff80d97 Mon Sep 17 00:00:00 2001 From: nullchilly Date: Thu, 14 Jul 2022 18:49:49 +0700 Subject: [PATCH 02/15] fix(telescope): Add Matching --- lua/catppuccin/core/integrations/telescope.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/catppuccin/core/integrations/telescope.lua b/lua/catppuccin/core/integrations/telescope.lua index 2861ff5..12ffd6c 100644 --- a/lua/catppuccin/core/integrations/telescope.lua +++ b/lua/catppuccin/core/integrations/telescope.lua @@ -5,8 +5,8 @@ function M.get(cp) TelescopeBorder = { fg = cp.blue }, TelescopeSelectionCaret = { fg = cp.flamingo }, TelescopeSelection = { fg = cp.text, bg = cp.surface0, style = "bold" }, + TelescopeMatching = { fg = cp.blue }, -- Allow Telescope to hijack these highlights in order to achieve the old behavior - -- TelescopeMatching = { fg = cp.blue }, -- TelescopePromptPrefix = { bg = cp.crust }, -- TelescopePromptNormal = { bg = cp.crust}, -- TelescopeResultsNormal = { bg = cp.mantle}, From 398b638799a720f76296a643fc9f1cdd96aa9cf5 Mon Sep 17 00:00:00 2001 From: nullchilly Date: Thu, 14 Jul 2022 23:14:34 +0700 Subject: [PATCH 03/15] ci(github): Add stylua check --- .github/workflows/formatting.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/formatting.yml diff --git a/.github/workflows/formatting.yml b/.github/workflows/formatting.yml new file mode 100644 index 0000000..f0c3310 --- /dev/null +++ b/.github/workflows/formatting.yml @@ -0,0 +1,17 @@ +name: stylua +on: + push: + branches: + - dev + 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 . From ebc5035e8dcaeb3ff1124444abef5c7e9fc24e74 Mon Sep 17 00:00:00 2001 From: nullchilly Date: Thu, 14 Jul 2022 23:16:20 +0700 Subject: [PATCH 04/15] ci(github): Add stylua check for main branch --- .github/workflows/formatting.yml | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/formatting.yml b/.github/workflows/formatting.yml index f0c3310..b37562e 100644 --- a/.github/workflows/formatting.yml +++ b/.github/workflows/formatting.yml @@ -1,17 +1,16 @@ name: stylua on: - push: - branches: - - dev - paths-ignore: - - ".github/**" + push: + branches: ["main", "dev"] + 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 6fd7d6e437d7109ea0f510f0ad26cb9474c68daf Mon Sep 17 00:00:00 2001 From: nullchilly Date: Thu, 14 Jul 2022 23:19:17 +0700 Subject: [PATCH 05/15] ci(github): Test --- .../core/integrations/telescope.lua | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lua/catppuccin/core/integrations/telescope.lua b/lua/catppuccin/core/integrations/telescope.lua index 12ffd6c..66317af 100644 --- a/lua/catppuccin/core/integrations/telescope.lua +++ b/lua/catppuccin/core/integrations/telescope.lua @@ -7,16 +7,16 @@ function M.get(cp) TelescopeSelection = { fg = cp.text, bg = cp.surface0, style = "bold" }, TelescopeMatching = { fg = cp.blue }, -- Allow Telescope to hijack these highlights in order to achieve the old behavior - -- TelescopePromptPrefix = { bg = cp.crust }, - -- TelescopePromptNormal = { bg = cp.crust}, - -- TelescopeResultsNormal = { bg = cp.mantle}, - -- TelescopePreviewNormal = { bg = cp.crust }, - -- TelescopePromptBorder = { bg = cp.crust, fg = cp.crust }, - -- TelescopeResultsBorder = { bg = cp.mantle, fg = cp.crust }, - -- TelescopePreviewBorder = { bg = cp.crust, fg = cp.crust }, - -- TelescopePromptTitle = { fg = cp.crust }, - -- TelescopeResultsTitle = { fg = cp.text }, - -- TelescopePreviewTitle = { fg = cp.crust }, + -- TelescopePromptPrefix = { bg = cp.crust }, + -- TelescopePromptNormal = { bg = cp.crust}, + -- TelescopeResultsNormal = { bg = cp.mantle}, + -- TelescopePreviewNormal = { bg = cp.crust }, + -- TelescopePromptBorder = { bg = cp.crust, fg = cp.crust }, + -- TelescopeResultsBorder = { bg = cp.mantle, fg = cp.crust }, + -- TelescopePreviewBorder = { bg = cp.crust, fg = cp.crust }, + -- TelescopePromptTitle = { fg = cp.crust }, + -- TelescopeResultsTitle = { fg = cp.text }, + -- TelescopePreviewTitle = { fg = cp.crust }, } end From a8935c4118b13365afa3ac92691571f16adbf1ee Mon Sep 17 00:00:00 2001 From: nullchilly Date: Thu, 14 Jul 2022 23:30:51 +0700 Subject: [PATCH 06/15] ci(github): Add pull request check --- .github/workflows/formatting.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/formatting.yml b/.github/workflows/formatting.yml index b37562e..fdf810a 100644 --- a/.github/workflows/formatting.yml +++ b/.github/workflows/formatting.yml @@ -1,9 +1,12 @@ name: stylua on: push: - branches: ["main", "dev"] - paths-ignore: - - ".github/**" + name: stylua + on: + push: + branches: ["main", "dev"] + pull_request: + branches: ["main", "dev"] jobs: stylua: From 408fdbf98ec90ec2c43f0bf218acb3b5e7f17b92 Mon Sep 17 00:00:00 2001 From: nullchilly Date: Fri, 15 Jul 2022 00:15:09 +0700 Subject: [PATCH 07/15] ci(github): Revert test --- .../core/integrations/telescope.lua | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lua/catppuccin/core/integrations/telescope.lua b/lua/catppuccin/core/integrations/telescope.lua index 66317af..12ffd6c 100644 --- a/lua/catppuccin/core/integrations/telescope.lua +++ b/lua/catppuccin/core/integrations/telescope.lua @@ -7,16 +7,16 @@ function M.get(cp) TelescopeSelection = { fg = cp.text, bg = cp.surface0, style = "bold" }, TelescopeMatching = { fg = cp.blue }, -- Allow Telescope to hijack these highlights in order to achieve the old behavior - -- TelescopePromptPrefix = { bg = cp.crust }, - -- TelescopePromptNormal = { bg = cp.crust}, - -- TelescopeResultsNormal = { bg = cp.mantle}, - -- TelescopePreviewNormal = { bg = cp.crust }, - -- TelescopePromptBorder = { bg = cp.crust, fg = cp.crust }, - -- TelescopeResultsBorder = { bg = cp.mantle, fg = cp.crust }, - -- TelescopePreviewBorder = { bg = cp.crust, fg = cp.crust }, - -- TelescopePromptTitle = { fg = cp.crust }, - -- TelescopeResultsTitle = { fg = cp.text }, - -- TelescopePreviewTitle = { fg = cp.crust }, + -- TelescopePromptPrefix = { bg = cp.crust }, + -- TelescopePromptNormal = { bg = cp.crust}, + -- TelescopeResultsNormal = { bg = cp.mantle}, + -- TelescopePreviewNormal = { bg = cp.crust }, + -- TelescopePromptBorder = { bg = cp.crust, fg = cp.crust }, + -- TelescopeResultsBorder = { bg = cp.mantle, fg = cp.crust }, + -- TelescopePreviewBorder = { bg = cp.crust, fg = cp.crust }, + -- TelescopePromptTitle = { fg = cp.crust }, + -- TelescopeResultsTitle = { fg = cp.text }, + -- TelescopePreviewTitle = { fg = cp.crust }, } end From 098011c833aff9917903bdd4b7a7613e4028bfc8 Mon Sep 17 00:00:00 2001 From: nullchilly Date: Fri, 15 Jul 2022 12:08:41 +0700 Subject: [PATCH 08/15] refactor(colors): Remove vimscript --- colors/catppuccin.lua | 1 + colors/catppuccin.vim | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) create mode 100644 colors/catppuccin.lua delete mode 100644 colors/catppuccin.vim diff --git a/colors/catppuccin.lua b/colors/catppuccin.lua new file mode 100644 index 0000000..de89880 --- /dev/null +++ b/colors/catppuccin.lua @@ -0,0 +1 @@ +require("catppuccin").load() diff --git a/colors/catppuccin.vim b/colors/catppuccin.vim deleted file mode 100644 index 9b4a0ee..0000000 --- a/colors/catppuccin.vim +++ /dev/null @@ -1,3 +0,0 @@ -lua << EOF -require('catppuccin').load() -EOF From 55294747e23bae1dd1bef301131aa5e8ee68903d Mon Sep 17 00:00:00 2001 From: nullchilly Date: Fri, 15 Jul 2022 12:46:22 +0700 Subject: [PATCH 09/15] fix(telescope): Revert to old behavior --- .../core/integrations/telescope.lua | 23 ------------------- .../groups/integrations/telescope.lua | 20 ++++++++-------- 2 files changed, 10 insertions(+), 33 deletions(-) delete mode 100644 lua/catppuccin/core/integrations/telescope.lua diff --git a/lua/catppuccin/core/integrations/telescope.lua b/lua/catppuccin/core/integrations/telescope.lua deleted file mode 100644 index 12ffd6c..0000000 --- a/lua/catppuccin/core/integrations/telescope.lua +++ /dev/null @@ -1,23 +0,0 @@ -local M = {} - -function M.get(cp) - return { - TelescopeBorder = { fg = cp.blue }, - TelescopeSelectionCaret = { fg = cp.flamingo }, - TelescopeSelection = { fg = cp.text, bg = cp.surface0, style = "bold" }, - TelescopeMatching = { fg = cp.blue }, - -- Allow Telescope to hijack these highlights in order to achieve the old behavior - -- TelescopePromptPrefix = { bg = cp.crust }, - -- TelescopePromptNormal = { bg = cp.crust}, - -- TelescopeResultsNormal = { bg = cp.mantle}, - -- TelescopePreviewNormal = { bg = cp.crust }, - -- TelescopePromptBorder = { bg = cp.crust, fg = cp.crust }, - -- TelescopeResultsBorder = { bg = cp.mantle, fg = cp.crust }, - -- TelescopePreviewBorder = { bg = cp.crust, fg = cp.crust }, - -- TelescopePromptTitle = { fg = cp.crust }, - -- TelescopeResultsTitle = { fg = cp.text }, - -- TelescopePreviewTitle = { fg = cp.crust }, - } -end - -return M diff --git a/lua/catppuccin/groups/integrations/telescope.lua b/lua/catppuccin/groups/integrations/telescope.lua index 6ccd49a..eaa4a89 100644 --- a/lua/catppuccin/groups/integrations/telescope.lua +++ b/lua/catppuccin/groups/integrations/telescope.lua @@ -6,16 +6,16 @@ function M.get() TelescopeSelectionCaret = { fg = cp.flamingo }, TelescopeSelection = { fg = cp.text, bg = cp.surface0, style = { "bold" } }, TelescopeMatching = { fg = cp.blue }, - TelescopePromptPrefix = { bg = cp.crust }, - TelescopePromptNormal = { bg = cp.crust }, - TelescopeResultsNormal = { bg = cp.mantle }, - TelescopePreviewNormal = { bg = cp.crust }, - TelescopePromptBorder = { bg = cp.crust, fg = cp.crust }, - TelescopeResultsBorder = { bg = cp.mantle, fg = cp.crust }, - TelescopePreviewBorder = { bg = cp.crust, fg = cp.crust }, - TelescopePromptTitle = { fg = cp.crust }, - TelescopeResultsTitle = { fg = cp.text }, - TelescopePreviewTitle = { fg = cp.crust }, + -- TelescopePromptPrefix = { bg = cp.crust }, + -- TelescopePromptNormal = { bg = cp.crust }, + -- TelescopeResultsNormal = { bg = cp.mantle }, + -- TelescopePreviewNormal = { bg = cp.crust }, + -- TelescopePromptBorder = { bg = cp.crust, fg = cp.crust }, + -- TelescopeResultsBorder = { bg = cp.mantle, fg = cp.crust }, + -- TelescopePreviewBorder = { bg = cp.crust, fg = cp.crust }, + -- TelescopePromptTitle = { fg = cp.crust }, + -- TelescopeResultsTitle = { fg = cp.text }, + -- TelescopePreviewTitle = { fg = cp.crust }, } end From 5b168e34fd586473fe12a3cf4ced1ca9f253bedd Mon Sep 17 00:00:00 2001 From: nullchilly Date: Fri, 15 Jul 2022 21:55:32 +0700 Subject: [PATCH 10/15] chore(readme): Update compiling readme --- README.md | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b49f1a9..6017227 100644 --- a/README.md +++ b/README.md @@ -317,16 +317,41 @@ Catppuccin provides these commands to work with the catppuccin compiler. :CatppuccinClean # Delete compiled file ``` -It's recommended to add `:CatppuccinCompile` to run everytime you update your config. For example: +It's recommended to add `:CatppuccinCompile` to post-install/update hooks. For example: ```lua use { "catppuccin/nvim", as = "catppuccin", - run = ":CatppuccinCompile", + run = "CatppuccinCompile", } ``` +# Vim-plug + +```lua +Plug 'catppuccin/nvim', {'as': 'catppuccin', 'do': 'CatppuccinCompile'} +``` + +To auto-compile catppuccin after `:PackerCompile`, create an autocmd `User PackerCompileDone` in User group + +# Packer.nvim + +```lua +vim.api.nvim_create_autocmd("User", { + pattern = "PackerCompileDone", + callback = function() + vim.cmd "CatppuccinCompile" + end, +}) +``` + +# Vim-plug + +```lua +autocmd User VimPlugDone :CatppuccinCompile +``` + 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` From 6dcbd95cdeeca2e1e743322fd9124568e1bcdb56 Mon Sep 17 00:00:00 2001 From: nullchilly Date: Fri, 15 Jul 2022 21:57:48 +0700 Subject: [PATCH 11/15] chore(readme): Update compiling readme --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6017227..cb56d78 100644 --- a/README.md +++ b/README.md @@ -319,6 +319,8 @@ Catppuccin provides these commands to work with the catppuccin compiler. It's recommended to add `:CatppuccinCompile` to post-install/update hooks. For example: +#### Packer.nvim + ```lua use { "catppuccin/nvim", @@ -327,7 +329,7 @@ use { } ``` -# Vim-plug +#### Vim-plug ```lua Plug 'catppuccin/nvim', {'as': 'catppuccin', 'do': 'CatppuccinCompile'} @@ -335,7 +337,7 @@ Plug 'catppuccin/nvim', {'as': 'catppuccin', 'do': 'CatppuccinCompile'} To auto-compile catppuccin after `:PackerCompile`, create an autocmd `User PackerCompileDone` in User group -# Packer.nvim +#### Packer.nvim ```lua vim.api.nvim_create_autocmd("User", { @@ -346,7 +348,7 @@ vim.api.nvim_create_autocmd("User", { }) ``` -# Vim-plug +#### Vim-plug ```lua autocmd User VimPlugDone :CatppuccinCompile From e36abec29c364e56483a9b7fc9c1d4edcf699c30 Mon Sep 17 00:00:00 2001 From: nullchilly Date: Fri, 15 Jul 2022 21:59:41 +0700 Subject: [PATCH 12/15] chore(readme): Formatting --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cb56d78..7f36e38 100644 --- a/README.md +++ b/README.md @@ -299,7 +299,7 @@ Catppuccin is a highly customizable and configurable colorscheme. This does howe Catppuccin can pre compute the results of your configuration and store the results in a compiled lua file. We use these precached values to set it's highlights. -To enable compile enables it in setup function: +- To enable compile enables it in setup function: ```lua compile = { @@ -310,14 +310,14 @@ compile = { ``` By default catppuccin writes the compiled results into the system's cache directory. -Catppuccin provides these commands to work with the catppuccin compiler. +- Catppuccin provides these commands to work with the catppuccin compiler. ```bash :CatppuccinCompile # Create/update the compile file :CatppuccinClean # Delete compiled file ``` -It's recommended to add `:CatppuccinCompile` to post-install/update hooks. For example: +- It's recommended to add `:CatppuccinCompile` to post-install/update hooks. For example: #### Packer.nvim @@ -335,7 +335,7 @@ use { Plug 'catppuccin/nvim', {'as': 'catppuccin', 'do': 'CatppuccinCompile'} ``` -To auto-compile catppuccin after `:PackerCompile`, create an autocmd `User PackerCompileDone` in User group +- To auto-compile catppuccin after `:PackerCompile`, create an autocmd `User PackerCompileDone` in User group #### Packer.nvim From 279ceccf6e210bb4e70e4e2d685cb5d014f86f89 Mon Sep 17 00:00:00 2001 From: nullchilly Date: Fri, 15 Jul 2022 22:06:32 +0700 Subject: [PATCH 13/15] chore(readme): Formatting --- README.md | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 7f36e38..f6ca4d4 100644 --- a/README.md +++ b/README.md @@ -335,10 +335,12 @@ use { Plug 'catppuccin/nvim', {'as': 'catppuccin', 'do': 'CatppuccinCompile'} ``` -- To auto-compile catppuccin after `:PackerCompile`, create an autocmd `User PackerCompileDone` in User group +- To auto-compile everytime you update your config: #### Packer.nvim +Create an autocmd `User PackerCompileDone` to update it + ```lua vim.api.nvim_create_autocmd("User", { pattern = "PackerCompileDone", @@ -350,21 +352,10 @@ vim.api.nvim_create_autocmd("User", { #### Vim-plug -```lua -autocmd User VimPlugDone :CatppuccinCompile -``` - -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 = "plugins.lua", - callback = function() - vim.cmd "CatppuccinCompile" - end, -}) +autocmd BufWritePost init.vim :CatppuccinCompile ``` Acknowledge: [nightfox.nvim#compile](https://github.com/EdenEast/nightfox.nvim#compile) From 5d232b054a6f3781c8a8949c8776bc35a3a5dcba Mon Sep 17 00:00:00 2001 From: nullchilly Date: Fri, 15 Jul 2022 22:07:48 +0700 Subject: [PATCH 14/15] chore(readme): Formatting --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f6ca4d4..52e08cf 100644 --- a/README.md +++ b/README.md @@ -339,7 +339,7 @@ Plug 'catppuccin/nvim', {'as': 'catppuccin', 'do': 'CatppuccinCompile'} #### Packer.nvim -Create an autocmd `User PackerCompileDone` to update it +Create an autocmd `User PackerCompileDone` to update it every time packer is compiled: ```lua vim.api.nvim_create_autocmd("User", { @@ -352,7 +352,7 @@ vim.api.nvim_create_autocmd("User", { #### Vim-plug -- +- Auto compile on save if catppuccin config is in `init.vim` ```lua autocmd BufWritePost init.vim :CatppuccinCompile From 0963bb5635aed6dac290451699014289d367b688 Mon Sep 17 00:00:00 2001 From: nullchilly Date: Fri, 15 Jul 2022 22:08:26 +0700 Subject: [PATCH 15/15] chore(readme): Fix vim-plug --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 52e08cf..35cfb86 100644 --- a/README.md +++ b/README.md @@ -352,7 +352,7 @@ vim.api.nvim_create_autocmd("User", { #### Vim-plug -- Auto compile on save if catppuccin config is in `init.vim` +Auto compile on save if catppuccin config is in `init.vim` ```lua autocmd BufWritePost init.vim :CatppuccinCompile