From ac25d917632ddefcd5cf31fdb00ddc0a5291df44 Mon Sep 17 00:00:00 2001 From: nullchilly Date: Fri, 15 Jul 2022 22:17:09 +0700 Subject: [PATCH 1/4] refactor(setting): enable -> enabled for consistency --- README.md | 6 +++--- lua/catppuccin/config.lua | 4 ++-- lua/catppuccin/groups/editor.lua | 4 ++-- lua/catppuccin/groups/integrations/bufferline.lua | 4 ++-- lua/catppuccin/groups/integrations/gitsigns.lua | 4 ++-- lua/catppuccin/groups/integrations/ts_rainbow.lua | 4 ++-- lua/catppuccin/init.lua | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 35cfb86..6b47b08 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ dim_inactive = false, transparent_background = false, term_colors = false, compile = { - enable = false, + enabled = false, path = vim.fn.stdpath "cache" .. "/catppuccin", suffix = "_compiled" }, @@ -299,11 +299,11 @@ 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: +- Setting `enabled` to `true` enables this feature: ```lua compile = { - enable = true, + enabled = true, path = vim.fn.stdpath "cache" .. "/catppuccin", suffix = "_compiled" }, diff --git a/lua/catppuccin/config.lua b/lua/catppuccin/config.lua index 3d9ebae..df2f0aa 100644 --- a/lua/catppuccin/config.lua +++ b/lua/catppuccin/config.lua @@ -5,12 +5,12 @@ config.options = { transparent_background = false, term_colors = false, compile = { - enable = false, + enabled = false, path = vim.fn.stdpath("cache") .. "/catppuccin", suffix = "_compiled", }, dim_inactive = { - enable = false, + enabled = false, shade = "dark", percentage = 0.15, }, diff --git a/lua/catppuccin/groups/editor.lua b/lua/catppuccin/groups/editor.lua index 1498932..605450d 100644 --- a/lua/catppuccin/groups/editor.lua +++ b/lua/catppuccin/groups/editor.lua @@ -37,8 +37,8 @@ function M.get() Normal = { fg = cp.text, bg = cnf.transparent_background and cp.none or cp.base }, -- normal text NormalNC = { fg = cp.text, - bg = (cnf.transparent_background and cnf.dim_inactive.enable and lui.dim()) - or (cnf.dim_inactive.enable and cp.dim) + bg = (cnf.transparent_background and cnf.dim_inactive.enabled and lui.dim()) + or (cnf.dim_inactive.enabled and cp.dim) or (cnf.transparent_background and cp.none) or cp.base, }, -- normal text in non-current windows diff --git a/lua/catppuccin/groups/integrations/bufferline.lua b/lua/catppuccin/groups/integrations/bufferline.lua index 0cf36d0..1559876 100644 --- a/lua/catppuccin/groups/integrations/bufferline.lua +++ b/lua/catppuccin/groups/integrations/bufferline.lua @@ -3,9 +3,9 @@ local M = {} function M.get() local cnf = require("catppuccin.config").options local transparent_background = cnf.transparent_background - local bg_highlight = (transparent_background and cnf.dim_inactive.enable and cp.dim) + local bg_highlight = (transparent_background and cnf.dim_inactive.enabled and cp.dim) or (transparent_background and "NONE") - or (cnf.dim_inactive.enable and cp.dim) + or (cnf.dim_inactive.enabled and cp.dim) or cp.base local inactive_bg = transparent_background and "NONE" or cp.mantle diff --git a/lua/catppuccin/groups/integrations/gitsigns.lua b/lua/catppuccin/groups/integrations/gitsigns.lua index 845eecf..19a1ee1 100644 --- a/lua/catppuccin/groups/integrations/gitsigns.lua +++ b/lua/catppuccin/groups/integrations/gitsigns.lua @@ -2,9 +2,9 @@ local M = {} function M.get() local cnf = require("catppuccin.config").options - local bg_highlight = (cnf.transparent_background and cnf.dim_inactive.enable and cp.dim) + local bg_highlight = (cnf.transparent_background and cnf.dim_inactive.enabled and cp.dim) or (cnf.transparent_background and "NONE") - or (cnf.dim_inactive.enable and cp.dim) + or (cnf.dim_inactive.enabled and cp.dim) or cp.base return { GitSignsAdd = { fg = cp.green, bg = bg_highlight }, -- diff mode: Added line |diff.txt| diff --git a/lua/catppuccin/groups/integrations/ts_rainbow.lua b/lua/catppuccin/groups/integrations/ts_rainbow.lua index f6dea4a..8b5a705 100644 --- a/lua/catppuccin/groups/integrations/ts_rainbow.lua +++ b/lua/catppuccin/groups/integrations/ts_rainbow.lua @@ -3,9 +3,9 @@ local M = {} function M.get() local cnf = require("catppuccin.config").options local transparent_background = cnf.transparent_background - local bg_highlight = (transparent_background and cnf.dim_inactive.enable and cp.dim) + local bg_highlight = (transparent_background and cnf.dim_inactive.enabled and cp.dim) or (transparent_background and "NONE") - or (cnf.dim_inactive.enable and cp.dim) + or (cnf.dim_inactive.enabled and cp.dim) or cp.base return { rainbowcol1 = { bg = bg_highlight, fg = cp.red }, diff --git a/lua/catppuccin/init.lua b/lua/catppuccin/init.lua index d93ae98..6b2e58b 100644 --- a/lua/catppuccin/init.lua +++ b/lua/catppuccin/init.lua @@ -38,7 +38,7 @@ function M.load() local loaded = nil local config = require("catppuccin.config").options - if config.compile.enable == true then + if config.compile.enabled == true then local compiled_path = config.compile.path .. (vim.loop.os_uname().sysname == "Windows" and "\\" or "/") .. vim.g.catppuccin_flavour From 8aa1325db42573f1ff046ef7c93063929e4e586d Mon Sep 17 00:00:00 2001 From: nullchilly Date: Fri, 15 Jul 2022 22:21:03 +0700 Subject: [PATCH 2/4] refactor(setting): Formatting --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 6b47b08..33a3bda 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. -- Setting `enabled` to `true` enables this feature: +#### Setting `enabled` to `true` enables this feature: ```lua compile = { @@ -317,9 +317,9 @@ By default catppuccin writes the compiled results into the system's cache direct :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 +- Packer.nvim ```lua use { @@ -329,15 +329,15 @@ use { } ``` -#### Vim-plug +- Vim-plug ```lua Plug 'catppuccin/nvim', {'as': 'catppuccin', 'do': 'CatppuccinCompile'} ``` -- To auto-compile everytime you update your config: +#### To auto-compile everytime you update your config: -#### Packer.nvim +- Packer.nvim Create an autocmd `User PackerCompileDone` to update it every time packer is compiled: @@ -350,7 +350,7 @@ vim.api.nvim_create_autocmd("User", { }) ``` -#### Vim-plug +- Vim-plug Auto compile on save if catppuccin config is in `init.vim` From 7f092dc35aef7c58743d711b89a08cbcfb172b9b Mon Sep 17 00:00:00 2001 From: nullchilly Date: Fri, 15 Jul 2022 22:21:57 +0700 Subject: [PATCH 3/4] refactor(setting): Formatting --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 33a3bda..48fdf6c 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. -#### Setting `enabled` to `true` enables this feature: +- Setting `enabled` to `true` enables this feature: ```lua compile = { @@ -317,9 +317,9 @@ By default catppuccin writes the compiled results into the system's cache direct :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 +* Packer.nvim ```lua use { @@ -329,15 +329,15 @@ use { } ``` -- Vim-plug +* Vim-plug ```lua Plug 'catppuccin/nvim', {'as': 'catppuccin', 'do': 'CatppuccinCompile'} ``` -#### To auto-compile everytime you update your config: +- To auto-compile everytime you update your config: -- Packer.nvim +* Packer.nvim Create an autocmd `User PackerCompileDone` to update it every time packer is compiled: @@ -350,7 +350,7 @@ vim.api.nvim_create_autocmd("User", { }) ``` -- Vim-plug +* Vim-plug Auto compile on save if catppuccin config is in `init.vim` From 5c3bc1602157cccaefe10e0553446df18e9551e8 Mon Sep 17 00:00:00 2001 From: nullchilly Date: Fri, 15 Jul 2022 22:22:25 +0700 Subject: [PATCH 4/4] refactor(setting): Formatting --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 48fdf6c..6b47b08 100644 --- a/README.md +++ b/README.md @@ -319,7 +319,7 @@ By default catppuccin writes the compiled results into the system's cache direct - It's recommended to add `:CatppuccinCompile` to post-install/update hooks. For example: -* Packer.nvim +#### Packer.nvim ```lua use { @@ -329,7 +329,7 @@ use { } ``` -* Vim-plug +#### Vim-plug ```lua Plug 'catppuccin/nvim', {'as': 'catppuccin', 'do': 'CatppuccinCompile'} @@ -337,7 +337,7 @@ Plug 'catppuccin/nvim', {'as': 'catppuccin', 'do': 'CatppuccinCompile'} - To auto-compile everytime you update your config: -* Packer.nvim +#### Packer.nvim Create an autocmd `User PackerCompileDone` to update it every time packer is compiled: @@ -350,7 +350,7 @@ vim.api.nvim_create_autocmd("User", { }) ``` -* Vim-plug +#### Vim-plug Auto compile on save if catppuccin config is in `init.vim`