diff --git a/README.md b/README.md index 9ae18219..6003e784 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,7 @@ require("catppuccin").setup({ properties = {}, types = {}, operators = {}, + -- miscs = {}, -- Uncomment to turn off hard-coded styles }, color_overrides = {}, custom_highlights = {}, diff --git a/doc/catppuccin.txt b/doc/catppuccin.txt index edc88904..09934a3d 100644 --- a/doc/catppuccin.txt +++ b/doc/catppuccin.txt @@ -99,6 +99,7 @@ options and settings. properties = {}, types = {}, operators = {}, + -- miscs = {}, -- Uncomment to turn off hard-coded styles }, color_overrides = {}, custom_highlights = {}, diff --git a/lua/catppuccin/groups/integrations/treesitter.lua b/lua/catppuccin/groups/integrations/treesitter.lua index 265f6c33..3e2b7930 100644 --- a/lua/catppuccin/groups/integrations/treesitter.lua +++ b/lua/catppuccin/groups/integrations/treesitter.lua @@ -23,7 +23,7 @@ If you want to stay on nvim 0.7, either disable the integration or pin catppucci ["@constant.builtin"] = { fg = C.peach, style = O.styles.keywords 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. - ["@module"] = { fg = C.lavender, style = { "italic" } }, -- For identifiers referring to modules and namespaces. + ["@module"] = { fg = C.lavender, style = O.styles.miscs or { "italic" } }, -- For identifiers referring to modules and namespaces. ["@label"] = { link = "Label" }, -- For labels: label: in C and :label: in Lua. -- Literals @@ -121,7 +121,7 @@ If you want to stay on nvim 0.7, either disable the integration or pin catppucci -- Tags ["@tag"] = { fg = C.mauve }, -- Tags like html tag names. - ["@tag.attribute"] = { fg = C.teal, style = { "italic" } }, -- Tags like html tag names. + ["@tag.attribute"] = { fg = C.teal, style = O.styles.miscs or { "italic" } }, -- Tags like html tag names. ["@tag.delimiter"] = { fg = C.sky }, -- Tag delimiter like < > / -- Misc @@ -129,7 +129,7 @@ If you want to stay on nvim 0.7, either disable the integration or pin catppucci -- Language specific: -- bash - ["@function.builtin.bash"] = { fg = C.red, style = { "italic" } }, + ["@function.builtin.bash"] = { fg = C.red, style = O.styles.miscs or { "italic" } }, -- markdown ["@markup.heading.1.markdown"] = { link = "rainbow1" }, @@ -166,7 +166,7 @@ If you want to stay on nvim 0.7, either disable the integration or pin catppucci -- TSX (Typescript React) ["@constructor.tsx"] = { fg = C.lavender }, - ["@tag.attribute.tsx"] = { fg = C.teal, style = { "italic" } }, + ["@tag.attribute.tsx"] = { fg = C.teal, style = O.styles.miscs or { "italic" } }, -- yaml ["@variable.member.yaml"] = { fg = C.blue }, -- For fields. @@ -184,7 +184,7 @@ If you want to stay on nvim 0.7, either disable the integration or pin catppucci ["@type.builtin.cpp"] = { fg = C.yellow, style = {} }, -- Misc - gitcommitSummary = { fg = C.rosewater, style = { "italic" } }, + gitcommitSummary = { fg = C.rosewater, style = O.styles.miscs or { "italic" } }, zshKSHFunction = { link = "Function" }, } diff --git a/lua/catppuccin/types.lua b/lua/catppuccin/types.lua index 534cebe1..84d4a95f 100644 --- a/lua/catppuccin/types.lua +++ b/lua/catppuccin/types.lua @@ -81,6 +81,8 @@ ---@field types CtpHighlightArgs[]? -- Change the style of operators. ---@field operators CtpHighlightArgs[]? +-- Change the style of miscs. +---@field miscs CtpHighlightArgs[]? ---@class CtpNativeLspStyles -- Change the style of LSP errors.