diff --git a/lua/catppuccino/core/integrations/native_lsp.lua b/lua/catppuccino/core/integrations/native_lsp.lua index e69de29..86b8085 100644 --- a/lua/catppuccino/core/integrations/native_lsp.lua +++ b/lua/catppuccino/core/integrations/native_lsp.lua @@ -0,0 +1,31 @@ +return { + -- These groups are for the native LSP cliencpt. Some other LSP clients may + -- use these groups, or use their own. Consult your LSP client's + -- documentation. + LspReferenceText = {bg = cpt.fg_gutter}, -- used for highlighting "text" references + LspReferenceRead = {bg = cpt.fg_gutter}, -- used for highlighting "read" references + LspReferenceWrite = {bg = cpt.fg_gutter}, -- used for highlighting "write" references + -- hightlight diagnostics in numberline + LspDiagnosticsDefaultError = {fg = cpt.error}, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline) + LspDiagnosticsDefaultWarning = {fg = cpt.warning}, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline) + LspDiagnosticsDefaultInformation = {fg = cpt.info}, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline) + LspDiagnosticsDefaultHint = {fg = cpt.hint}, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline) + LspSignatureActiveParameter = {fg = cpt.orange}, + -- LspDiagnosticsFloatingError = { }, -- Used to color "Error" diagnostic messages in diagnostics float + -- LspDiagnosticsFloatingWarning = { }, -- Used to color "Warning" diagnostic messages in diagnostics float + -- LspDiagnosticsFloatingInformation = { }, -- Used to color "Information" diagnostic messages in diagnostics float + -- LspDiagnosticsFloatingHint = { }, -- Used to color "Hint" diagnostic messages in diagnostics float + + LspDiagnosticsError = {fg = cpt.error}, + LspDiagnosticsWarning = {fg = cpt.warning}, + LspDiagnosticsInformation = {fg = cpt.info}, + LspDiagnosticsHint = {fg = cpt.hint}, + LspDiagnosticsVirtualTextError = {fg = cpt.error, style = cpc.integrations.native_lsp.styles.errors}, -- Used for "Error" diagnostic virtual text + LspDiagnosticsVirtualTextWarning = {fg = cpt.warning, style = cpc.integrations.native_lsp.styles.warnings}, -- Used for "Warning" diagnostic virtual text + LspDiagnosticsVirtualTextInformation = {fg = cpt.info, style = cpc.integrations.native_lsp.styles.information}, -- Used for "Information" diagnostic virtual text + LspDiagnosticsVirtualTextHint = {fg = cpt.hint, style = cpc.integrations.native_lsp.styles.hints}, -- Used for "Hint" diagnostic virtual text + LspDiagnosticsUnderlineError = {style = "underline", sp = cpt.error}, -- Used to underline "Error" diagnostics + LspDiagnosticsUnderlineWarning = {style = "underline", sp = cpt.warning}, -- Used to underline "Warning" diagnostics + LspDiagnosticsUnderlineInformation = {style = "underline", sp = cpt.info}, -- Used to underline "Information" diagnostics + LspDiagnosticsUnderlineHint = {style = "underline", sp = cpt.hint} -- Used to underline "Hint" diagnostics +} diff --git a/lua/catppuccino/core/integrations/treesitter.lua b/lua/catppuccino/core/integrations/treesitter.lua index e69de29..c71141a 100644 --- a/lua/catppuccino/core/integrations/treesitter.lua +++ b/lua/catppuccino/core/integrations/treesitter.lua @@ -0,0 +1,66 @@ +local util = require("catppuccino.utils.util") + +return { + -- These groups are for the neovim tree-sitter highlights. + -- As of writing, tree-sitter support is a WIP, group names may change. + -- By default, most of these groups link to an appropriate Vim group, + -- TSError -> Error for example, so you do not have to define these unless + -- you explicitly want to support Treesitter's improved syntax awareness. + + -- TSAnnotation = { }; -- For C++/Dart attributes, annotations that can be attached to the code to denote some kind of meta information. + -- TSAttribute = { }; -- (unstable) TODO: docs + -- TSBoolean = { }; -- For booleans. + -- TSCharacter = { }; -- For characters. + -- TSComment = { }; -- For comment blocks. + TSNote = {fg = cpt.bg, bg = cpt.info}, + TSWarning = {fg = cpt.bg, bg = cpt.warning}, + TSDanger = {fg = cpt.bg, bg = cpt.error}, + TSConstructor = {fg = cpt.magenta}, -- For constructor calls and definitions: `= { }` in Lua, and Java constructors. + -- TSConditional = { }; -- For keywords related to conditionnals. + TSConstant = {fg = cpt.orange}, -- For constants + TSConstBuiltin = {fg = cpt.orange_br}, -- For constant that are built in the language: `nil` in Lua. + -- TSConstMacro = { }; -- For constants that are defined by macros: `NULL` in cpt. + -- TSError = { }; -- For syntax/parser errors. + -- TSException = { }; -- For exception related keywords. + TSField = {fg = cpt.red}, -- For fields. + rustTSField = {fg = util.darken(cpt.white, 0.75)}, -- For fields. + -- TSFloat = { }; -- For floats. + -- TSFunction = { fg = cpt.fg_gutter }, -- For function (calls and definitions). + TSFuncBuiltin = {fg = cpt.cyan}, -- For builtin functions: `table.insert` in Lua. + TSFuncMacro = {fg = cpt.red}, -- For macro defined fuctions (calls and definitions): each `macro_rules` in Ruscpt. + -- TSInclude = { }; -- For includes: `#include` in C, `use` or `extern crate` in Rust, or `require` in Lua. + TSKeyword = {fg = cpt.magenta, style = cpc.styles.keywords}, -- For keywords that don't fall in previous categories. + TSKeywordFunction = {fg = cpt.magenta, style = cpc.styles.fuctions}, -- For keywords used to define a fuction. + TSLabel = {fg = cpt.blue}, -- For labels: `label:` in C and `:label:` in Lua. + -- TSMethod = { }; -- For method calls and definitions. + TSNamespace = {fg = cpt.cyan}, -- For identifiers referring to modules and namespaces. + -- TSNone = { }; -- TODO: docs + -- TSNumber = { }; -- For all numbers + TSOperator = {fg = cpt.fg_alt}, -- For any operator: `+`, but also `->` and `*` in cpt. + TSParameter = {fg = cpt.orange_br}, -- For parameters of a function. + -- TSParameterReference= { }; -- For references to parameters of a function. + TSProperty = {fg = cpt.red_bg}, -- Same as `TSField`. + tomlTSProperty = {fg = cpt.blue}, -- Differentiates between string and properties + TSPunctDelimiter = {fg = util.string_to_color(cpt, "", cpt.fg_alt)}, -- For delimiters ie: `.` + TSPunctBracket = {fg = cpt.red}, -- For brackets and parenthesis. + TSPunctSpecial = {fg = cpt.white}, -- For special punctutation that does not fall in the catagories before. + -- TSRepeat = { }; -- For keywords related to loops. + -- TSString = { }; -- For strings. + TSStringRegex = {fg = cpt.blue, style = cpc.styles.strings}, -- For regexes. + TSStringEscape = {fg = cpt.magenta, style = cpc.styles.strings}, -- For escape characters within a string. + -- TSSymbol = { }; -- For identifiers referring to symbols or atoms. + -- TSType = { }; -- For types. + TSTypeBuiltin = {fg = cpt.cyan}, -- For builtin types. + TSVariable = {style = cpc.styles.variables}, -- Any variable name that does not have another highlighcpt. + TSVariableBuiltin = {fg = cpt.red}, -- Variable names that are defined by the languages, like `this` or `self`. + -- TSTag = { }; -- Tags like html tag names. + -- TSTagDelimiter = { }; -- Tag delimiter like `<` `>` `/` + -- TSText = { }; -- For strings considered text in a markup language. + TSTextReference = {fg = cpt.cyan} + -- TSEmphasis = { }; -- For text to be represented with emphasis. + -- TSUnderline = { }; -- For text to be represented with an underline. + -- TSStrike = { }; -- For strikethrough texcpt. + -- TSTitle = { }; -- Text that is part of a title. + -- TSLiteral = { }; -- Literal texcpt. + -- TSURI = { }; -- Any URI like a link or email. +} diff --git a/lua/catppuccino/core/mapper.lua b/lua/catppuccino/core/mapper.lua index 113bef4..bc418af 100644 --- a/lua/catppuccino/core/mapper.lua +++ b/lua/catppuccino/core/mapper.lua @@ -130,107 +130,13 @@ local function get_base() markdownLinkText = {fg = cpt.blue, style = "underline"}, debugPC = {bg = cpt.bg_sidebar}, -- used for highlighting the current line in terminal-debug debugBreakpoint = {bg = util.darken(cpt.info, 0.1), fg = cpt.info}, -- used for breakpoint colors in terminal-debug - -- These groups are for the native LSP cliencpt. Some other LSP clients may - -- use these groups, or use their own. Consult your LSP client's - -- documentation. - LspReferenceText = {bg = cpt.fg_gutter}, -- used for highlighting "text" references - LspReferenceRead = {bg = cpt.fg_gutter}, -- used for highlighting "read" references - LspReferenceWrite = {bg = cpt.fg_gutter}, -- used for highlighting "write" references - -- hightlight diagnostics in numberline - LspDiagnosticsDefaultError = {fg = cpt.error}, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline) - LspDiagnosticsDefaultWarning = {fg = cpt.warning}, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline) - LspDiagnosticsDefaultInformation = {fg = cpt.info}, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline) - LspDiagnosticsDefaultHint = {fg = cpt.hint}, -- Used as the base highlight group. Other LspDiagnostic highlights link to this by default (except Underline) - LspSignatureActiveParameter = {fg = cpt.orange}, - - -- LspDiagnosticsFloatingError = { }, -- Used to color "Error" diagnostic messages in diagnostics float - -- LspDiagnosticsFloatingWarning = { }, -- Used to color "Warning" diagnostic messages in diagnostics float - -- LspDiagnosticsFloatingInformation = { }, -- Used to color "Information" diagnostic messages in diagnostics float - -- LspDiagnosticsFloatingHint = { }, -- Used to color "Hint" diagnostic messages in diagnostics float - - LspDiagnosticsError = {fg = cpt.error}, - LspDiagnosticsWarning = {fg = cpt.warning}, - LspDiagnosticsInformation = {fg = cpt.info}, - LspDiagnosticsHint = {fg = cpt.hint}, - - LspDiagnosticsVirtualTextError = {fg = cpt.error, style = cpc.integrations.native_lsp.styles.errors}, -- Used for "Error" diagnostic virtual text - LspDiagnosticsVirtualTextWarning = {fg = cpt.warning, style = cpc.integrations.native_lsp.styles.warnings}, -- Used for "Warning" diagnostic virtual text - LspDiagnosticsVirtualTextInformation = {fg = cpt.info, style = cpc.integrations.native_lsp.styles.information}, -- Used for "Information" diagnostic virtual text - LspDiagnosticsVirtualTextHint = {fg = cpt.hint, style = cpc.integrations.native_lsp.styles.hints}, -- Used for "Hint" diagnostic virtual text - - LspDiagnosticsUnderlineError = {style = "underline", sp = cpt.error}, -- Used to underline "Error" diagnostics - LspDiagnosticsUnderlineWarning = {style = "underline", sp = cpt.warning}, -- Used to underline "Warning" diagnostics - LspDiagnosticsUnderlineInformation = {style = "underline", sp = cpt.info}, -- Used to underline "Information" diagnostics - LspDiagnosticsUnderlineHint = {style = "underline", sp = cpt.hint}, -- Used to underline "Hint" diagnostics - - -- These groups are for the neovim tree-sitter highlights. - -- As of writing, tree-sitter support is a WIP, group names may change. - -- By default, most of these groups link to an appropriate Vim group, - -- TSError -> Error for example, so you do not have to define these unless - -- you explicitly want to support Treesitter's improved syntax awareness. - - -- TSAnnotation = { }; -- For C++/Dart attributes, annotations that can be attached to the code to denote some kind of meta information. - -- TSAttribute = { }; -- (unstable) TODO: docs - -- TSBoolean = { }; -- For booleans. - -- TSCharacter = { }; -- For characters. - -- TSComment = { }; -- For comment blocks. - TSNote = {fg = cpt.bg, bg = cpt.info}, - TSWarning = {fg = cpt.bg, bg = cpt.warning}, - TSDanger = {fg = cpt.bg, bg = cpt.error}, - TSConstructor = {fg = cpt.magenta}, -- For constructor calls and definitions: `= { }` in Lua, and Java constructors. - -- TSConditional = { }; -- For keywords related to conditionnals. - TSConstant = {fg = cpt.orange}, -- For constants - TSConstBuiltin = {fg = cpt.orange_br}, -- For constant that are built in the language: `nil` in Lua. - -- TSConstMacro = { }; -- For constants that are defined by macros: `NULL` in cpt. - -- TSError = { }; -- For syntax/parser errors. - -- TSException = { }; -- For exception related keywords. - TSField = {fg = cpt.red}, -- For fields. - rustTSField = {fg = util.darken(cpt.white, 0.75)}, -- For fields. - -- TSFloat = { }; -- For floats. - -- TSFunction = { fg = cpt.fg_gutter }, -- For function (calls and definitions). - TSFuncBuiltin = {fg = cpt.cyan}, -- For builtin functions: `table.insert` in Lua. - TSFuncMacro = {fg = cpt.red}, -- For macro defined fuctions (calls and definitions): each `macro_rules` in Ruscpt. - -- TSInclude = { }; -- For includes: `#include` in C, `use` or `extern crate` in Rust, or `require` in Lua. - TSKeyword = {fg = cpt.magenta, style = cpc.styles.keywords}, -- For keywords that don't fall in previous categories. - TSKeywordFunction = {fg = cpt.magenta, style = cpc.styles.fuctions}, -- For keywords used to define a fuction. - TSLabel = {fg = cpt.blue}, -- For labels: `label:` in C and `:label:` in Lua. - -- TSMethod = { }; -- For method calls and definitions. - TSNamespace = {fg = cpt.cyan}, -- For identifiers referring to modules and namespaces. - -- TSNone = { }; -- TODO: docs - -- TSNumber = { }; -- For all numbers - TSOperator = {fg = cpt.fg_alt}, -- For any operator: `+`, but also `->` and `*` in cpt. - TSParameter = {fg = cpt.orange_br}, -- For parameters of a function. - -- TSParameterReference= { }; -- For references to parameters of a function. - TSProperty = {fg = cpt.red_bg}, -- Same as `TSField`. - tomlTSProperty = {fg = cpt.blue}, -- Differentiates between string and properties - TSPunctDelimiter = {fg = util.string_to_color(cpt, "", cpt.fg_alt)}, -- For delimiters ie: `.` - TSPunctBracket = {fg = cpt.red}, -- For brackets and parenthesis. - TSPunctSpecial = {fg = cpt.white}, -- For special punctutation that does not fall in the catagories before. - -- TSRepeat = { }; -- For keywords related to loops. - -- TSString = { }; -- For strings. - TSStringRegex = {fg = cpt.blue, style = cpc.styles.strings}, -- For regexes. - TSStringEscape = {fg = cpt.magenta, style = cpc.styles.strings}, -- For escape characters within a string. - -- TSSymbol = { }; -- For identifiers referring to symbols or atoms. - -- TSType = { }; -- For types. - TSTypeBuiltin = {fg = cpt.cyan}, -- For builtin types. - TSVariable = {style = cpc.styles.variables}, -- Any variable name that does not have another highlighcpt. - TSVariableBuiltin = {fg = cpt.red}, -- Variable names that are defined by the languages, like `this` or `self`. - -- TSTag = { }; -- Tags like html tag names. - -- TSTagDelimiter = { }; -- Tag delimiter like `<` `>` `/` - -- TSText = { }; -- For strings considered text in a markup language. - TSTextReference = {fg = cpt.cyan} - -- TSEmphasis = { }; -- For text to be represented with emphasis. - -- TSUnderline = { }; -- For text to be represented with an underline. - -- TSStrike = { }; -- For strikethrough texcpt. - -- TSTitle = { }; -- Text that is part of a title. - -- TSLiteral = { }; -- Literal texcpt. - -- TSURI = { }; -- Any URI like a link or email. } end local function get_integrations() local integrations = cpc["integrations"] + local final_integrations = {} for integration in pairs(integrations) do local cot = false @@ -245,9 +151,11 @@ local function get_integrations() end if (cot) then - require("catppuccino.core.integrations." .. integrations[integration]) + table.insert(final_integrations, require("catppuccino.core.integrations." .. integration)) end end + + return final_integrations end function M.apply() @@ -255,143 +163,144 @@ function M.apply() _G.cpc = require("catppuccino.config").options _G.cpt = require("catppuccino.color_schemes." .. cpc.colorscheme) - theme.base = get_base() + theme.plugins = get_integrations() + + -- theme.plugins = { + -- -- LspTrouble + -- LspTroubleText = {fg = cpt.fg_alt}, + -- LspTroubleCount = {fg = cpt.magenta, bg = cpt.fg_gutter}, + -- LspTroubleNormal = {fg = cpt.fg_sidebar, bg = cpt.bg_sidebar}, + -- -- Illuminate + -- illuminatedWord = {bg = cpt.fg_gutter}, + -- illuminatedCurWord = {bg = cpt.fg_gutter}, + -- -- IndentBlankline + -- IndentBlanklineChar = {fg = cpt.gray}, + -- -- diff + -- diffAdded = {fg = cpt.git.add}, + -- diffRemoved = {fg = cpt.git.delete}, + -- diffChanged = {fg = cpt.git.change}, + -- diffOldFile = {fg = cpt.yellow}, + -- diffNewFile = {fg = cpt.orange}, + -- diffFile = {fg = cpt.blue}, + -- diffLine = {fg = cpt.comment}, + -- diffIndexLine = {fg = cpt.magenta}, + -- -- Neogit + -- NeogitBranch = {fg = cpt.magenta}, + -- NeogitRemote = {fg = cpt.pink}, + -- NeogitHunkHeader = {bg = cpt.bg_highlight, fg = cpt.fg}, + -- NeogitHunkHeaderHighlight = {bg = cpt.fg_gutter, fg = cpt.blue}, + -- NeogitDiffContextHighlight = {bg = util.darken(cpt.fg_gutter, 0.5), fg = cpt.fg_alt}, + -- NeogitDiffDeleteHighlight = {fg = cpt.git.delete, bg = cpt.diff.delete}, + -- NeogitDiffAddHighlight = {fg = cpt.git.add, bg = cpt.diff.add}, + -- -- GitGutter + -- GitGutterAdd = {fg = cpt.gitSigns.add}, -- diff mode: Added line |diff.txt| + -- GitGutterChange = {fg = cpt.gitSigns.change}, -- diff mode: Changed line |diff.txt| + -- GitGutterDelete = {fg = cpt.gitSigns.delete}, -- diff mode: Deleted line |diff.txt| + -- -- GitSigns + -- GitSignsAdd = {fg = cpt.gitSigns.add}, -- diff mode: Added line |diff.txt| + -- GitSignsChange = {fg = cpt.gitSigns.change}, -- diff mode: Changed line |diff.txt| + -- GitSignsDelete = {fg = cpt.gitSigns.delete}, -- diff mode: Deleted line |diff.txt| + -- -- Telescope + -- TelescopeBorder = {fg = cpt.border_highlight}, + -- TelescopeSelectionCaret = {fg = cpt.cyan}, + -- TelescopeSelection = {fg = cpt.cyan, bg = cpt.bg_highlight}, + -- TelescopeMatching = {fg = cpt.blue}, + -- -- NvimTree + -- NvimTreeNormal = {fg = cpt.fg_sidebar, bg = cpt.bg_sidebar}, + -- NvimTreeFolderIcon = {fg = cpt.comment}, + -- NvimTreeRootFolder = {fg = cpt.orange, style = "bold"}, + -- NvimTreeSymlink = {fg = cpt.magenta}, + -- NvimTreeFolderName = {fg = cpt.blue}, + -- NvimTreeEmptyFolderName = {fg = cpt.comment}, + -- NvimTreeOpenedFolderName = {fg = cpt.blue_br}, + -- NvimTreeOpenedFile = {fg = cpt.magenta}, -- TODO: not working + -- NvimTreeGitDirty = {fg = cpt.git.change}, + -- NvimTreeGitNew = {fg = cpt.git.add}, + -- NvimTreeGitDeleted = {fg = cpt.git.delete}, + -- NvimTreeSpecialFile = {fg = cpt.cyan}, + -- NvimTreeIndentMarker = {fg = cpt.fg_gutter}, + -- NvimTreeImageFile = {fg = cpt.fg_sidebar}, + -- -- Fern + -- FernBranchText = {fg = cpt.blue}, + -- -- glyph palette + -- GlyphPalette1 = {fg = cpt.red}, + -- GlyphPalette2 = {fg = cpt.green}, + -- GlyphPalette3 = {fg = cpt.yellow}, + -- GlyphPalette4 = {fg = cpt.blue}, + -- GlyphPalette6 = {fg = cpt.green_br}, + -- GlyphPalette7 = {fg = cpt.fg}, + -- GlyphPalette9 = {fg = cpt.red}, + -- -- Dashboard + -- DashboardShortCut = {fg = cpt.cyan}, + -- DashboardHeader = {fg = cpt.yellow}, + -- DashboardCenter = {fg = cpt.green}, + -- DashboardFooter = {fg = cpt.orange, style = "italic"}, + -- -- WhichKey + -- WhichKey = {fg = cpt.cyan}, + -- WhichKeyGroup = {fg = cpt.blue}, + -- WhichKeyDesc = {fg = cpt.magenta}, + -- WhichKeySeperator = {fg = cpt.comment}, + -- WhichKeySeparator = {fg = cpt.comment}, + -- WhichKeyFloat = {bg = cpt.bg_sidebar}, + -- WhichKeyValue = {fg = cpt.comment}, + -- -- LspSaga + -- DiagnosticError = {fg = cpt.error}, + -- DiagnosticWarning = {fg = cpt.warning}, + -- DiagnosticInformation = {fg = cpt.info}, + -- DiagnosticHint = {fg = cpt.hint}, + -- LspFloatWinNormal = {bg = cpt.bg_float}, + -- LspFloatWinBorder = {fg = cpt.border_highlight}, + -- LspSagaBorderTitle = {fg = cpt.cyan}, + -- LspSagaHoverBorder = {fg = cpt.blue}, + -- LspSagaRenameBorder = {fg = cpt.green}, + -- LspSagaDefPreviewBorder = {fg = cpt.green}, + -- LspSagaCodeActionBorder = {fg = cpt.blue}, + -- LspSagaFinderSelection = {fg = cpt.bg_visual}, + -- LspSagaCodeActionTitle = {fg = cpt.blue1}, + -- LspSagaCodeActionContent = {fg = cpt.purple}, + -- LspSagaSignatureHelpBorder = {fg = cpt.red}, + -- ReferencesCount = {fg = cpt.purple}, + -- DefinitionCount = {fg = cpt.purple}, + -- DefinitionIcon = {fg = cpt.blue}, + -- ReferencesIcon = {fg = cpt.blue}, + -- TargetWord = {fg = cpt.cyan}, + -- -- NeoVim + -- healthError = {fg = cpt.error}, + -- healthSuccess = {fg = cpt.green_br}, + -- healthWarning = {fg = cpt.warning}, + -- -- BufferLine + -- BufferLineIndicatorSelected = {fg = cpt.git.change}, + -- BufferLineFill = {bg = cpt.black}, + -- -- Barbar + -- BufferCurrent = {bg = cpt.fg_gutter, fg = cpt.fg}, + -- BufferCurrentIndex = {bg = cpt.fg_gutter, fg = cpt.info}, + -- BufferCurrentMod = {bg = cpt.fg_gutter, fg = cpt.warning}, + -- BufferCurrentSign = {bg = cpt.fg_gutter, fg = cpt.info}, + -- BufferCurrentTarget = {bg = cpt.fg_gutter, fg = cpt.red}, + -- BufferVisible = {bg = cpt.bg_statusline, fg = cpt.fg}, + -- BufferVisibleIndex = {bg = cpt.bg_statusline, fg = cpt.info}, + -- BufferVisibleMod = {bg = cpt.bg_statusline, fg = cpt.warning}, + -- BufferVisibleSign = {bg = cpt.bg_statusline, fg = cpt.info}, + -- BufferVisibleTarget = {bg = cpt.bg_statusline, fg = cpt.red}, + -- BufferInactive = {bg = cpt.bg_statusline, fg = cpt.comment}, + -- BufferInactiveIndex = {bg = cpt.bg_statusline, fg = cpt.comment}, + -- BufferInactiveMod = {bg = cpt.bg_statusline, fg = util.darken(cpt.warning, 0.7)}, + -- BufferInactiveSign = {bg = cpt.bg_statusline, fg = cpt.border_highlight}, + -- BufferInactiveTarget = {bg = cpt.bg_statusline, fg = cpt.red}, + -- BufferTabpages = {bg = cpt.bg_statusline, fg = cpt.none}, + -- BufferTabpage = {bg = cpt.bg_statusline, fg = cpt.border_highlight}, + -- -- Sneak + -- Sneak = {fg = cpt.bg_highlight, bg = cpt.magenta}, + -- SneakScope = {bg = cpt.bg_visual}, + -- -- Hop + -- HopNextKey = {fg = cpt.cyan, style = "bold"}, + -- HopNextKey1 = {fg = cpt.blue, style = "bold"}, + -- HopNextKey2 = {fg = util.darken(cpt.blue, 0.3)}, + -- HopUnmatched = {fg = cpt.comment}, + -- LightspeedGreyWash = {fg = cpt.comment} + -- } - theme.plugins = { - -- LspTrouble - LspTroubleText = {fg = cpt.fg_alt}, - LspTroubleCount = {fg = cpt.magenta, bg = cpt.fg_gutter}, - LspTroubleNormal = {fg = cpt.fg_sidebar, bg = cpt.bg_sidebar}, - -- Illuminate - illuminatedWord = {bg = cpt.fg_gutter}, - illuminatedCurWord = {bg = cpt.fg_gutter}, - -- IndentBlankline - IndentBlanklineChar = {fg = cpt.gray}, - -- diff - diffAdded = {fg = cpt.git.add}, - diffRemoved = {fg = cpt.git.delete}, - diffChanged = {fg = cpt.git.change}, - diffOldFile = {fg = cpt.yellow}, - diffNewFile = {fg = cpt.orange}, - diffFile = {fg = cpt.blue}, - diffLine = {fg = cpt.comment}, - diffIndexLine = {fg = cpt.magenta}, - -- Neogit - NeogitBranch = {fg = cpt.magenta}, - NeogitRemote = {fg = cpt.pink}, - NeogitHunkHeader = {bg = cpt.bg_highlight, fg = cpt.fg}, - NeogitHunkHeaderHighlight = {bg = cpt.fg_gutter, fg = cpt.blue}, - NeogitDiffContextHighlight = {bg = util.darken(cpt.fg_gutter, 0.5), fg = cpt.fg_alt}, - NeogitDiffDeleteHighlight = {fg = cpt.git.delete, bg = cpt.diff.delete}, - NeogitDiffAddHighlight = {fg = cpt.git.add, bg = cpt.diff.add}, - -- GitGutter - GitGutterAdd = {fg = cpt.gitSigns.add}, -- diff mode: Added line |diff.txt| - GitGutterChange = {fg = cpt.gitSigns.change}, -- diff mode: Changed line |diff.txt| - GitGutterDelete = {fg = cpt.gitSigns.delete}, -- diff mode: Deleted line |diff.txt| - -- GitSigns - GitSignsAdd = {fg = cpt.gitSigns.add}, -- diff mode: Added line |diff.txt| - GitSignsChange = {fg = cpt.gitSigns.change}, -- diff mode: Changed line |diff.txt| - GitSignsDelete = {fg = cpt.gitSigns.delete}, -- diff mode: Deleted line |diff.txt| - -- Telescope - TelescopeBorder = {fg = cpt.border_highlight}, - TelescopeSelectionCaret = {fg = cpt.cyan}, - TelescopeSelection = {fg = cpt.cyan, bg = cpt.bg_highlight}, - TelescopeMatching = {fg = cpt.blue}, - -- NvimTree - NvimTreeNormal = {fg = cpt.fg_sidebar, bg = cpt.bg_sidebar}, - NvimTreeFolderIcon = {fg = cpt.comment}, - NvimTreeRootFolder = {fg = cpt.orange, style = "bold"}, - NvimTreeSymlink = {fg = cpt.magenta}, - NvimTreeFolderName = {fg = cpt.blue}, - NvimTreeEmptyFolderName = {fg = cpt.comment}, - NvimTreeOpenedFolderName = {fg = cpt.blue_br}, - NvimTreeOpenedFile = {fg = cpt.magenta}, -- TODO: not working - NvimTreeGitDirty = {fg = cpt.git.change}, - NvimTreeGitNew = {fg = cpt.git.add}, - NvimTreeGitDeleted = {fg = cpt.git.delete}, - NvimTreeSpecialFile = {fg = cpt.cyan}, - NvimTreeIndentMarker = {fg = cpt.fg_gutter}, - NvimTreeImageFile = {fg = cpt.fg_sidebar}, - -- Fern - FernBranchText = {fg = cpt.blue}, - -- glyph palette - GlyphPalette1 = {fg = cpt.red}, - GlyphPalette2 = {fg = cpt.green}, - GlyphPalette3 = {fg = cpt.yellow}, - GlyphPalette4 = {fg = cpt.blue}, - GlyphPalette6 = {fg = cpt.green_br}, - GlyphPalette7 = {fg = cpt.fg}, - GlyphPalette9 = {fg = cpt.red}, - -- Dashboard - DashboardShortCut = {fg = cpt.cyan}, - DashboardHeader = {fg = cpt.yellow}, - DashboardCenter = {fg = cpt.green}, - DashboardFooter = {fg = cpt.orange, style = "italic"}, - -- WhichKey - WhichKey = {fg = cpt.cyan}, - WhichKeyGroup = {fg = cpt.blue}, - WhichKeyDesc = {fg = cpt.magenta}, - WhichKeySeperator = {fg = cpt.comment}, - WhichKeySeparator = {fg = cpt.comment}, - WhichKeyFloat = {bg = cpt.bg_sidebar}, - WhichKeyValue = {fg = cpt.comment}, - -- LspSaga - DiagnosticError = {fg = cpt.error}, - DiagnosticWarning = {fg = cpt.warning}, - DiagnosticInformation = {fg = cpt.info}, - DiagnosticHint = {fg = cpt.hint}, - LspFloatWinNormal = {bg = cpt.bg_float}, - LspFloatWinBorder = {fg = cpt.border_highlight}, - LspSagaBorderTitle = {fg = cpt.cyan}, - LspSagaHoverBorder = {fg = cpt.blue}, - LspSagaRenameBorder = {fg = cpt.green}, - LspSagaDefPreviewBorder = {fg = cpt.green}, - LspSagaCodeActionBorder = {fg = cpt.blue}, - LspSagaFinderSelection = {fg = cpt.bg_visual}, - LspSagaCodeActionTitle = {fg = cpt.blue1}, - LspSagaCodeActionContent = {fg = cpt.purple}, - LspSagaSignatureHelpBorder = {fg = cpt.red}, - ReferencesCount = {fg = cpt.purple}, - DefinitionCount = {fg = cpt.purple}, - DefinitionIcon = {fg = cpt.blue}, - ReferencesIcon = {fg = cpt.blue}, - TargetWord = {fg = cpt.cyan}, - -- NeoVim - healthError = {fg = cpt.error}, - healthSuccess = {fg = cpt.green_br}, - healthWarning = {fg = cpt.warning}, - -- BufferLine - BufferLineIndicatorSelected = {fg = cpt.git.change}, - BufferLineFill = {bg = cpt.black}, - -- Barbar - BufferCurrent = {bg = cpt.fg_gutter, fg = cpt.fg}, - BufferCurrentIndex = {bg = cpt.fg_gutter, fg = cpt.info}, - BufferCurrentMod = {bg = cpt.fg_gutter, fg = cpt.warning}, - BufferCurrentSign = {bg = cpt.fg_gutter, fg = cpt.info}, - BufferCurrentTarget = {bg = cpt.fg_gutter, fg = cpt.red}, - BufferVisible = {bg = cpt.bg_statusline, fg = cpt.fg}, - BufferVisibleIndex = {bg = cpt.bg_statusline, fg = cpt.info}, - BufferVisibleMod = {bg = cpt.bg_statusline, fg = cpt.warning}, - BufferVisibleSign = {bg = cpt.bg_statusline, fg = cpt.info}, - BufferVisibleTarget = {bg = cpt.bg_statusline, fg = cpt.red}, - BufferInactive = {bg = cpt.bg_statusline, fg = cpt.comment}, - BufferInactiveIndex = {bg = cpt.bg_statusline, fg = cpt.comment}, - BufferInactiveMod = {bg = cpt.bg_statusline, fg = util.darken(cpt.warning, 0.7)}, - BufferInactiveSign = {bg = cpt.bg_statusline, fg = cpt.border_highlight}, - BufferInactiveTarget = {bg = cpt.bg_statusline, fg = cpt.red}, - BufferTabpages = {bg = cpt.bg_statusline, fg = cpt.none}, - BufferTabpage = {bg = cpt.bg_statusline, fg = cpt.border_highlight}, - -- Sneak - Sneak = {fg = cpt.bg_highlight, bg = cpt.magenta}, - SneakScope = {bg = cpt.bg_visual}, - -- Hop - HopNextKey = {fg = cpt.cyan, style = "bold"}, - HopNextKey1 = {fg = cpt.blue, style = "bold"}, - HopNextKey2 = {fg = util.darken(cpt.blue, 0.3)}, - HopUnmatched = {fg = cpt.comment}, - LightspeedGreyWash = {fg = cpt.comment} - } -- uninstantiate to avoid poluting global scope and because they are not needed anymore _G.cpc = nil diff --git a/lua/catppuccino/utils/util.lua b/lua/catppuccino/utils/util.lua index 6edc3f1..963ed5f 100644 --- a/lua/catppuccino/utils/util.lua +++ b/lua/catppuccino/utils/util.lua @@ -134,7 +134,13 @@ end function util.syntax(tbl) for group, colors in pairs(tbl) do - util.highlight(group, colors) + if (type(group) == "number") then + for inner_group, clrs in pairs(colors) do + util.highlight(inner_group, clrs) + end + else + util.highlight(group, colors) + end end end