From 833ff1a98af8c9e6a3a33df8e8deb235d4bd7292 Mon Sep 17 00:00:00 2001 From: Pocco81 Date: Sun, 1 May 2022 22:45:32 -0500 Subject: [PATCH] feat: new naming convention and better color transitions --- lua/catppuccin/config.lua | 16 +-- lua/catppuccin/core/integrations/barbar.lua | 34 +++--- .../core/integrations/bufferline.lua | 20 ++-- lua/catppuccin/core/integrations/cmp.lua | 10 +- lua/catppuccin/core/integrations/feline.lua | 4 +- lua/catppuccin/core/integrations/gitsigns.lua | 6 +- lua/catppuccin/core/integrations/hop.lua | 8 +- .../core/integrations/indent_blankline.lua | 4 +- .../core/integrations/lightspeed.lua | 28 ++--- lua/catppuccin/core/integrations/lsp_saga.lua | 4 +- .../core/integrations/lsp_trouble.lua | 4 +- .../core/integrations/native_lsp.lua | 16 +-- lua/catppuccin/core/integrations/neogit.lua | 10 +- lua/catppuccin/core/integrations/neotree.lua | 4 +- lua/catppuccin/core/integrations/nvimtree.lua | 12 +- .../core/integrations/symbols_outline.lua | 2 +- .../core/integrations/telescope.lua | 2 +- .../core/integrations/treesitter.lua | 26 ++-- .../core/integrations/ts_rainbow.lua | 2 +- .../core/integrations/vim_sneak.lua | 4 +- .../core/integrations/which_key.lua | 8 +- lua/catppuccin/core/mapper.lua | 112 +++++++++--------- lua/catppuccin/core/palettes/frappe.lua | 53 +++++---- lua/catppuccin/core/palettes/latte.lua | 41 ++++--- lua/catppuccin/core/palettes/macchiato.lua | 53 +++++---- lua/catppuccin/core/palettes/moccha.lua | 25 ++-- lua/catppuccin/main.lua | 11 +- lua/catppuccin/utils/colors.lua | 2 +- lua/catppuccin/utils/data.lua | 11 ++ lua/catppuccin/utils/util.lua | 10 +- lua/lightline/colorscheme/catppuccin.lua | 30 ++--- lua/lualine/themes/catppuccin.lua | 28 ++--- plugin/catppuccin.vim | 15 +++ 33 files changed, 330 insertions(+), 285 deletions(-) create mode 100644 lua/catppuccin/utils/data.lua create mode 100644 plugin/catppuccin.vim diff --git a/lua/catppuccin/config.lua b/lua/catppuccin/config.lua index bb515b4..db44af1 100644 --- a/lua/catppuccin/config.lua +++ b/lua/catppuccin/config.lua @@ -6,15 +6,17 @@ config.options = { term_colors = false, styles = { comments = "italic", - functions = "italic", - keywords = "italic", + conditionals = "italic", + loops = "NONE", + functions = "NONE", + keywords = "NONE", strings = "NONE", - variables = "italic", - numbers = "bold", - booleans = "bold", - operators = "NONE", + variables = "NONE", + numbers = "NONE", + booleans = "NONE", properties = "NONE", - types = "NONE" + types = "NONE", + operators = "NONE", }, integrations = { treesitter = true, diff --git a/lua/catppuccin/core/integrations/barbar.lua b/lua/catppuccin/core/integrations/barbar.lua index 3304ad1..5a236e8 100644 --- a/lua/catppuccin/core/integrations/barbar.lua +++ b/lua/catppuccin/core/integrations/barbar.lua @@ -2,23 +2,23 @@ local M = {} function M.get(cp) return { - BufferCurrent = { bg = cp.black4, fg = cp.white }, - BufferCurrentIndex = { bg = cp.black4, fg = cp.blue }, - BufferCurrentMod = { bg = cp.black4, fg = cp.yellow }, - BufferCurrentSign = { bg = cp.black4, fg = cp.blue }, - BufferCurrentTarget = { bg = cp.black4, fg = cp.red }, - BufferVisible = { bg = cp.black1, fg = cp.white }, - BufferVisibleIndex = { bg = cp.black1, fg = cp.blue }, - BufferVisibleMod = { bg = cp.black1, fg = cp.yellow }, - BufferVisibleSign = { bg = cp.black1, fg = cp.blue }, - BufferVisibleTarget = { bg = cp.black1, fg = cp.red }, - BufferInactive = { bg = cp.black1, fg = cp.gray0 }, - BufferInactiveIndex = { bg = cp.black1, fg = cp.gray0 }, - BufferInactiveMod = { bg = cp.black1, fg = cp.yellow }, - BufferInactiveSign = { bg = cp.black1, fg = cp.blue }, - BufferInactiveTarget = { bg = cp.black1, fg = cp.red }, - BufferTabpages = { bg = cp.black1, fg = cp.none }, - BufferTabpage = { bg = cp.black1, fg = cp.blue }, + BufferCurrent = { bg = cp.surface1, fg = cp.text }, + BufferCurrentIndex = { bg = cp.surface1, fg = cp.blue }, + BufferCurrentMod = { bg = cp.surface1, fg = cp.yellow }, + BufferCurrentSign = { bg = cp.surface1, fg = cp.blue }, + BufferCurrentTarget = { bg = cp.surface1, fg = cp.red }, + BufferVisible = { bg = cp.base1, fg = cp.text }, + BufferVisibleIndex = { bg = cp.base1, fg = cp.blue }, + BufferVisibleMod = { bg = cp.base1, fg = cp.yellow }, + BufferVisibleSign = { bg = cp.base1, fg = cp.blue }, + BufferVisibleTarget = { bg = cp.base1, fg = cp.red }, + BufferInactive = { bg = cp.base1, fg = cp.overlay0 }, + BufferInactiveIndex = { bg = cp.base1, fg = cp.overlay0 }, + BufferInactiveMod = { bg = cp.base1, fg = cp.yellow }, + BufferInactiveSign = { bg = cp.base1, fg = cp.blue }, + BufferInactiveTarget = { bg = cp.base1, fg = cp.red }, + BufferTabpages = { bg = cp.base1, fg = cp.none }, + BufferTabpage = { bg = cp.base1, fg = cp.blue }, } end diff --git a/lua/catppuccin/core/integrations/bufferline.lua b/lua/catppuccin/core/integrations/bufferline.lua index ce86eb2..b6be5c4 100644 --- a/lua/catppuccin/core/integrations/bufferline.lua +++ b/lua/catppuccin/core/integrations/bufferline.lua @@ -2,25 +2,25 @@ local M = {} function M.get(cp) - local inactive_bg = cp.black1 + local inactive_bg = cp.base1 return { - BufferLineFill = { bg = cp.black0 }, - BufferLineBackground = { fg = cp.white, bg = inactive_bg }, -- others - BufferLineBufferVisible = { fg = cp.black4, bg = inactive_bg }, - BufferLineBufferSelected = { fg = cp.white, bg = cp.black2, style = "bold,italic" }, -- current - BufferLineTab = { fg = cp.black4, bg = cp.black2 }, + BufferLineFill = { bg = cp.base0 }, + BufferLineBackground = { fg = cp.text, bg = inactive_bg }, -- others + BufferLineBufferVisible = { fg = cp.surface1, bg = inactive_bg }, + BufferLineBufferSelected = { fg = cp.text, bg = cp.base2, style = "bold,italic" }, -- current + BufferLineTab = { fg = cp.surface1, bg = cp.base2 }, BufferLineTabSelected = { fg = cp.red, bg = cp.blue }, BufferLineTabClose = { fg = cp.red, bg = inactive_bg }, - BufferLineIndicatorSelected = { fg = cp.peach, bg = cp.black2 }, + BufferLineIndicatorSelected = { fg = cp.peach, bg = cp.base2 }, -- separators BufferLineSeparator = { fg = inactive_bg, bg = inactive_bg }, BufferLineSeparatorVisible = { fg = inactive_bg, bg = inactive_bg }, BufferLineSeparatorSelected = { fg = inactive_bg, bg = inactive_bg }, -- close buttons - BufferLineCloseButton = { fg = cp.black4, bg = inactive_bg }, - BufferLineCloseButtonVisible = { fg = cp.black4, bg = inactive_bg }, - BufferLineCloseButtonSelected = { fg = cp.red, bg = cp.black2 }, + BufferLineCloseButton = { fg = cp.surface1, bg = inactive_bg }, + BufferLineCloseButtonVisible = { fg = cp.surface1, bg = inactive_bg }, + BufferLineCloseButtonSelected = { fg = cp.red, bg = cp.base2 }, } end diff --git a/lua/catppuccin/core/integrations/cmp.lua b/lua/catppuccin/core/integrations/cmp.lua index ebc8d9a..57b0afb 100644 --- a/lua/catppuccin/core/integrations/cmp.lua +++ b/lua/catppuccin/core/integrations/cmp.lua @@ -2,12 +2,12 @@ local M = {} function M.get(cp) return { - CmpItemAbbr = { fg = cp.gray2 }, - CmpItemAbbrDeprecated = { fg = cp.gray0, style = "strikethrough" }, + CmpItemAbbr = { fg = cp.overlay2 }, + CmpItemAbbrDeprecated = { fg = cp.overlay0, style = "strikethrough" }, CmpItemKind = { fg = cp.blue }, - CmpItemMenu = { fg = cp.white }, - CmpItemAbbrMatch = { fg = cp.white, style = "bold" }, - CmpItemAbbrMatchFuzzy = { fg = cp.white, style = "bold" }, + CmpItemMenu = { fg = cp.text }, + CmpItemAbbrMatch = { fg = cp.text, style = "bold" }, + CmpItemAbbrMatchFuzzy = { fg = cp.text, style = "bold" }, -- kind support CmpItemKindSnippet = { fg = cp.mauve }, diff --git a/lua/catppuccin/core/integrations/feline.lua b/lua/catppuccin/core/integrations/feline.lua index 0444e04..1a7ff19 100644 --- a/lua/catppuccin/core/integrations/feline.lua +++ b/lua/catppuccin/core/integrations/feline.lua @@ -30,9 +30,9 @@ local clrs = require("catppuccin.core.color_palette") -- settings local sett = { - bkg = clrs.black3, + bkg = clrs.surface0, diffs = clrs.mauve, - extras = clrs.gray1, + extras = clrs.overlay1, curr_file = clrs.maroon, curr_dir = clrs.flamingo, } diff --git a/lua/catppuccin/core/integrations/gitsigns.lua b/lua/catppuccin/core/integrations/gitsigns.lua index 8c6fc20..5b6d078 100644 --- a/lua/catppuccin/core/integrations/gitsigns.lua +++ b/lua/catppuccin/core/integrations/gitsigns.lua @@ -2,9 +2,9 @@ local M = {} function M.get(cp) return { - GitSignsAdd = { fg = cp.green, bg = cnf.transparent_background and cp.none or cp.black2 }, -- diff mode: Added line |diff.txt| - GitSignsChange = { fg = cp.yellow, bg = cnf.transparent_background and cp.none or cp.black2 }, -- diff mode: Changed line |diff.txt| - GitSignsDelete = { fg = cp.red, bg = cnf.transparent_background and cp.none or cp.black2 }, -- diff mode: Deleted line |diff.txt| + GitSignsAdd = { fg = cp.green, bg = cnf.transparent_background and cp.none or cp.base2 }, -- diff mode: Added line |diff.txt| + GitSignsChange = { fg = cp.yellow, bg = cnf.transparent_background and cp.none or cp.base2 }, -- diff mode: Changed line |diff.txt| + GitSignsDelete = { fg = cp.red, bg = cnf.transparent_background and cp.none or cp.base2 }, -- diff mode: Deleted line |diff.txt| } end diff --git a/lua/catppuccin/core/integrations/hop.lua b/lua/catppuccin/core/integrations/hop.lua index 102050c..ac49c9a 100644 --- a/lua/catppuccin/core/integrations/hop.lua +++ b/lua/catppuccin/core/integrations/hop.lua @@ -2,10 +2,10 @@ local M = {} function M.get(cp) return { - HopNextKey = { bg = cp.black2, fg = cp.peach, style = "bold,underline" }, - HopNextKey1 = { bg = cp.black2, fg = cp.blue, style = "bold" }, - HopNextKey2 = { bg = cp.black2, fg = cp.teal, style = "bold,italic" }, - HopUnmatched = { bg = cp.black2, fg = cp.gray0 }, + HopNextKey = { bg = cp.base2, fg = cp.peach, style = "bold,underline" }, + HopNextKey1 = { bg = cp.base2, fg = cp.blue, style = "bold" }, + HopNextKey2 = { bg = cp.base2, fg = cp.teal, style = "bold,italic" }, + HopUnmatched = { bg = cp.base2, fg = cp.overlay0 }, } end diff --git a/lua/catppuccin/core/integrations/indent_blankline.lua b/lua/catppuccin/core/integrations/indent_blankline.lua index df43707..3fe3bde 100644 --- a/lua/catppuccin/core/integrations/indent_blankline.lua +++ b/lua/catppuccin/core/integrations/indent_blankline.lua @@ -3,8 +3,8 @@ local M = {} function M.get(cp) local hi = { - IndentBlanklineChar = { fg = cp.black3 }, - IndentBlanklineContextChar = { fg = cp.white }, + IndentBlanklineChar = { fg = cp.surface0 }, + IndentBlanklineContextChar = { fg = cp.text }, } if cnf.integrations.indent_blankline.colored_indent_levels then diff --git a/lua/catppuccin/core/integrations/lightspeed.lua b/lua/catppuccin/core/integrations/lightspeed.lua index 0565df4..ae69ac1 100644 --- a/lua/catppuccin/core/integrations/lightspeed.lua +++ b/lua/catppuccin/core/integrations/lightspeed.lua @@ -28,20 +28,20 @@ function M.get(cp) end return { - LightspeedLabel = {bg = cp.black4, fg = cp.white}, - LightspeedOverlapped = {bg = cp.black4, fg = cp.white}, - LightspeedLabelDistant = {bg = cp.mauve, fg = cp.white}, - LightspeedLabelDistantOverlapped = {bg = cp.mauve, fg = cp.white}, - LightspeedShortcut = {bg = cp.black2, fg = cp.peach, style = "italic"}, - LightspeedShortcutOverlapped = {bg = cp.black2, fg = cp.peach, style = "bold"}, - LightspeedMaskedChar = {bg = cp.black2, fg = cp.red, style = "undercurl"}, - LightspeedGreyWash = {bg = cp.black2, fg = cp.gray0}, - LightspeedUnlabeledMatch = {bg = cp.black2, fg = cp.red, style = "underline"}, - LightspeedOneCharMatch = {bg = cp.black2, fg = cp.red, style = "underline"}, - LightspeedUniqueChar = {bg = cp.black2, fg = cp.green, style = "strikethrough"}, - LightspeedPendingOpArea = {bg = cp.black2, fg = cp.green, style = "strikethrough"}, - LightspeedPendingChangeOpArea = {bg = cp.black2, fg = cp.green, style = "strikethrough"}, - LightspeedCursor = {fg = cp.black2, bg = cp.white}, + LightspeedLabel = {bg = cp.surface1, fg = cp.text}, + LightspeedOverlapped = {bg = cp.surface1, fg = cp.text}, + LightspeedLabelDistant = {bg = cp.mauve, fg = cp.text}, + LightspeedLabelDistantOverlapped = {bg = cp.mauve, fg = cp.text}, + LightspeedShortcut = {bg = cp.base2, fg = cp.peach, style = "italic"}, + LightspeedShortcutOverlapped = {bg = cp.base2, fg = cp.peach, style = "bold"}, + LightspeedMaskedChar = {bg = cp.base2, fg = cp.red, style = "undercurl"}, + LightspeedGreyWash = {bg = cp.base2, fg = cp.overlay0}, + LightspeedUnlabeledMatch = {bg = cp.base2, fg = cp.red, style = "underline"}, + LightspeedOneCharMatch = {bg = cp.base2, fg = cp.red, style = "underline"}, + LightspeedUniqueChar = {bg = cp.base2, fg = cp.green, style = "strikethrough"}, + LightspeedPendingOpArea = {bg = cp.base2, fg = cp.green, style = "strikethrough"}, + LightspeedPendingChangeOpArea = {bg = cp.base2, fg = cp.green, style = "strikethrough"}, + LightspeedCursor = {fg = cp.base2, bg = cp.text}, } end diff --git a/lua/catppuccin/core/integrations/lsp_saga.lua b/lua/catppuccin/core/integrations/lsp_saga.lua index b32cf43..4731cec 100644 --- a/lua/catppuccin/core/integrations/lsp_saga.lua +++ b/lua/catppuccin/core/integrations/lsp_saga.lua @@ -6,14 +6,14 @@ function M.get(cp) DiagnosticWarning = { fg = cp.yellow }, DiagnosticInformation = { fg = cp.blue }, DiagnosticHint = { fg = cp.hint }, - LspFloatWinNormal = { bg = cp.black0 }, + LspFloatWinNormal = { bg = cp.base0 }, LspFloatWinBorder = { fg = cp.blue }, LspSagaBorderTitle = { fg = cp.flamingo }, LspSagaHoverBorder = { fg = cp.blue }, LspSagaRenameBorder = { fg = cp.teal }, LspSagaDefPreviewBorder = { fg = cp.teal }, LspSagaCodeActionBorder = { fg = cp.blue }, - LspSagaFinderSelection = { fg = cp.black4 }, + LspSagaFinderSelection = { fg = cp.surface1 }, LspSagaCodeActionTitle = { fg = cp.blue1 }, LspSagaCodeActionContent = { fg = cp.purple }, LspSagaSignatureHelpBorder = { fg = cp.red }, diff --git a/lua/catppuccin/core/integrations/lsp_trouble.lua b/lua/catppuccin/core/integrations/lsp_trouble.lua index 3f3e4c5..040f5bc 100644 --- a/lua/catppuccin/core/integrations/lsp_trouble.lua +++ b/lua/catppuccin/core/integrations/lsp_trouble.lua @@ -3,8 +3,8 @@ local M = {} function M.get(cp) return { LspTroubleText = { fg = cp.green }, - LspTroubleCount = { fg = cp.pink, bg = cp.black4 }, - LspTroubleNormal = { fg = cp.white, bg = cp.black0 }, + LspTroubleCount = { fg = cp.pink, bg = cp.surface1 }, + LspTroubleNormal = { fg = cp.text, bg = cp.base0 }, } end diff --git a/lua/catppuccin/core/integrations/native_lsp.lua b/lua/catppuccin/core/integrations/native_lsp.lua index c7bf11c..022d796 100644 --- a/lua/catppuccin/core/integrations/native_lsp.lua +++ b/lua/catppuccin/core/integrations/native_lsp.lua @@ -16,14 +16,14 @@ function M.get(cp) -- These groups are for the native LSP cliencp. Some other LSP clients may -- use these groups, or use their own. Consult your LSP client's -- documentation. - LspReferenceText = { bg = cp.black4 }, -- used for highlighting "text" references - LspReferenceRead = { bg = cp.black4 }, -- used for highlighting "read" references - LspReferenceWrite = { bg = cp.black4 }, -- used for highlighting "write" references + LspReferenceText = { bg = cp.surface1 }, -- used for highlighting "text" references + LspReferenceRead = { bg = cp.surface1 }, -- used for highlighting "read" references + LspReferenceWrite = { bg = cp.surface1 }, -- used for highlighting "write" references -- hightlight diagnostics in numberline - DiagnosticError = { bg = util.darken(error, darkening_percentage, cp.black2), fg = error, style = virtual_text.errors }, -- Used as the base highlight group. Other Diagnostic highlights link to this by default - DiagnosticWarn = { bg = util.darken(warning, darkening_percentage, cp.black2), fg = warning, style = virtual_text.warnings }, -- Used as the base highlight group. Other Diagnostic highlights link to this by default - DiagnosticInfo = { bg = util.darken(info, darkening_percentage, cp.black2), fg = info, style = virtual_text.information }, -- Used as the base highlight group. Other Diagnostic highlights link to this by default - DiagnosticHint = { bg = util.darken(hint, darkening_percentage, cp.black2), fg = hint, style = virtual_text.hints }, -- Used as the base highlight group. Other Diagnostic highlights link to this by default + DiagnosticError = { bg = util.darken(error, darkening_percentage, cp.base2), fg = error, style = virtual_text.errors }, -- Used as the base highlight group. Other Diagnostic highlights link to this by default + DiagnosticWarn = { bg = util.darken(warning, darkening_percentage, cp.base2), fg = warning, style = virtual_text.warnings }, -- Used as the base highlight group. Other Diagnostic highlights link to this by default + DiagnosticInfo = { bg = util.darken(info, darkening_percentage, cp.base2), fg = info, style = virtual_text.information }, -- Used as the base highlight group. Other Diagnostic highlights link to this by default + DiagnosticHint = { bg = util.darken(hint, darkening_percentage, cp.base2), fg = hint, style = virtual_text.hints }, -- Used as the base highlight group. Other Diagnostic highlights link to this by default -- util. -- for nvim nightly @@ -54,7 +54,7 @@ function M.get(cp) LspDiagnosticsUnderlineWarning = { style = underlines.warnings, sp = warning }, -- Used to underline "Warning" diagnostics LspDiagnosticsUnderlineInformation = { style = underlines.information, sp = info }, -- Used to underline "Information" diagnostics LspDiagnosticsUnderlineHint = { style = underlines.hints, sp = hint }, -- Used to underline "Hint" diagnostics - LspCodeLens = { fg = cp.gray0 }, -- virtual text of the codelens + LspCodeLens = { fg = cp.overlay0 }, -- virtual text of the codelens } end diff --git a/lua/catppuccin/core/integrations/neogit.lua b/lua/catppuccin/core/integrations/neogit.lua index 5da1fc7..71b289b 100644 --- a/lua/catppuccin/core/integrations/neogit.lua +++ b/lua/catppuccin/core/integrations/neogit.lua @@ -4,11 +4,11 @@ function M.get(cp) return { NeogitBranch = { fg = cp.pink }, NeogitRemote = { fg = cp.pink }, - NeogitHunkHeader = { bg = cp.blue, fg = cp.white }, - NeogitHunkHeaderHighlight = { bg = cp.black2, fg = cp.blue }, - NeogitDiffContextHighlight = { bg = cp.black1, fg = cp.gray2 }, - NeogitDiffDeleteHighlight = { bg = cp.black1, fg = cp.red }, - NeogitDiffAddHighlight = { bg = cp.black1, fg = cp.green }, + NeogitHunkHeader = { bg = cp.blue, fg = cp.text }, + NeogitHunkHeaderHighlight = { bg = cp.base2, fg = cp.blue }, + NeogitDiffContextHighlight = { bg = cp.base1, fg = cp.overlay2 }, + NeogitDiffDeleteHighlight = { bg = cp.base1, fg = cp.red }, + NeogitDiffAddHighlight = { bg = cp.base1, fg = cp.green }, } end diff --git a/lua/catppuccin/core/integrations/neotree.lua b/lua/catppuccin/core/integrations/neotree.lua index 3dadc0a..d4dc1fa 100644 --- a/lua/catppuccin/core/integrations/neotree.lua +++ b/lua/catppuccin/core/integrations/neotree.lua @@ -13,8 +13,8 @@ function M.get(cp) return { NeoTreeDirectoryName = { fg = cp.blue }, NeoTreeDirectoryIcon = { fg = cp.blue }, - NeoTreeNormal = { fg = cp.white, bg = neotree.transparent_panel and "NONE" or cp.black1 }, - NeoTreeIndentMarker = { fg = cp.gray0 }, + NeoTreeNormal = { fg = cp.text, bg = neotree.transparent_panel and "NONE" or cp.base1 }, + NeoTreeIndentMarker = { fg = cp.overlay0 }, NeoTreeRootName = { fg = root_dir_color, style = "bold" }, NeoTreeSymbolicLinkTarget = { fg = cp.pink }, NeoTreeGitModified = { fg = cp.yellow }, diff --git a/lua/catppuccin/core/integrations/nvimtree.lua b/lua/catppuccin/core/integrations/nvimtree.lua index 72663a3..505aecd 100644 --- a/lua/catppuccin/core/integrations/nvimtree.lua +++ b/lua/catppuccin/core/integrations/nvimtree.lua @@ -4,7 +4,7 @@ function M.get(cp) local config = require("catppuccin.config").options local nvimtree = config.integrations.nvimtree - local root_dir_color = cp.black1 + local root_dir_color = cp.base1 if nvimtree.show_root == true then root_dir_color = cp.blue end @@ -13,19 +13,19 @@ function M.get(cp) return { NvimTreeFolderName = { fg = cp.blue }, NvimTreeFolderIcon = { fg = cp.blue }, - NvimTreeNormal = { fg = cp.white, bg = nvimtree.transparent_panel and "NONE" or cp.black1 }, + NvimTreeNormal = { fg = cp.text, bg = nvimtree.transparent_panel and "NONE" or cp.base1 }, NvimTreeOpenedFolderName = { fg = cp.blue }, NvimTreeEmptyFolderName = { fg = cp.blue }, - NvimTreeIndentMarker = { fg = cp.gray0 }, - NvimTreeVertSplit = { fg = cp.black2, bg = cp.black2 }, + NvimTreeIndentMarker = { fg = cp.overlay0 }, + NvimTreeVertSplit = { fg = cp.base2, bg = cp.base2 }, NvimTreeRootFolder = { fg = root_dir_color, style = "bold" }, NvimTreeSymlink = { fg = cp.pink }, - NvimTreeStatuslineNc = { fg = cp.black1, bg = cp.black1 }, + NvimTreeStatuslineNc = { fg = cp.base1, bg = cp.base1 }, NvimTreeGitDirty = { fg = cp.yellow }, NvimTreeGitNew = { fg = cp.blue }, NvimTreeGitDeleted = { fg = cp.red }, NvimTreeSpecialFile = { fg = cp.flamingo }, - NvimTreeImageFile = { fg = cp.white }, + NvimTreeImageFile = { fg = cp.text }, NvimTreeOpenedFile = { fg = cp.pink }, } end diff --git a/lua/catppuccin/core/integrations/symbols_outline.lua b/lua/catppuccin/core/integrations/symbols_outline.lua index a660d43..200e175 100644 --- a/lua/catppuccin/core/integrations/symbols_outline.lua +++ b/lua/catppuccin/core/integrations/symbols_outline.lua @@ -2,7 +2,7 @@ local M = {} function M.get(cp) return { - FocusedSymbol = { fg = cp.yellow, bg = cp.black2 }, + FocusedSymbol = { fg = cp.yellow, bg = cp.base2 }, } end diff --git a/lua/catppuccin/core/integrations/telescope.lua b/lua/catppuccin/core/integrations/telescope.lua index 1072dde..d32a76a 100644 --- a/lua/catppuccin/core/integrations/telescope.lua +++ b/lua/catppuccin/core/integrations/telescope.lua @@ -4,7 +4,7 @@ function M.get(cp) return { TelescopeBorder = { fg = cp.blue }, TelescopeSelectionCaret = { fg = cp.flamingo }, - TelescopeSelection = { fg = cp.white, bg = cp.black3, style = "bold" }, + TelescopeSelection = { fg = cp.text, bg = cp.surface0, style = "bold" }, TelescopeMatching = { fg = cp.blue }, } end diff --git a/lua/catppuccin/core/integrations/treesitter.lua b/lua/catppuccin/core/integrations/treesitter.lua index 558df2c..9de875d 100644 --- a/lua/catppuccin/core/integrations/treesitter.lua +++ b/lua/catppuccin/core/integrations/treesitter.lua @@ -1,7 +1,7 @@ local M = {} function M.get(cp) - -- local delimeters = cp.gray2 + -- local delimeters = cp.overlay2 local operators = cp.sky local cl = cp.mauve -- conditionals, loops local keywords = cp.mauve @@ -27,8 +27,8 @@ function M.get(cp) TSConstructor = { fg = cp.sapphire }, -- For constructor calls and definitions: = { } in Lua, and Java constructors. TSConstant = { fg = cp.peach }, -- For constants - TSConditional = { fg = cl, style = cnf.styles.keywords or "NONE" }, -- For keywords related to conditionnals. - TSRepeat = { fg = cl, style = cnf.styles.keywords or "NONE" }, -- For keywords related to loops. + TSConditional = { fg = cl, style = cnf.styles.conditionals or "NONE" }, -- For keywords related to conditionnals. + TSRepeat = { fg = cl, style = cnf.styles.loops or "NONE" }, -- For keywords related to loops. TSException = { fg = cp.mauve, style = cnf.styles.keywords or "NONE" }, -- For exception related keywords. -- builtin @@ -49,29 +49,29 @@ function M.get(cp) -- TSAnnotation = { }; -- For C++/Dart attributes, annotations that can be attached to the code to denote some kind of meta information. -- TSAttribute = { }; -- (unstable) TODO: docs -- TSCharacter = { }; -- For characters. - -- TSgray0 = { }; -- For gray0 blocks. - TSNote = { fg = cp.black2, bg = cp.blue }, - TSWarning = { fg = cp.black2, bg = cp.yellow }, - TSDanger = { fg = cp.black2, bg = cp.red }, + -- TSoverlay0 = { }; -- For overlay0 blocks. + TSNote = { fg = cp.base2, bg = cp.blue }, + TSWarning = { fg = cp.base2, bg = cp.yellow }, + TSDanger = { fg = cp.base2, bg = cp.red }, TSConstMacro = { fg = cp.mauve }; -- For constants that are defined by macros: NULL in cp. -- TSError = { fg = cp.red }, -- For syntax/parser errors. - -- rustTSField = { fg = cp.black4 }, -- For fields. + -- rustTSField = { fg = cp.surface1 }, -- For fields. TSLabel = { fg = cp.sapphire }, -- For labels: label: in C and :label: in Lua. TSMethod = { fg = cp.blue, style = cnf.styles.functions or "NONE" }, -- For method calls and definitions. -- TSNone = { }; -- TODO: docs -- TSParameterReference= { }; -- For references to parameters of a function. tomlTSProperty = { fg = cp.blue }, -- Differentiates between string and properties - TSPunctDelimiter = { fg = cp.gray2 }, -- For delimiters ie: . + TSPunctDelimiter = { fg = cp.overlay2 }, -- For delimiters ie: . -- TSPunctBracket = { fg = delimeters }, -- For brackets and parenthesis. - TSPunctBracket = { fg = cp.gray2 }, -- For brackets and parenthesis. + TSPunctBracket = { fg = cp.overlay2 }, -- For brackets and parenthesis. TSString = { fg = cp.green, style = cnf.styles.strings or "NONE" }, -- For strings. TSStringRegex = { fg = cp.peach, style = cnf.styles.strings or "NONE" }, -- For regexes. -- TSSymbol = { }; -- For identifiers referring to symbols or atoms. - TSVariable = { fg = cp.white, style = cnf.styles.variables or "NONE" }, -- Any variable name that does not have another highlighcp. + TSVariable = { fg = cp.text, style = cnf.styles.variables or "NONE" }, -- Any variable name that does not have another highlighcp. TSTagAttribute = { fg = cp.teal, style = "italic" }, -- Tags like html tag names. TSTag = { fg = cp.mauve }, -- Tags like html tag names. TSTagDelimiter = { fg = cp.sky }, -- Tag delimiter like < > / - TSText = { fg = cp.white }, -- For strings considerated text in a markup language. + TSText = { fg = cp.text }, -- For strings considerated text in a markup language. -- TSEmphasis = { }; -- For text to be represented with emphasis. -- TSUnderline = { }; -- For text to be represented with an underline. -- TSStrike = { }; -- For strikethrough texcp. @@ -106,7 +106,7 @@ function M.get(cp) tsxTSTagAttribute = { fg = cp.mauve }, -- cpp - cppTSProperty = { fg = cp.white }, + cppTSProperty = { fg = cp.text }, -- yaml yamlTSField = { fg = cp.blue }, -- For fields. diff --git a/lua/catppuccin/core/integrations/ts_rainbow.lua b/lua/catppuccin/core/integrations/ts_rainbow.lua index 1e4b74a..3ba2a14 100644 --- a/lua/catppuccin/core/integrations/ts_rainbow.lua +++ b/lua/catppuccin/core/integrations/ts_rainbow.lua @@ -2,7 +2,7 @@ local M = {} function M.get(cp) local transparent_background = require("catppuccin.config").options.transparent_background - local bg_highlight = transparent_background and "NONE" or cp.black2 + local bg_highlight = transparent_background and "NONE" or cp.base2 return { rainbowcol1 = {bg = bg_highlight, fg = cp.red}, rainbowcol2 = {bg = bg_highlight, fg = cp.teal}, diff --git a/lua/catppuccin/core/integrations/vim_sneak.lua b/lua/catppuccin/core/integrations/vim_sneak.lua index 9dd5ec4..4c8f9cb 100644 --- a/lua/catppuccin/core/integrations/vim_sneak.lua +++ b/lua/catppuccin/core/integrations/vim_sneak.lua @@ -2,8 +2,8 @@ local M = {} function M.get(cp) return { - Sneak = { fg = cp.gray2, bg = cp.pink }, - SneakScope = { bg = cp.white }, + Sneak = { fg = cp.overlay2, bg = cp.pink }, + SneakScope = { bg = cp.text }, } end diff --git a/lua/catppuccin/core/integrations/which_key.lua b/lua/catppuccin/core/integrations/which_key.lua index d14136c..10b8056 100644 --- a/lua/catppuccin/core/integrations/which_key.lua +++ b/lua/catppuccin/core/integrations/which_key.lua @@ -5,10 +5,10 @@ function M.get(cp) WhichKey = { fg = cp.flamingo }, WhichKeyGroup = { fg = cp.blue }, WhichKeyDesc = { fg = cp.pink }, - WhichKeySeperator = { fg = cp.gray0 }, - WhichKeySeparator = { fg = cp.gray0 }, - WhichKeyFloat = { bg = cp.black0 }, - WhichKeyValue = { fg = cp.gray0 }, + WhichKeySeperator = { fg = cp.overlay0 }, + WhichKeySeparator = { fg = cp.overlay0 }, + WhichKeyFloat = { bg = cp.base0 }, + WhichKeyValue = { fg = cp.overlay0 }, } end diff --git a/lua/catppuccin/core/mapper.lua b/lua/catppuccin/core/mapper.lua index 941a33e..89e8255 100644 --- a/lua/catppuccin/core/mapper.lua +++ b/lua/catppuccin/core/mapper.lua @@ -10,7 +10,7 @@ local function get_properties() background = "dark", } - if colors_util.assert_brightness(cp.black2) then + if colors_util.assert_brightness(cp.base2) then props["background"] = "light" end @@ -21,65 +21,65 @@ local function get_base() cp.none = "NONE" return { - Comment = { fg = cp.gray0, style = cnf.styles.comments }, -- just comments - ColorColumn = { bg = cp.black3 }, -- used for the columns set with 'colorcolumn' - Conceal = { fg = cp.gray1 }, -- placeholder characters substituted for concealed text (see 'conceallevel') - Cursor = { fg = cp.black2, bg = cp.white }, -- character under the cursor - lCursor = { fg = cp.black2, bg = cp.white }, -- the character under the cursor when |language-mapping| is used (see 'guicursor') - CursorIM = { fg = cp.black2, bg = cp.white }, -- like Cursor, but used when in IME mode |CursorIM| - CursorColumn = { bg = cp.black1 }, -- Screen-column at the cursor, when 'cursorcolumn' is secp. - CursorLine = { bg = colors_util.vary_color({latte = util.lighten(cp.black1, 0.70, cp.black2)}, util.darken(cp.black3, 0.64, cp.black2)) }, -- Screen-line at the cursor, when 'cursorline' is secp. Low-priority if foreground (ctermfg OR guifg) is not secp. + Comment = { fg = cp.surface2, style = cnf.styles.comments }, -- just comments + ColorColumn = { bg = cp.surface0 }, -- used for the columns set with 'colorcolumn' + Conceal = { fg = cp.overlay1 }, -- placeholder characters substituted for concealed text (see 'conceallevel') + Cursor = { fg = cp.base2, bg = cp.text }, -- character under the cursor + lCursor = { fg = cp.base2, bg = cp.text }, -- the character under the cursor when |language-mapping| is used (see 'guicursor') + CursorIM = { fg = cp.base2, bg = cp.text }, -- like Cursor, but used when in IME mode |CursorIM| + CursorColumn = { bg = cp.base1 }, -- Screen-column at the cursor, when 'cursorcolumn' is secp. + CursorLine = { bg = colors_util.vary_color({latte = util.lighten(cp.base1, 0.70, cp.base2)}, util.darken(cp.surface0, 0.64, cp.base2)) }, -- Screen-line at the cursor, when 'cursorline' is secp. Low-priority if foreground (ctermfg OR guifg) is not secp. Directory = { fg = cp.blue }, -- directory names (and other special names in listings) - EndOfBuffer = { fg = cp.black2 }, -- filler lines (~) after the end of the buffer. By default, this is highlighted like |hl-NonText|. + EndOfBuffer = { fg = cp.base2 }, -- filler lines (~) after the end of the buffer. By default, this is highlighted like |hl-NonText|. ErrorMsg = { fg = cp.red, style = "bold,italic" }, -- error messages on the command line - VertSplit = { fg = cp.black0 }, -- the column separating vertically split windows - Folded = { fg = cp.blue, bg = cp.black4 }, -- line used for closed folds - FoldColumn = { bg = cp.black2, fg = cp.gray0 }, -- 'foldcolumn' - SignColumn = { bg = cnf.transparent_background and cp.none or cp.black2, fg = cp.black4 }, -- column where |signs| are displayed - SignColumnSB = { bg = cp.black0, fg = cp.black4 }, -- column where |signs| are displayed - Substitute = { bg = cp.black4, fg = cp.pink }, -- |:substitute| replacement text highlighting - LineNr = { fg = colors_util.vary_color({latte = cp.black0}, cp.black4) }, -- Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is secp. + VertSplit = { fg = cp.base0 }, -- the column separating vertically split windows + Folded = { fg = cp.blue, bg = cp.surface1 }, -- line used for closed folds + FoldColumn = { bg = cp.base2, fg = cp.overlay0 }, -- 'foldcolumn' + SignColumn = { bg = cnf.transparent_background and cp.none or cp.base2, fg = cp.surface1 }, -- column where |signs| are displayed + SignColumnSB = { bg = cp.base0, fg = cp.surface1 }, -- column where |signs| are displayed + Substitute = { bg = cp.surface1, fg = cp.pink }, -- |:substitute| replacement text highlighting + LineNr = { fg = colors_util.vary_color({latte = cp.base0}, cp.surface1) }, -- Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is secp. CursorLineNr = { fg = cp.lavender }, -- Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line. highlights the number in numberline. MatchParen = { fg = cp.peach, style = "bold" }, -- The character under the cursor or just before it, if it is a paired bracket, and its match. |pi_paren.txt| - ModeMsg = { fg = cp.white, style = "bold" }, -- 'showmode' message (e.g., "-- INSERT -- ") - MsgArea = { fg = cp.white }, -- Area for messages and cmdline + ModeMsg = { fg = cp.text, style = "bold" }, -- 'showmode' message (e.g., "-- INSERT -- ") + MsgArea = { fg = cp.text }, -- Area for messages and cmdline MsgSeparator = {}, -- Separator for scrolled messages, `msgsep` flag of 'display' MoreMsg = { fg = cp.blue }, -- |more-prompt| - NonText = { fg = cp.gray0 }, -- '@' at the end of the window, characters from 'showbreak' and other characters that do not really exist in the text (e.g., ">" displayed when a double-wide character doesn't fit at the end of the line). See also |hl-EndOfBuffer|. - Normal = { fg = cp.white, bg = cnf.transparent_background and cp.none or cp.black2 }, -- normal text - NormalNC = { fg = cp.white, bg = cnf.transparent_background and cp.none or cp.black2 }, -- normal text in non-current windows - NormalSB = { fg = cp.white, bg = cp.black0 }, -- normal text in non-current windows - NormalFloat = { fg = cp.white, bg = cp.black1 }, -- Normal text in floating windows. + NonText = { fg = cp.overlay0 }, -- '@' at the end of the window, characters from 'showbreak' and other characters that do not really exist in the text (e.g., ">" displayed when a double-wide character doesn't fit at the end of the line). See also |hl-EndOfBuffer|. + Normal = { fg = cp.text, bg = cnf.transparent_background and cp.none or cp.base2 }, -- normal text + NormalNC = { fg = cp.text, bg = cnf.transparent_background and cp.none or cp.base2 }, -- normal text in non-current windows + NormalSB = { fg = cp.text, bg = cp.base0 }, -- normal text in non-current windows + NormalFloat = { fg = cp.text, bg = cp.base1 }, -- Normal text in floating windows. FloatBorder = { fg = cp.blue }, - Pmenu = { bg = cp.black3, fg = cp.gray2 }, -- Popup menu: normal item. - PmenuSel = { fg = cp.white, bg = cp.black4, style = "bold" }, -- Popup menu: selected item. - PmenuSbar = { bg = cp.black4 }, -- Popup menu: scrollbar. - PmenuThumb = { bg = cp.gray0 }, -- Popup menu: Thumb of the scrollbar. + Pmenu = { bg = cp.surface0, fg = cp.overlay2 }, -- Popup menu: normal item. + PmenuSel = { fg = cp.text, bg = cp.surface1, style = "bold" }, -- Popup menu: selected item. + PmenuSbar = { bg = cp.surface1 }, -- Popup menu: scrollbar. + PmenuThumb = { bg = cp.overlay0 }, -- Popup menu: Thumb of the scrollbar. Question = { fg = cp.blue }, -- |hit-enter| prompt and yes/no questions - QuickFixLine = { bg = cp.black4, style = "bold" }, -- Current |quickfix| item in the quickfix window. Combined with |hl-CursorLine| when the cursor is there. - Search = { bg = cp.black4, fg = cp.pink, style = "bold" }, -- Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand oucp. - IncSearch = { bg = cp.pink, fg = cp.black4 }, -- 'incsearch' highlighting; also used for the text replaced with ":s///c" - SpecialKey = { fg = cp.white }, -- Unprintable characters: text displayed differently from what it really is. But not 'listchars' whitespace. |hl-Whitespace| + QuickFixLine = { bg = cp.surface1, style = "bold" }, -- Current |quickfix| item in the quickfix window. Combined with |hl-CursorLine| when the cursor is there. + Search = { bg = cp.surface1, fg = cp.pink, style = "bold" }, -- Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand oucp. + IncSearch = { bg = cp.pink, fg = cp.surface1 }, -- 'incsearch' highlighting; also used for the text replaced with ":s///c" + SpecialKey = { fg = cp.text }, -- Unprintable characters: text displayed differently from what it really is. But not 'listchars' textspace. |hl-Whitespace| SpellBad = { sp = cp.red, style = "undercurl" }, -- Word that is not recognized by the spellchecker. |spell| Combined with the highlighting used otherwise. SpellCap = { sp = cp.yellow, style = "undercurl" }, -- Word that should start with a capital. |spell| Combined with the highlighting used otherwise. SpellLocal = { sp = cp.blue, style = "undercurl" }, -- Word that is recognized by the spellchecker as one that is used in another region. |spell| Combined with the highlighting used otherwise. SpellRare = { sp = cp.green, style = "undercurl" }, -- Word that is recognized by the spellchecker as one that is hardly ever used. |spell| Combined with the highlighting used otherwise. - StatusLine = { fg = cp.white, bg = cp.black1 }, -- status line of current window - StatusLineNC = { fg = cp.black4, bg = cp.black1 }, -- status lines of not-current windows Note: if this is equal to "StatusLine" Vim will use "^^^" in the status line of the current window. - TabLine = { bg = cp.black1, fg = cp.black4 }, -- tab pages line, not active tab page label + StatusLine = { fg = cp.text, bg = cp.base1 }, -- status line of current window + StatusLineNC = { fg = cp.surface1, bg = cp.base1 }, -- status lines of not-current windows Note: if this is equal to "StatusLine" Vim will use "^^^" in the status line of the current window. + TabLine = { bg = cp.base1, fg = cp.surface1 }, -- tab pages line, not active tab page label TabLineFill = { bg = cp.black }, -- tab pages line, where there are no labels - TabLineSel = { fg = cp.green, bg = cp.black4 }, -- tab pages line, active tab page label + TabLineSel = { fg = cp.green, bg = cp.surface1 }, -- tab pages line, active tab page label Title = { fg = cp.blue, style = "bold" }, -- titles for output from ":set all", ":autocmd" etcp. - Visual = { bg = cp.black4, style = "bold" }, -- Visual mode selection - VisualNOS = { bg = cp.black4, style = "bold" }, -- Visual mode selection when vim is "Not Owning the Selection". + Visual = { bg = cp.surface1, style = "bold" }, -- Visual mode selection + VisualNOS = { bg = cp.surface1, style = "bold" }, -- Visual mode selection when vim is "Not Owning the Selection". WarningMsg = { fg = cp.yellow }, -- warning messages - Whitespace = { fg = cp.black4 }, -- "nbsp", "space", "tab" and "trail" in 'listchars' - WildMenu = { bg = cp.gray0 }, -- current match in 'wildmenu' completion + Whitespace = { fg = cp.surface1 }, -- "nbsp", "space", "tab" and "trail" in 'listchars' + WildMenu = { bg = cp.overlay0 }, -- current match in 'wildmenu' completion -- These groups are not listed as default vim groups, -- but they are defacto standard group names for syntax highlighting. - -- gray0ed out groups should chain up to their "preferred" group by + -- overlay0ed out groups should chain up to their "preferred" group by -- default, - -- Ungray0 and edit if you want more specific syntax highlighting. + -- Unoverlay0 and edit if you want more specific syntax highlighting. -- code itself @@ -113,7 +113,7 @@ local function get_base() -- SpecialChar = { }, -- special character in a constant -- Tag = { }, -- you can use CTRL-] on this -- Delimiter = { }, -- character that needs attention - -- Specialgray0= { }, -- special things inside a gray0 + -- Specialoverlay0= { }, -- special things inside a overlay0 -- Debug = { }, -- debugging statements Underlined = { style = "underline" }, -- (preferred) text that stands out, HTML links @@ -123,24 +123,24 @@ local function get_base() -- Ignore = { }, -- (preferred) left blank, hidden |hl-Ignore| Error = { fg = cp.red }, -- (preferred) any erroneous construct - Todo = { bg = cp.yellow, fg = cp.black2, style = "bold" }, -- (preferred) anything that needs extra attention; mostly the keywords TODO FIXME and XXX + Todo = { bg = cp.yellow, fg = cp.base2, style = "bold" }, -- (preferred) anything that needs extra attention; mostly the keywords TODO FIXME and XXX qfLineNr = { fg = cp.yellow }, qfFileName = { fg = cp.blue }, htmlH1 = { fg = cp.pink, style = "bold" }, htmlH2 = { fg = cp.blue, style = "bold" }, -- mkdHeading = { fg = cp.peach, style = "bold" }, - -- mkdCode = { bg = cp.terminal_black, fg = cp.white }, - mkdCodeDelimiter = { bg = cp.black2, fg = cp.white }, + -- mkdCode = { bg = cp.terminal_black, fg = cp.text }, + mkdCodeDelimiter = { bg = cp.base2, fg = cp.text }, mkdCodeStart = { fg = cp.flamingo, style = "bold" }, mkdCodeEnd = { fg = cp.flamingo, style = "bold" }, -- mkdLink = { fg = cp.blue, style = "underline" }, -- debugging - debugPC = { bg = cp.black0 }, -- used for highlighting the current line in terminal-debug - debugBreakpoint = { bg = cp.black2, fg = cp.gray0 }, -- used for breakpoint colors in terminal-debug + debugPC = { bg = cp.base0 }, -- used for highlighting the current line in terminal-debug + debugBreakpoint = { bg = cp.base2, fg = cp.overlay0 }, -- used for breakpoint colors in terminal-debug -- illuminate - illuminatedWord = { bg = cp.black4 }, - illuminatedCurWord = { bg = cp.black4 }, + illuminatedWord = { bg = cp.surface1 }, + illuminatedCurWord = { bg = cp.surface1 }, -- diff diffAdded = { fg = cp.green }, diffRemoved = { fg = cp.red }, @@ -148,12 +148,12 @@ local function get_base() diffOldFile = { fg = cp.yellow }, diffNewFile = { fg = cp.peach }, diffFile = { fg = cp.blue }, - diffLine = { fg = cp.gray0 }, + diffLine = { fg = cp.overlay0 }, diffIndexLine = { fg = cp.pink }, - DiffAdd = { fg = cp.green, bg = cp.black2 }, -- diff mode: Added line |diff.txt| - DiffChange = { fg = cp.yellow, bg = cp.black2 }, -- diff mode: Changed line |diff.txt| - DiffDelete = { fg = cp.red, bg = cp.black2 }, -- diff mode: Deleted line |diff.txt| - DiffText = { fg = cp.blue, bg = cp.black2 }, -- diff mode: Changed text within a changed line |diff.txt| + DiffAdd = { fg = cp.green, bg = cp.base2 }, -- diff mode: Added line |diff.txt| + DiffChange = { fg = cp.yellow, bg = cp.base2 }, -- diff mode: Changed line |diff.txt| + DiffDelete = { fg = cp.red, bg = cp.base2 }, -- diff mode: Deleted line |diff.txt| + DiffText = { fg = cp.blue, bg = cp.base2 }, -- diff mode: Changed text within a changed line |diff.txt| -- NeoVim healthError = { fg = cp.red }, healthSuccess = { fg = cp.teal }, @@ -166,7 +166,7 @@ local function get_base() GlyphPalette3 = { fg = cp.yellow }, GlyphPalette4 = { fg = cp.blue }, GlyphPalette6 = { fg = cp.teal }, - GlyphPalette7 = { fg = cp.white }, + GlyphPalette7 = { fg = cp.text }, GlyphPalette9 = { fg = cp.red }, } end diff --git a/lua/catppuccin/core/palettes/frappe.lua b/lua/catppuccin/core/palettes/frappe.lua index d5d82c6..5d24b9c 100644 --- a/lua/catppuccin/core/palettes/frappe.lua +++ b/lua/catppuccin/core/palettes/frappe.lua @@ -1,28 +1,33 @@ +-- NOTE: references for Catppuccin Frappé +-- monochromatic: https://coolors.co/c6ceef-b1b8d7-9ba2bf-868ca7-707590-5b5f78-454960-303348-252737-181a25 +-- analogous 1: https://coolors.co/f2d5cf-eebebe-f4b8e4-ca9ee6-ea999c-e78284-ef9f76 +-- analogous 2: https://coolors.co/bfb7e4-8caaee-99d1db-e5c890-85c1dc-a6d189-81c8be + local color_palette = { - rosewater = "#F5E0DC", -- not ready - flamingo = "#F2CDCD", - pink = "#F5C2E7", - mauve = "#CA9EE6", -- g + - red = "#E78284", -- g +? - maroon = "#EA999C", -- g - peach = "#EE9E76", -- g + - yellow = "#E5C890", -- g + - green = "#A6D189", -- g + - teal = "#81C8BE", -- g + - sky = "#99D1DB", -- g? + - blue = "#8CAAEE", -- g +? - sapphire = "#85C1DC", -- gotta tweak this one - lavender = "#BFB7E4", -- g - white = "#C6CEEF", -- g - gray2 = "#B1B8D7", - gray1 = "#9BA2BF", - gray0 = "#868CA7", - black5 = "#707590", - black4 = "#5B5F78", -- - black3 = "#454960", -- - black2 = "#303348", -- - black1 = "#252737", - black0 = "#181A25", + rosewater = "#F2D5CF", + flamingo = "#EEBEBE", + pink = "#F4B8E4", + mauve = "#CA9EE6", + red = "#E78284", + maroon = "#EA999C", + peach = "#EF9F76", + yellow = "#E5C890", + green = "#A6D189", + teal = "#81C8BE", + sky = "#99D1DB", + blue = "#8CAAEE", + sapphire = "#85C1DC", + lavender = "#BFB7E4", + text = "#C6CEEF", + overlay2 = "#B1B8D7", + overlay1 = "#9BA2BF", + overlay0 = "#868CA7", + surface2 = "#707590", + surface1 = "#5B5F78", + surface0 = "#454960", + base2 = "#303348", + base1 = "#252737", + base0 = "#181A25", } return color_palette diff --git a/lua/catppuccin/core/palettes/latte.lua b/lua/catppuccin/core/palettes/latte.lua index 59b1635..aa81dc7 100644 --- a/lua/catppuccin/core/palettes/latte.lua +++ b/lua/catppuccin/core/palettes/latte.lua @@ -1,30 +1,33 @@ +-- NOTE: references for Catppuccin Latte +-- monochromatic: https://coolors.co/fbf8f4-e9e6e6-d7d3d9-c4c1cb-b2aebd-a09cb0-8e89a2-7b7794-696487-575279 +-- analogous 1: https://coolors.co/de9584-dd7878-ec83d0-822fee-e64553-bb0d33-fe640b +-- analogous 2: https://coolors.co/7287fd-2a6ef5-04a5e5-e49320-209fb5-40a02b-179299 + local color_palette = { - rosewater = "#DC907F", + rosewater = "#DE9584", flamingo = "#DD7878", pink = "#EC83D0", - mauve = "#9247ED", -- - red = "#BB0D33", - maroon = "#E63B4A", + mauve = "#8839EF", + red = "#D20F39", + maroon = "#E64553", peach = "#FE640B", yellow = "#E49320", - green = "#53A947", -- - teal = "#23979F", + green = "#40A02B", + teal = "#179299", sky = "#04A5E5", - blue = "#3474EE", + blue = "#2A6EF5", sapphire = "#209FB5", lavender = "#7287FD", - white = "#575279", - gray2 = "#696486", - gray1 = "#7B7794", - gray0 = "#8E89A1", - black5 = "#A09BAE", - black4 = "#B2AEBC", - black0 = "#C4C0C9", - black3 = "#D7D2D6", - black1 = "#E9E5E4", - black2 = "#FBF7F1", + text = "#575279", + overlay2 = "#696487", + overlay1 = "#7B7794", + overlay0 = "#8E89A2", + surface2 = "#A09BAF", + surface1 = "#B2AEBD", + base0 = "#C4C0CA", + surface0 = "#D7D2D8", + base1 = "#E9E5E5", + base2 = "#FBF7F3", } - - return color_palette diff --git a/lua/catppuccin/core/palettes/macchiato.lua b/lua/catppuccin/core/palettes/macchiato.lua index 5241ef1..408da7f 100644 --- a/lua/catppuccin/core/palettes/macchiato.lua +++ b/lua/catppuccin/core/palettes/macchiato.lua @@ -1,28 +1,33 @@ +-- NOTE: references for Catppuccin Macchiato +-- monochromatic: https://coolors.co/c5cff5-aeb7da-979fc0-8087a5-696f8a-52576f-3b3f55-24273a-181926-0c0d13 +-- analogous 1: https://coolors.co/f4dbd6-f0c6c6-f5bde6-c6a0f6-ee99a0-ed8796-f5a97f +-- analogous 2: https://coolors.co/bfb7e4-8caaee-99d1db-e5c890-85c1dc-a6d189-81c8be + local color_palette = { - rosewater = "#F5DFDA", - flamingo = "#F2CBCB", - pink = "#F5BFE7", - mauve = "#C59FF6", - red = "#F67E98", - maroon = "#F1949B", - peach = "#FEA571", - yellow = "#F1D8A4", - green = "#A1DF8E", - teal = "#85E0D1", - sky = "#89DCFD", - blue = "#83ABF9", - sapphire = "#34C3DC", - lavender = "#B8C1FE", - white = "#C5CFF5", - gray2 = "#AEB7DA", - gray1 = "#979FC0", - gray0 = "#8087A5", - black5 = "#696F8A", - black4 = "#52576F", - black3 = "#3B3F55", - black2 = "#24273A", - black1 = "#1F2232", - black0 = "#181926", + rosewater = "#F4DBD6", + flamingo = "#F0C6C6", + pink = "#F5BDE6", + mauve = "#C6A0F6", + red = "#ED8796", + maroon = "#EE99A0", + peach = "#F5A97F", + yellow = "#EED49F", + green = "#A6DA95", + teal = "#8BD5CA", + sky = "#91D7E3", + blue = "#86AEF8", + sapphire = "#7DC4E4", + lavender = "#B9BEF8", + text = "#C5CFF5", + overlay2 = "#AEB7DA", + overlay1 = "#979FC0", + overlay0 = "#8087A5", + surface2 = "#696F8A", + surface1 = "#52576F", + surface0 = "#3B3F55", + base2 = "#24273A", + base1 = "#181926", + base0 = "#0C0D13", } return color_palette diff --git a/lua/catppuccin/core/palettes/moccha.lua b/lua/catppuccin/core/palettes/moccha.lua index 4f1e92d..97f6265 100644 --- a/lua/catppuccin/core/palettes/moccha.lua +++ b/lua/catppuccin/core/palettes/moccha.lua @@ -1,3 +1,8 @@ +-- NOTE: references for Catppuccin Moccha +-- monochromatic: https://coolors.co/c6d0f5-aeb7d9-969dbc-7e84a0-666a83-4e5167-36374a-1e1e2e-12121c-07070a +-- analogous 1: https://coolors.co/f5e0dc-f2cdcd-f5c2e7-cba6f7-eba0ac-f38ba8-fab387 +-- analogous 2: https://coolors.co/bfb7e4-8caaee-99d1db-e5c890-85c1dc-a6d189-81c8be + local color_palette = { rosewater = "#F5E0DC", flamingo = "#F2CDCD", @@ -13,16 +18,16 @@ local color_palette = { blue = "#90C1FB", sapphire = "#74C7EC", lavender = "#B4BEFE", - white = "#C6D0F5", - gray2 = "#AEB7D9", - gray1 = "#969DBC", - gray0 = "#7E84A0", - black5 = "#666A83", - black4 = "#4E5167", - black3 = "#36374A", - black2 = "#1E1E2E", - black1 = "#181825", - black0 = "#101019", + text = "#C6D0F5", + overlay2 = "#AEB7D9", + overlay1 = "#969DBC", + overlay0 = "#7E84A0", + surface2 = "#666A83", + surface1 = "#4E5167", + surface0 = "#36374A", + base2 = "#1E1E2E", + base1 = "#12121C", + base0 = "#07070A", } return color_palette diff --git a/lua/catppuccin/main.lua b/lua/catppuccin/main.lua index ded0cde..97286ef 100644 --- a/lua/catppuccin/main.lua +++ b/lua/catppuccin/main.lua @@ -1,6 +1,11 @@ local M = {} local utils = require("catppuccin.utils.util") +local flavours = {"latte", "frappe", "macchiato", "moccha"} + +function M.cli_flavour_completion() + return vim.tbl_keys(require("catppuccin.utils.data").set_of(flavours)) +end local function load() local catppuccin = require("catppuccin") @@ -18,17 +23,11 @@ local function load() end end -local function clear() - vim.cmd("hi clear") -end - function M.main(option) option = option or "load" if option == "load" then load() - elseif option == "clear" then - clear() else print("catppuccin: option was not recognized") end diff --git a/lua/catppuccin/utils/colors.lua b/lua/catppuccin/utils/colors.lua index 8d894d7..4d53851 100644 --- a/lua/catppuccin/utils/colors.lua +++ b/lua/catppuccin/utils/colors.lua @@ -6,7 +6,7 @@ local function color_is_bright(r, g, b) if luminance > 0.5 then return true -- Bright colors, black font else - return false -- Dark colors, white font + return false -- Dark colors, text font end end diff --git a/lua/catppuccin/utils/data.lua b/lua/catppuccin/utils/data.lua new file mode 100644 index 0000000..241f04f --- /dev/null +++ b/lua/catppuccin/utils/data.lua @@ -0,0 +1,11 @@ +local M = {} + +function M.set_of(list) + local set = {} + for i = 1, #list do + set[list[i]] = true + end + return set +end + +return M diff --git a/lua/catppuccin/utils/util.lua b/lua/catppuccin/utils/util.lua index 27390fa..073a60f 100644 --- a/lua/catppuccin/utils/util.lua +++ b/lua/catppuccin/utils/util.lua @@ -78,7 +78,7 @@ function util.string_to_color(colors, value, default) return value end - local acceptable_colors = { "black", "red", "green", "blue", "magenta", "cyan", "white", "orange", "pink" } + local acceptable_colors = { "black", "red", "green", "blue", "magenta", "cyan", "text", "orange", "pink" } for _, ac in ipairs(acceptable_colors) do if string.match(value, ac) then return colors[value] @@ -117,8 +117,8 @@ function util.properties(tbl) end function util.terminal(cp) - g.terminal_color_0 = cp.gray0 - g.terminal_color_8 = cp.gray1 + g.terminal_color_0 = cp.overlay0 + g.terminal_color_8 = cp.overlay1 g.terminal_color_1 = cp.red g.terminal_color_9 = cp.red @@ -138,8 +138,8 @@ function util.terminal(cp) g.terminal_color_6 = cp.sky g.terminal_color_14 = cp.sky - g.terminal_color_7 = cp.white - g.terminal_color_15 = cp.white + g.terminal_color_7 = cp.text + g.terminal_color_15 = cp.text end function util.load(theme) diff --git a/lua/lightline/colorscheme/catppuccin.lua b/lua/lightline/colorscheme/catppuccin.lua index 49a413f..0c35a64 100644 --- a/lua/lightline/colorscheme/catppuccin.lua +++ b/lua/lightline/colorscheme/catppuccin.lua @@ -2,36 +2,36 @@ local cp = require("catppuccin.core.color_palette") local catppuccin = {} catppuccin.normal = { - left = { { cp.black1, cp.blue }, { cp.blue, cp.black2 } }, - middle = { { cp.blue, cp.black4 } }, - right = { { cp.gray0, cp.black2 }, { cp.blue, cp.black3 } }, - error = { { cp.black1, cp.red } }, - warning = { { cp.black1, cp.yellow } }, + left = { { cp.base1, cp.blue }, { cp.blue, cp.base2 } }, + middle = { { cp.blue, cp.surface1 } }, + right = { { cp.overlay0, cp.base2 }, { cp.blue, cp.surface0 } }, + error = { { cp.base1, cp.red } }, + warning = { { cp.base1, cp.yellow } }, } catppuccin.insert = { - left = { { cp.black1, cp.teal }, { cp.blue, cp.black2 } }, + left = { { cp.base1, cp.teal }, { cp.blue, cp.base2 } }, } catppuccin.visual = { - left = { { cp.black1, cp.mauve }, { cp.blue, cp.black2 } }, + left = { { cp.base1, cp.mauve }, { cp.blue, cp.base2 } }, } catppuccin.replace = { - left = { { cp.black1, cp.red }, { cp.blue, cp.black2 } }, + left = { { cp.base1, cp.red }, { cp.blue, cp.base2 } }, } catppuccin.inactive = { - left = { { cp.blue, cp.black2 }, { cp.gray0, cp.black2 } }, - middle = { { cp.black4, cp.black2 } }, - right = { { cp.black4, cp.black2 }, { cp.gray0, cp.black2 } }, + left = { { cp.blue, cp.base2 }, { cp.overlay0, cp.base2 } }, + middle = { { cp.surface1, cp.base2 } }, + right = { { cp.surface1, cp.base2 }, { cp.overlay0, cp.base2 } }, } catppuccin.tabline = { - left = { { cp.gray0, cp.black2 }, { cp.gray0, cp.black2 } }, - middle = { { cp.black4, cp.black2 } }, - right = { { cp.black4, cp.black2 }, { cp.gray0, cp.black2 } }, - tabsel = { { cp.blue, cp.black4 }, { cp.gray0, cp.black2 } }, + left = { { cp.overlay0, cp.base2 }, { cp.overlay0, cp.base2 } }, + middle = { { cp.surface1, cp.base2 } }, + right = { { cp.surface1, cp.base2 }, { cp.overlay0, cp.base2 } }, + tabsel = { { cp.blue, cp.surface1 }, { cp.overlay0, cp.base2 } }, } return catppuccin diff --git a/lua/lualine/themes/catppuccin.lua b/lua/lualine/themes/catppuccin.lua index 5dff200..a7a2d26 100644 --- a/lua/lualine/themes/catppuccin.lua +++ b/lua/lualine/themes/catppuccin.lua @@ -2,35 +2,35 @@ local cp = require("catppuccin.core.color_palette") local catppuccin = {} catppuccin.normal = { - a = { bg = cp.blue, fg = cp.black1, gui = "bold" }, - b = { bg = cp.black4, fg = cp.blue }, - c = { bg = cp.black1, fg = cp.white }, + a = { bg = cp.blue, fg = cp.base1, gui = "bold" }, + b = { bg = cp.surface1, fg = cp.blue }, + c = { bg = cp.base1, fg = cp.text }, } catppuccin.insert = { - a = { bg = cp.green, fg = cp.black2, gui = "bold" }, - b = { bg = cp.black4, fg = cp.teal }, + a = { bg = cp.green, fg = cp.base2, gui = "bold" }, + b = { bg = cp.surface1, fg = cp.teal }, } catppuccin.command = { - a = { bg = cp.peach, fg = cp.black2, gui = "bold" }, - b = { bg = cp.black4, fg = cp.peach }, + a = { bg = cp.peach, fg = cp.base2, gui = "bold" }, + b = { bg = cp.surface1, fg = cp.peach }, } catppuccin.visual = { - a = { bg = cp.mauve, fg = cp.black2, gui = "bold" }, - b = { bg = cp.black4, fg = cp.mauve }, + a = { bg = cp.mauve, fg = cp.base2, gui = "bold" }, + b = { bg = cp.surface1, fg = cp.mauve }, } catppuccin.replace = { - a = { bg = cp.red, fg = cp.black2, gui = "bold" }, - b = { bg = cp.black4, fg = cp.red }, + a = { bg = cp.red, fg = cp.base2, gui = "bold" }, + b = { bg = cp.surface1, fg = cp.red }, } catppuccin.inactive = { - a = { bg = cp.black1, fg = cp.blue }, - b = { bg = cp.black1, fg = cp.black4, gui = "bold" }, - c = { bg = cp.black1, fg = cp.gray0 }, + a = { bg = cp.base1, fg = cp.blue }, + b = { bg = cp.base1, fg = cp.surface1, gui = "bold" }, + c = { bg = cp.base1, fg = cp.overlay0 }, } return catppuccin diff --git a/plugin/catppuccin.vim b/plugin/catppuccin.vim new file mode 100644 index 0000000..4951cd1 --- /dev/null +++ b/plugin/catppuccin.vim @@ -0,0 +1,15 @@ +if exists('g:loaded_catppuccin') | finish | endif + +function! s:FlavourCompletion(...) abort + return join(sort(luaeval("require'catppuccin.main'.cli_flavour_completion()")), "\n") +endfunction + +function! s:ApplyFlavour(args) abort + let l:flavour = matchstr(a:args[0], "[a-z]*") + let g:catppuccin_flavour = flavour + colorscheme catppuccin +endfunction + +command! -nargs=1 -complete=custom,s:FlavourCompletion Catppuccin call s:ApplyFlavour([]) + +let g:loaded_catppuccin = 1