diff --git a/lua/catppuccin/groups/editor.lua b/lua/catppuccin/groups/editor.lua index ba2af97c7..243a6dc33 100644 --- a/lua/catppuccin/groups/editor.lua +++ b/lua/catppuccin/groups/editor.lua @@ -50,8 +50,8 @@ function M.get() PmenuThumb = { bg = C.overlay0 }, -- Popup menu: Thumb of the scrollbar. Question = { fg = C.blue }, -- |hit-enter| prompt and yes/no questions QuickFixLine = { bg = C.surface1, style = { "bold" } }, -- Current |quickfix| item in the quickfix window. Combined with |hl-CursorLine| when the cursor is there. - Search = { bg = U.darken(C.sky, 0.30, C.base), fg = C.text }, -- Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand out. - IncSearch = { bg = U.darken(C.sky, 0.90, C.base), fg = C.mantle }, -- 'incsearch' highlighting; also used for the text replaced with ":s///c" + Search = { bg = C.surface1, fg = C.pink, style = { "bold" } }, -- Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand out. + IncSearch = { bg = C.pink, fg = C.surface1 }, -- 'incsearch' highlighting; also used for the text replaced with ":s///c" CurSearch = { bg = C.red, fg = C.mantle }, -- 'cursearch' highlighting: highlights the current search you're on differently SpecialKey = { fg = C.text }, -- Unprintable characters: text displayed differently from what it really is. But not 'listchars' textspace. |hl-Whitespace| SpellBad = { sp = C.red, style = { "undercurl" } }, -- Word that is not recognized by the spellchecker. |spell| Combined with the highlighting used otherwise. diff --git a/lua/catppuccin/groups/integrations/native_lsp.lua b/lua/catppuccin/groups/integrations/native_lsp.lua index 623e3849f..4efd04126 100644 --- a/lua/catppuccin/groups/integrations/native_lsp.lua +++ b/lua/catppuccin/groups/integrations/native_lsp.lua @@ -7,7 +7,7 @@ function M.get() local error = C.red local warning = C.yellow local info = C.sky - local hint = C.teal + local hint = C.rosewater local darkening_percentage = 0.095 return { diff --git a/lua/catppuccin/groups/integrations/semantic_tokens.lua b/lua/catppuccin/groups/integrations/semantic_tokens.lua index 7266c1aed..1eb691b18 100644 --- a/lua/catppuccin/groups/integrations/semantic_tokens.lua +++ b/lua/catppuccin/groups/integrations/semantic_tokens.lua @@ -2,29 +2,35 @@ local M = {} function M.get() return { + ["@lsp.type.class"] = { link = "@type" }, ["@lsp.type.comment"] = { link = "@comment" }, ["@lsp.type.enum"] = { link = "@type" }, ["@lsp.type.enumMember"] = { link = "@constant" }, ["@lsp.type.escapeSequence"] = { link = "@string.escape" }, - ["@lsp.type.formatSpecifier"] = { link = "@punctuation.special" }, - ["@lsp.type.interface"] = { link = "@interface" }, + ["@lsp.type.event"] = { link = "@event" }, + ["@lsp.type.formatSpecifier"] = { link = "@string.special" }, + ["@lsp.type.interface"] = { link = "@type" }, ["@lsp.type.keyword"] = { link = "@keyword" }, + ["@lsp.type.modifier"] = { link = "@keyword" }, ["@lsp.type.namespace"] = { link = "@namespace" }, ["@lsp.type.operator"] = { link = "@operator" }, ["@lsp.type.parameter"] = { link = "@parameter" }, ["@lsp.type.property"] = { link = "@property" }, + ["@lsp.type.property.cpp"] = { link = "@property.cpp" }, + ["@lsp.type.regex"] = { link = "@string.regex" }, ["@lsp.type.selfKeyword"] = { link = "@variable.builtin" }, + ["@lsp.type.struct"] = { link = "@type" }, ["@lsp.type.variable"] = {}, -- use treesitter styles for regular variables - ["@lsp.typemod.enum.defaultLibrary"] = { link = "@type.builtin" }, - ["@lsp.typemod.enumMember.defaultLibrary"] = { link = "@constant.builtin" }, - ["@lsp.typemod.function.defaultLibrary"] = { link = "@function.builtin" }, - ["@lsp.typemod.keyword.async"] = { link = "@keyword.coroutine" }, - ["@lsp.typemod.macro.defaultLibrary"] = { link = "@function.builtin" }, - ["@lsp.typemod.method.defaultLibrary"] = { link = "@function.builtin" }, + ["@lsp.typemod.enum.defaultLibrary"] = { link = "@type" }, + ["@lsp.typemod.enumMember.defaultLibrary"] = { link = "@constant" }, + ["@lsp.typemod.function.defaultLibrary"] = { link = "@function" }, + ["@lsp.typemod.keyword.async"] = { link = "@keyword" }, + ["@lsp.typemod.macro.defaultLibrary"] = { link = "@constant.macro" }, + ["@lsp.typemod.method.defaultLibrary"] = { link = "@function" }, ["@lsp.typemod.operator.injected"] = { link = "@operator" }, ["@lsp.typemod.string.injected"] = { link = "@string" }, - ["@lsp.typemod.type.defaultLibrary"] = { link = "@type.builtin" }, - ["@lsp.typemod.variable.defaultLibrary"] = { link = "@variable.builtin" }, + ["@lsp.typemod.type.defaultLibrary"] = { link = "@type" }, + ["@lsp.typemod.variable.defaultLibrary"] = { link = "@variable" }, ["@lsp.typemod.variable.injected"] = { link = "@variable" }, } end diff --git a/lua/catppuccin/groups/integrations/treesitter.lua b/lua/catppuccin/groups/integrations/treesitter.lua index 3621b896f..fa5aac51d 100644 --- a/lua/catppuccin/groups/integrations/treesitter.lua +++ b/lua/catppuccin/groups/integrations/treesitter.lua @@ -22,76 +22,72 @@ If you want to stay on nvim 0.7, either disable the integration or pin catppucci ["@operator"] = { link = "Operator" }, -- For any operator: +, but also -> and * in C. -- Punctuation - ["@punctuation.delimiter"] = { fg = C.overlay2 }, -- For delimiters ie: . + ["@punctuation.delimiter"] = { link = "Delimiter" }, -- For delimiters (e.g. `;` / `.` / `,`). ["@punctuation.bracket"] = { fg = C.overlay2 }, -- For brackets and parenthesis. - ["@punctuation.special"] = { fg = C.sky, style = O.styles.operators or {} }, -- For special punctutation that does not fall in the catagories before. + ["@punctuation.special"] = { link = "Special" }, -- For special punctuation that does not fall in the categories before (e.g. `{}` in string interpolation). -- Literals ["@string"] = { link = "String" }, -- For strings. ["@string.regex"] = { fg = C.peach, style = O.styles.strings or {} }, -- For regexes. ["@string.escape"] = { fg = C.pink, style = O.styles.strings }, -- For escape characters within a string. - ["@string.special"] = { fg = C.blue }, -- other special strings (e.g. dates) + ["@string.special"] = { link = "Special" }, -- other special strings (e.g. dates) ["@character"] = { link = "Character" }, -- character literals ["@character.special"] = { link = "SpecialChar" }, -- special characters (e.g. wildcards) ["@boolean"] = { link = "Boolean" }, -- For booleans. ["@number"] = { link = "Number" }, -- For all numbers - ["@float"] = { link = "Number" }, -- For floats. + ["@float"] = { link = "Float" }, -- For floats. -- Functions ["@function"] = { link = "Function" }, -- For function (calls and definitions). ["@function.builtin"] = { fg = C.peach, style = O.styles.functions or {} }, -- For builtin functions: table.insert in Lua. - ["@function.call"] = { link = "@function" }, -- function calls - ["@function.macro"] = { fg = C.teal, style = O.styles.functions or {} }, -- For macro defined functions (calls and definitions): each macro_rules in RusC. - ["@method"] = { fg = C.peach, style = O.styles.functions or {} }, -- For method calls and definitions. - - ["@method.call"] = { link = "@method" }, -- method calls + ["@function.call"] = { link = "Function" }, -- function calls + ["@function.macro"] = { link = "Constant" }, -- For macro defined functions (calls and definitions): each macro_rules in RusC. + ["@method"] = { link = "Function" }, -- For method definitions. + ["@method.call"] = { link = "Function" }, -- For method calls. ["@constructor"] = { fg = C.sapphire }, -- For constructor calls and definitions: = { } in Lua, and Java constructors. - ["@parameter"] = { fg = C.maroon, style = { "italic" } }, -- For parameters of a function. + ["@parameter"] = { fg = C.rosewater, style = { "italic" } }, -- For parameters of a function. -- Keywords ["@keyword"] = { link = "Keyword" }, -- For keywords that don't fall in previous categories. - ["@keyword.function"] = { fg = C.mauve, style = O.styles.keywords or {} }, -- For keywords used to define a function. - ["@keyword.operator"] = { fg = C.mauve, style = O.styles.operators or {} }, -- For new keyword operator - ["@keyword.return"] = { fg = C.mauve, style = O.styles.keywords or {} }, + ["@keyword.function"] = { fg = C.maroon, style = O.styles.keywords or {} }, -- For keywords used to define a function. + ["@keyword.operator"] = { link = "Operator" }, -- For new keyword operator + ["@keyword.return"] = { fg = C.pink, style = O.styles.keywords or {} }, -- JS & derivative - ["@keyword.export"] = { fg = C.sky, style = { "bold" } }, + ["@keyword.export"] = { fg = C.sky, style = O.styles.keywords }, ["@conditional"] = { link = "Conditional" }, -- For keywords related to conditionnals. ["@repeat"] = { link = "Repeat" }, -- For keywords related to loops. -- @debug ; keywords related to debugging ["@label"] = { link = "Label" }, -- For labels: label: in C and :label: in Lua. ["@include"] = { link = "Include" }, -- For includes: #include in C, use or extern crate in Rust, or require in Lua. - ["@exception"] = { fg = C.mauve, style = O.styles.keywords or {} }, -- For exception related keywords. + ["@exception"] = { link = "Exception" }, -- For exception related keywords. -- Types - ["@type"] = { link = "Type" }, -- For types. - ["@type.builtin"] = { fg = C.yellow, style = O.styles.properties or "italic" }, -- For builtin types. - ["@type.definition"] = { link = "@type" }, -- type definitions (e.g. `typedef` in C) - ["@type.qualifier"] = { link = "@type" }, -- type qualifiers (e.g. `const`) + ["@type.builtin"] = { fg = C.yellow, style = O.styles.properties or { "italic" } }, -- For builtin types. + ["@type.definition"] = { link = "Type" }, -- type definitions (e.g. `typedef` in C) + ["@type.qualifier"] = { link = "Keyword" }, -- type qualifiers (e.g. `const`) ["@storageclass"] = { link = "StorageClass" }, -- visibility/life-time/etc. modifiers (e.g. `static`) ["@attribute"] = { link = "Constant" }, -- attribute annotations (e.g. Python decorators) - ["@field"] = { fg = C.lavender }, -- For fields. - ["@property"] = { fg = C.lavender, style = O.styles.properties or {} }, -- Same as TSField. + ["@field"] = { fg = C.rosewater }, -- For fields. + ["@property"] = { fg = C.rosewater, style = O.styles.properties or {} }, -- Same as TSField. -- Identifiers + ["@variable"] = { link = "Identifier" }, -- Any variable name that does not have another highlight. + ["@variable.builtin"] = { fg = C.red, style = O.styles.properties or {} }, -- Variable names that are defined by the languages, like this or self. - ["@variable"] = { fg = C.text, style = O.styles.variables or {} }, -- Any variable name that does not have another highlight. - ["@variable.builtin"] = { fg = C.red }, -- Variable names that are defined by the languages, like this or self. - - ["@constant"] = { fg = C.peach }, -- For constants - ["@constant.builtin"] = { fg = C.peach, style = O.styles.keywords or {} }, -- For constant that are built in the language: nil in Lua. + ["@constant"] = { link = "Constant" }, -- For constants + ["@constant.builtin"] = { fg = C.lavender, style = O.styles.properties or {} }, -- For constant that are built in the language: nil in Lua. ["@constant.macro"] = { link = "Macro" }, -- For constants that are defined by macros: NULL in C. - ["@namespace"] = { fg = C.lavender, style = { "italic" } }, -- For identifiers referring to modules and namespaces. + ["@namespace"] = { fg = C.rosewater }, -- For identifiers referring to modules and namespaces. ["@symbol"] = { fg = C.flamingo }, -- Text - ["@text"] = { fg = C.text }, -- For strings considerated text in a markup language. ["@text.strong"] = { fg = C.maroon, style = { "bold" } }, -- bold ["@text.emphasis"] = { fg = C.maroon, style = { "italic" } }, -- italic @@ -103,7 +99,7 @@ If you want to stay on nvim 0.7, either disable the integration or pin catppucci ["@text.math"] = { fg = C.blue }, -- math environments (e.g. `$ ... $` in LaTeX) ["@text.environment"] = { fg = C.pink }, -- text environments of markup languages ["@text.environment.name"] = { fg = C.blue }, -- text indicating the type of an environment - ["@text.reference"] = { fg = C.lavender, style = { "bold" } }, -- references + ["@text.reference"] = { link = "Tag" }, -- text references, footnotes, citations, etc. ["@text.todo"] = { fg = C.base, bg = C.yellow }, -- todo notes ["@text.todo.checked"] = { fg = C.green }, -- todo notes @@ -120,19 +116,9 @@ If you want to stay on nvim 0.7, either disable the integration or pin catppucci ["@tag.attribute"] = { fg = C.teal, style = { "italic" } }, -- Tags like html tag names. ["@tag.delimiter"] = { fg = C.sky }, -- Tag delimiter like < > / - -- Semantic tokens - ["@class"] = { fg = C.blue }, - ["@struct"] = { fg = C.blue }, - ["@enum"] = { fg = C.teal }, - ["@enumMember"] = { fg = C.flamingo }, - ["@event"] = { fg = C.flamingo }, - ["@interface"] = { fg = C.flamingo }, - ["@modifier"] = { fg = C.flamingo }, - ["@regexp"] = { fg = C.pink }, - ["@typeParameter"] = { fg = C.yellow }, - ["@decorator"] = { fg = C.flamingo }, - -- Language specific: + -- bash + ["@function.builtin.bash"] = { fg = C.red, style = { "italic" } }, -- css ["@property.css"] = { fg = C.lavender }, @@ -143,6 +129,9 @@ If you want to stay on nvim 0.7, either disable the integration or pin catppucci ["@string.plain.css"] = { fg = C.peach }, ["@number.css"] = { fg = C.peach }, + -- java + ["@constant.java"] = { fg = C.teal }, + -- toml ["@property.toml"] = { fg = C.blue }, -- Differentiates between string and properties @@ -150,18 +139,17 @@ If you want to stay on nvim 0.7, either disable the integration or pin catppucci ["@label.json"] = { fg = C.blue }, -- For labels: label: in C and :label: in Lua. -- lua - ["@constructor.lua"] = { fg = C.flamingo }, -- For constructor calls and definitions: = { } in Lua, and Java constructors. + ["@constructor.lua"] = { fg = C.flamingo }, -- For constructor calls and definitions: = { } in Lua. + ["@field.lua"] = { fg = C.lavender }, -- typescript + ["@property.typescript"] = { fg = C.lavender, style = O.styles.properties or {} }, ["@constructor.typescript"] = { fg = C.lavender }, -- TSX (Typescript React) ["@constructor.tsx"] = { fg = C.lavender }, ["@tag.attribute.tsx"] = { fg = C.mauve, style = { "italic" } }, - -- cpp - ["@property.cpp"] = { fg = C.rosewater }, - -- yaml ["@field.yaml"] = { fg = C.blue }, -- For fields. @@ -169,9 +157,17 @@ If you want to stay on nvim 0.7, either disable the integration or pin catppucci ["@symbol.ruby"] = { fg = C.flamingo }, -- PHP - ["@type.qualifier.php"] = { link = "Keyword" }, -- type qualifiers (e.g. `const`) ["@method.php"] = { link = "Function" }, ["@method.call.php"] = { link = "Function" }, + + -- C/CPP + ["@type.builtin.c"] = { style = {} }, + ["@property.cpp"] = { fg = C.text }, + ["@type.builtin.cpp"] = { style = {} }, + + -- Misc + gitcommitSummary = { fg = C.rosewater, style = { "italic" } }, + zshKSHFunction = { link = "Function" }, } end diff --git a/lua/catppuccin/groups/syntax.lua b/lua/catppuccin/groups/syntax.lua index c94534903..4d7569682 100644 --- a/lua/catppuccin/groups/syntax.lua +++ b/lua/catppuccin/groups/syntax.lua @@ -8,32 +8,32 @@ function M.get() String = { fg = C.green, style = O.styles.strings or {} }, -- a string constant: "this is a string" Character = { fg = C.teal }, -- a character constant: 'c', '\n' Number = { fg = C.peach, style = O.styles.numbers or {} }, -- a number constant: 234, 0xff - Float = { fg = C.peach, style = O.styles.numbers or {} }, -- a floating point constant: 2.3e10 + Float = { link = "Number" }, -- a floating point constant: 2.3e10 Boolean = { fg = C.peach, style = O.styles.booleans or {} }, -- a boolean constant: TRUE, false - Identifier = { fg = C.flamingo, style = O.styles.variables or {} }, -- (preferred) any variable name + Identifier = { fg = C.text, style = O.styles.variables or {} }, -- (preferred) any variable name Function = { fg = C.blue, style = O.styles.functions or {} }, -- function name (also: methods for classes) Statement = { fg = C.mauve }, -- (preferred) any statement Conditional = { fg = C.mauve, style = O.styles.conditionals or {} }, -- if, then, else, endif, switch, etc. Repeat = { fg = C.mauve, style = O.styles.loops or {} }, -- for, do, while, etc. - Label = { fg = C.sapphire }, -- case, default, etc. + Label = { fg = C.rosewater }, -- case, default, etc. Operator = { fg = C.sky, style = O.styles.operators or {} }, -- "sizeof", "+", "*", etc. - Keyword = { fg = C.mauve, style = O.styles.keywords or {} }, -- any other keyword - -- Exception = { }, -- try, catch, throw + Keyword = { fg = C.maroon, style = O.styles.keywords or {} }, -- any other keyword + Exception = { fg = C.peach, style = O.styles.keywords or {} }, -- try, catch, throw PreProc = { fg = C.pink }, -- (preferred) generic Preprocessor - Include = { fg = C.mauve, style = O.styles.keywords or {} }, -- preprocessor #include + Include = { fg = C.teal, style = O.styles.keywords or {} }, -- preprocessor #include Define = { link = "PreProc" }, -- preprocessor #define - Macro = { fg = C.mauve }, -- same as Define + Macro = { link = "Constant" }, -- same as Define PreCondit = { link = "PreProc" }, -- preprocessor #if, #else, #endif, etc. - StorageClass = { fg = C.yellow }, -- static, register, volatile, etc. - Structure = { fg = C.yellow }, -- struct, union, enum, etc. + StorageClass = { link = "Keyword" }, -- static, register, volatile, etc. + Structure = { link = "Keyword" }, -- struct, union, enum, etc. Special = { fg = C.pink }, -- (preferred) any special symbol Type = { fg = C.yellow, style = O.styles.types or {} }, -- (preferred) int, long, char, etc. Typedef = { link = "Type" }, -- A typedef SpecialChar = { link = "Special" }, -- special character in a constant - Tag = { link = "Special" }, -- you can use CTRL-] on this - Delimiter = { link = "Special" }, -- character that needs attention + Tag = { fg = C.lavender, style = { "bold" } }, -- you can use CTRL-] on this + Delimiter = { fg = C.teal }, -- delimiters (e.g. `;` / `.` / `,`) Debug = { link = "Special" }, -- debugging statements Underlined = { style = { "underline" } }, -- (preferred) text that stands out, HTML links