Merge pull request #195 from nullchilly/lua

refactor(setting): enable -> enabled for consistency
dev
Pocco81 2 years ago committed by GitHub
commit b025105386
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -88,7 +88,7 @@ dim_inactive = false,
transparent_background = false, transparent_background = false,
term_colors = false, term_colors = false,
compile = { compile = {
enable = false, enabled = false,
path = vim.fn.stdpath "cache" .. "/catppuccin", path = vim.fn.stdpath "cache" .. "/catppuccin",
suffix = "_compiled" 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. 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 ```lua
compile = { compile = {
enable = true, enabled = true,
path = vim.fn.stdpath "cache" .. "/catppuccin", path = vim.fn.stdpath "cache" .. "/catppuccin",
suffix = "_compiled" suffix = "_compiled"
}, },

@ -5,12 +5,12 @@ config.options = {
transparent_background = false, transparent_background = false,
term_colors = false, term_colors = false,
compile = { compile = {
enable = false, enabled = false,
path = vim.fn.stdpath("cache") .. "/catppuccin", path = vim.fn.stdpath("cache") .. "/catppuccin",
suffix = "_compiled", suffix = "_compiled",
}, },
dim_inactive = { dim_inactive = {
enable = false, enabled = false,
shade = "dark", shade = "dark",
percentage = 0.15, percentage = 0.15,
}, },

@ -37,8 +37,8 @@ function M.get()
Normal = { fg = cp.text, bg = cnf.transparent_background and cp.none or cp.base }, -- normal text Normal = { fg = cp.text, bg = cnf.transparent_background and cp.none or cp.base }, -- normal text
NormalNC = { NormalNC = {
fg = cp.text, fg = cp.text,
bg = (cnf.transparent_background and cnf.dim_inactive.enable and lui.dim()) bg = (cnf.transparent_background and cnf.dim_inactive.enabled and lui.dim())
or (cnf.dim_inactive.enable and cp.dim) or (cnf.dim_inactive.enabled and cp.dim)
or (cnf.transparent_background and cp.none) or (cnf.transparent_background and cp.none)
or cp.base, or cp.base,
}, -- normal text in non-current windows }, -- normal text in non-current windows

@ -3,9 +3,9 @@ local M = {}
function M.get() function M.get()
local cnf = require("catppuccin.config").options local cnf = require("catppuccin.config").options
local transparent_background = cnf.transparent_background 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 (transparent_background and "NONE")
or (cnf.dim_inactive.enable and cp.dim) or (cnf.dim_inactive.enabled and cp.dim)
or cp.base or cp.base
local inactive_bg = transparent_background and "NONE" or cp.mantle local inactive_bg = transparent_background and "NONE" or cp.mantle

@ -2,9 +2,9 @@ local M = {}
function M.get() function M.get()
local cnf = require("catppuccin.config").options 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.transparent_background and "NONE")
or (cnf.dim_inactive.enable and cp.dim) or (cnf.dim_inactive.enabled and cp.dim)
or cp.base or cp.base
return { return {
GitSignsAdd = { fg = cp.green, bg = bg_highlight }, -- diff mode: Added line |diff.txt| GitSignsAdd = { fg = cp.green, bg = bg_highlight }, -- diff mode: Added line |diff.txt|

@ -3,9 +3,9 @@ local M = {}
function M.get() function M.get()
local cnf = require("catppuccin.config").options local cnf = require("catppuccin.config").options
local transparent_background = cnf.transparent_background 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 (transparent_background and "NONE")
or (cnf.dim_inactive.enable and cp.dim) or (cnf.dim_inactive.enabled and cp.dim)
or cp.base or cp.base
return { return {
rainbowcol1 = { bg = bg_highlight, fg = cp.red }, rainbowcol1 = { bg = bg_highlight, fg = cp.red },

@ -38,7 +38,7 @@ function M.load()
local loaded = nil local loaded = nil
local config = require("catppuccin.config").options local config = require("catppuccin.config").options
if config.compile.enable == true then if config.compile.enabled == true then
local compiled_path = config.compile.path local compiled_path = config.compile.path
.. (vim.loop.os_uname().sysname == "Windows" and "\\" or "/") .. (vim.loop.os_uname().sysname == "Windows" and "\\" or "/")
.. vim.g.catppuccin_flavour .. vim.g.catppuccin_flavour

Loading…
Cancel
Save