Merge pull request #179 from nullchilly/allout

refactor(highlight): Deprecating style = string. Use style = table
dev
Pocco81 2 years ago committed by GitHub
commit f57d6badc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -87,34 +87,34 @@ dim_inactive = false,
transparent_background = false, transparent_background = false,
term_colors = false, term_colors = false,
styles = { styles = {
comments = "italic", comments = { "italic" },
conditionals = "italic", conditionals = { "italic" },
loops = "NONE", loops = {},
functions = "NONE", functions = {},
keywords = "NONE", keywords = {},
strings = "NONE", strings = {},
variables = "NONE", variables = {},
numbers = "NONE", numbers = {},
booleans = "NONE", booleans = {},
properties = "NONE", properties = {},
types = "NONE", types = {},
operators = "NONE", operators = {},
}, },
integrations = { integrations = {
treesitter = true, treesitter = true,
native_lsp = { native_lsp = {
enabled = true, enabled = true,
virtual_text = { virtual_text = {
errors = "italic", errors = { "italic" },
hints = "italic", hints = { "italic" },
warnings = "italic", warnings = { "italic" },
information = "italic", information = { "italic" },
}, },
underlines = { underlines = {
errors = "underline", errors = { "underline" },
hints = "underline", hints = { "underline" },
warnings = "underline", warnings = { "underline" },
information = "underline", information = { "underline" },
}, },
}, },
coc_nvim = false, coc_nvim = false,

@ -17,16 +17,16 @@ config.options = {
styles = { styles = {
comments = { "italic" }, comments = { "italic" },
conditionals = { "italic" }, conditionals = { "italic" },
loops = "NONE", loops = {},
functions = "NONE", functions = {},
keywords = "NONE", keywords = {},
strings = "NONE", strings = {},
variables = "NONE", variables = {},
numbers = "NONE", numbers = {},
booleans = "NONE", booleans = {},
properties = "NONE", properties = {},
types = "NONE", types = {},
operators = "NONE", operators = {},
}, },
integrations = { integrations = {
treesitter = true, treesitter = true,

@ -3,11 +3,11 @@ local M = {}
function M.get(cp) function M.get(cp)
return { return {
CmpItemAbbr = { fg = cp.overlay2 }, CmpItemAbbr = { fg = cp.overlay2 },
CmpItemAbbrDeprecated = { fg = cp.overlay0, style = "strikethrough" }, CmpItemAbbrDeprecated = { fg = cp.overlay0, style = { "strikethrough" } },
CmpItemKind = { fg = cp.blue }, CmpItemKind = { fg = cp.blue },
CmpItemMenu = { fg = cp.text }, CmpItemMenu = { fg = cp.text },
CmpItemAbbrMatch = { fg = cp.text, style = "bold" }, CmpItemAbbrMatch = { fg = cp.text, style = { "bold" } },
CmpItemAbbrMatchFuzzy = { fg = cp.text, style = "bold" }, CmpItemAbbrMatchFuzzy = { fg = cp.text, style = { "bold" } },
-- kind support -- kind support
CmpItemKindSnippet = { fg = cp.mauve }, CmpItemKindSnippet = { fg = cp.mauve },

@ -5,7 +5,7 @@ function M.get(cp)
DashboardShortCut = { fg = cp.pink }, DashboardShortCut = { fg = cp.pink },
DashboardHeader = { fg = cp.blue }, DashboardHeader = { fg = cp.blue },
DashboardCenter = { fg = cp.green }, DashboardCenter = { fg = cp.green },
DashboardFooter = { fg = cp.yellow, style = "italic" }, DashboardFooter = { fg = cp.yellow, style = { "italic" } },
} }
end end

@ -114,7 +114,7 @@ local vi_mode_hl = function()
return { return {
fg = sett.bkg, fg = sett.bkg,
bg = mode_colors[vim.fn.mode()][2], bg = mode_colors[vim.fn.mode()][2],
style = "bold", style = { "bold" },
} }
end end

@ -3,7 +3,7 @@ local M = {}
function M.get(cp) function M.get(cp)
return { return {
HopNextKey = { bg = cp.base, fg = cp.peach, style = { "bold", "underline" } }, HopNextKey = { bg = cp.base, fg = cp.peach, style = { "bold", "underline" } },
HopNextKey1 = { bg = cp.base, fg = cp.blue, style = "bold" }, HopNextKey1 = { bg = cp.base, fg = cp.blue, style = { "bold" } },
HopNextKey2 = { bg = cp.base, fg = cp.teal, style = { "bold", "italic" } }, HopNextKey2 = { bg = cp.base, fg = cp.teal, style = { "bold", "italic" } },
HopUnmatched = { bg = cp.base, fg = cp.overlay0 }, HopUnmatched = { bg = cp.base, fg = cp.overlay0 },
} }

@ -31,7 +31,7 @@ function M.get(cp)
LeapLabelPrimary = {bg = cp.surface1, fg = cp.text}, LeapLabelPrimary = {bg = cp.surface1, fg = cp.text},
LeapLabelSecondary = {bg = cp.surface1, fg = cp.text}, LeapLabelSecondary = {bg = cp.surface1, fg = cp.text},
LeapBackdrop = {bg = cp.base, fg = cp.overlay0}, LeapBackdrop = {bg = cp.base, fg = cp.overlay0},
LeapMatch = {bg = cp.base, fg = cp.red, style = "underline"}, LeapMatch = {bg = cp.base, fg = cp.red, style = { "underline" }},
} }
end end

@ -28,15 +28,15 @@ function M.get(cp)
LightspeedOverlapped = {bg = cp.surface1, fg = cp.text}, LightspeedOverlapped = {bg = cp.surface1, fg = cp.text},
LightspeedLabelDistant = {bg = cp.mauve, fg = cp.text}, LightspeedLabelDistant = {bg = cp.mauve, fg = cp.text},
LightspeedLabelDistantOverlapped = {bg = cp.mauve, fg = cp.text}, LightspeedLabelDistantOverlapped = {bg = cp.mauve, fg = cp.text},
LightspeedShortcut = {bg = cp.base, fg = cp.peach, style = "italic"}, LightspeedShortcut = {bg = cp.base, fg = cp.peach, style = { "italic" }},
LightspeedShortcutOverlapped = {bg = cp.base, fg = cp.peach, style = "bold"}, LightspeedShortcutOverlapped = {bg = cp.base, fg = cp.peach, style = { "bold" }},
LightspeedMaskedChar = {bg = cp.base, fg = cp.red, style = "undercurl"}, LightspeedMaskedChar = {bg = cp.base, fg = cp.red, style = { "undercurl" }},
LightspeedGreyWash = {bg = cp.base, fg = cp.overlay0}, LightspeedGreyWash = {bg = cp.base, fg = cp.overlay0},
LightspeedUnlabeledMatch = {bg = cp.base, fg = cp.red, style = "underline"}, LightspeedUnlabeledMatch = {bg = cp.base, fg = cp.red, style = { "underline" }},
LightspeedOneCharMatch = {bg = cp.base, fg = cp.red, style = "underline"}, LightspeedOneCharMatch = {bg = cp.base, fg = cp.red, style = { "underline" }},
LightspeedUniqueChar = {bg = cp.base, fg = cp.green, style = "strikethrough"}, LightspeedUniqueChar = {bg = cp.base, fg = cp.green, style = { "strikethrough" }},
LightspeedPendingOpArea = {bg = cp.base, fg = cp.green, style = "strikethrough"}, LightspeedPendingOpArea = {bg = cp.base, fg = cp.green, style = { "strikethrough" }},
LightspeedPendingChangeOpArea = {bg = cp.base, fg = cp.green, style = "strikethrough"}, LightspeedPendingChangeOpArea = {bg = cp.base, fg = cp.green, style = { "strikethrough" }},
LightspeedCursor = {fg = cp.base, bg = cp.text}, LightspeedCursor = {fg = cp.base, bg = cp.text},
} }
end end

@ -2,10 +2,10 @@ local M = {}
function M.get(cp) function M.get(cp)
return { return {
markdownHeadingDelimiter = { fg = cp.peach, style = "bold" }, markdownHeadingDelimiter = { fg = cp.peach, style = { "bold" } },
markdownCode = { fg = cp.flamingo }, markdownCode = { fg = cp.flamingo },
markdownCodeBlock = { fg = cp.flamingo }, markdownCodeBlock = { fg = cp.flamingo },
markdownLinkText = { fg = cp.blue, style = "underline" }, markdownLinkText = { fg = cp.blue, style = { "underline" } },
markdownH1 = { fg = cp.lavender }, markdownH1 = { fg = cp.lavender },
markdownH2 = { fg = cp.mauve }, markdownH2 = { fg = cp.mauve },
markdownH3 = { fg = cp.green }, markdownH3 = { fg = cp.green },

@ -7,20 +7,20 @@ function M.get(cp)
local inactive_bg = transparent_background and "NONE" or cp.mantle local inactive_bg = transparent_background and "NONE" or cp.mantle
return { return {
MiniCompletionActiveParameter = { style = "underline" }, MiniCompletionActiveParameter = { style = { "underline" } },
MiniCursorword = { style = "underline" }, MiniCursorword = { style = { "underline" } },
MiniCursorwordCurrent = { style = "underline" }, MiniCursorwordCurrent = { style = { "underline" } },
MiniIndentscopeSymbol = { fg = cp.text }, MiniIndentscopeSymbol = { fg = cp.text },
MiniIndentscopePrefix = { style = "nocombine" }, -- Make it invisible MiniIndentscopePrefix = { style = { "nocombine" } }, -- Make it invisible
MiniJump = { fg = cp.overlay2, bg = cp.pink }, MiniJump = { fg = cp.overlay2, bg = cp.pink },
MiniJump2dSpot = { bg = cp.base, fg = cp.peach, style = { "bold", "underline" } }, MiniJump2dSpot = { bg = cp.base, fg = cp.peach, style = { "bold", "underline" } },
MiniStarterCurrent = {}, MiniStarterCurrent = {},
MiniStarterFooter = { fg = cp.yellow, style = "italic" }, MiniStarterFooter = { fg = cp.yellow, style = { "italic" } },
MiniStarterHeader = { fg = cp.blue }, MiniStarterHeader = { fg = cp.blue },
MiniStarterInactive = { fg = cp.surface2, style = cnf.styles.comments }, MiniStarterInactive = { fg = cp.surface2, style = cnf.styles.comments },
MiniStarterItem = { fg = cp.text }, MiniStarterItem = { fg = cp.text },
@ -33,12 +33,12 @@ function M.get(cp)
MiniStatuslineFileinfo = { fg = cp.subtext1, bg = cp.surface1 }, MiniStatuslineFileinfo = { fg = cp.subtext1, bg = cp.surface1 },
MiniStatuslineFilename = { fg = cp.text, bg = cp.mantle }, MiniStatuslineFilename = { fg = cp.text, bg = cp.mantle },
MiniStatuslineInactive = { fg = cp.blue, bg = cp.mantle }, MiniStatuslineInactive = { fg = cp.blue, bg = cp.mantle },
MiniStatuslineModeCommand = { fg = cp.base, bg = cp.peach, style = "bold" }, MiniStatuslineModeCommand = { fg = cp.base, bg = cp.peach, style = { "bold" } },
MiniStatuslineModeInsert = { fg = cp.base, bg = cp.green, style = "bold" }, MiniStatuslineModeInsert = { fg = cp.base, bg = cp.green, style = { "bold" } },
MiniStatuslineModeNormal = { fg = cp.mantle, bg = cp.blue, style = "bold" }, MiniStatuslineModeNormal = { fg = cp.mantle, bg = cp.blue, style = { "bold" } },
MiniStatuslineModeOther = { fg = cp.base, bg = cp.teal, style = "bold" }, MiniStatuslineModeOther = { fg = cp.base, bg = cp.teal, style = { "bold" } },
MiniStatuslineModeReplace = { fg = cp.base, bg = cp.red, style = "bold" }, MiniStatuslineModeReplace = { fg = cp.base, bg = cp.red, style = { "bold" } },
MiniStatuslineModeVisual = { fg = cp.base, bg = cp.mauve, style = "bold" }, MiniStatuslineModeVisual = { fg = cp.base, bg = cp.mauve, style = { "bold" } },
MiniSurround = { bg = cp.pink, fg = cp.surface1 }, MiniSurround = { bg = cp.pink, fg = cp.surface1 },
@ -51,9 +51,9 @@ function M.get(cp)
MiniTablineTabpagesection = { fg = cp.surface1, bg = cp.base }, MiniTablineTabpagesection = { fg = cp.surface1, bg = cp.base },
MiniTablineVisible = { fg = cp.subtext1, bg = cp.surface1 }, MiniTablineVisible = { fg = cp.subtext1, bg = cp.surface1 },
MiniTestEmphasis = { style = "bold" }, MiniTestEmphasis = { style = { "bold" } },
MiniTestFail = { fg = cp.red, style = "bold" }, MiniTestFail = { fg = cp.red, style = { "bold" } },
MiniTestPass = { fg = cp.green, style = "bold" }, MiniTestPass = { fg = cp.green, style = { "bold" } },
MiniTrailspace = { bg = cp.red }, MiniTrailspace = { bg = cp.red },
} }

@ -15,7 +15,7 @@ function M.get(cp)
NeoTreeDirectoryIcon = { fg = cp.blue }, NeoTreeDirectoryIcon = { fg = cp.blue },
NeoTreeNormal = { fg = cp.text, bg = neotree.transparent_panel and "NONE" or cp.mantle }, NeoTreeNormal = { fg = cp.text, bg = neotree.transparent_panel and "NONE" or cp.mantle },
NeoTreeIndentMarker = { fg = cp.overlay0 }, NeoTreeIndentMarker = { fg = cp.overlay0 },
NeoTreeRootName = { fg = root_dir_color, style = "bold" }, NeoTreeRootName = { fg = root_dir_color, style = { "bold" } },
NeoTreeSymbolicLinkTarget = { fg = cp.pink }, NeoTreeSymbolicLinkTarget = { fg = cp.pink },
NeoTreeGitModified = { fg = cp.yellow }, NeoTreeGitModified = { fg = cp.yellow },
NeoTreeUntracked = { fg = cp.blue }, NeoTreeUntracked = { fg = cp.blue },

@ -4,19 +4,19 @@ function M.get(cp)
return { return {
NotifyERRORBorder = { fg = cp.red }, NotifyERRORBorder = { fg = cp.red },
NotifyERRORIcon = { fg = cp.red }, NotifyERRORIcon = { fg = cp.red },
NotifyERRORTitle = { fg = cp.red, style = "italic" }, NotifyERRORTitle = { fg = cp.red, style = { "italic" } },
NotifyWARNBorder = { fg = cp.yellow }, NotifyWARNBorder = { fg = cp.yellow },
NotifyWARNIcon = { fg = cp.yellow }, NotifyWARNIcon = { fg = cp.yellow },
NotifyWARNTitle = { fg = cp.yellow, style = "italic" }, NotifyWARNTitle = { fg = cp.yellow, style = { "italic" } },
NotifyINFOBorder = { fg = cp.blue }, NotifyINFOBorder = { fg = cp.blue },
NotifyINFOIcon = { fg = cp.blue }, NotifyINFOIcon = { fg = cp.blue },
NotifyINFOTitle = { fg = cp.blue, style = "italic" }, NotifyINFOTitle = { fg = cp.blue, style = { "italic" } },
NotifyDEBUGBorder = { fg = cp.peach }, NotifyDEBUGBorder = { fg = cp.peach },
NotifyDEBUGIcon = { fg = cp.peach }, NotifyDEBUGIcon = { fg = cp.peach },
NotifyDEBUGTitle = { fg = cp.peach, style = "italic" }, NotifyDEBUGTitle = { fg = cp.peach, style = { "italic" } },
NotifyTRACEBorder = { fg = cp.rosewater }, NotifyTRACEBorder = { fg = cp.rosewater },
NotifyTRACEIcon = { fg = cp.rosewater }, NotifyTRACEIcon = { fg = cp.rosewater },
NotifyTRACETitle = { fg = cp.rosewater, style = "italic" }, NotifyTRACETitle = { fg = cp.rosewater, style = { "italic" } },
} }
end end

@ -18,7 +18,7 @@ function M.get(cp)
NvimTreeEmptyFolderName = { fg = cp.blue }, NvimTreeEmptyFolderName = { fg = cp.blue },
NvimTreeIndentMarker = { fg = cp.overlay0 }, NvimTreeIndentMarker = { fg = cp.overlay0 },
NvimTreeVertSplit = { fg = cp.base, bg = cp.base }, NvimTreeVertSplit = { fg = cp.base, bg = cp.base },
NvimTreeRootFolder = { fg = root_dir_color, style = "bold" }, NvimTreeRootFolder = { fg = root_dir_color, style = { "bold" } },
NvimTreeSymlink = { fg = cp.pink }, NvimTreeSymlink = { fg = cp.pink },
NvimTreeStatuslineNc = { fg = cp.mantle, bg = cp.mantle }, NvimTreeStatuslineNc = { fg = cp.mantle, bg = cp.mantle },
NvimTreeGitDirty = { fg = cp.yellow }, NvimTreeGitDirty = { fg = cp.yellow },

@ -4,7 +4,7 @@ function M.get(cp)
return { return {
TelescopeBorder = { fg = cp.blue }, TelescopeBorder = { fg = cp.blue },
TelescopeSelectionCaret = { fg = cp.flamingo }, TelescopeSelectionCaret = { fg = cp.flamingo },
TelescopeSelection = { fg = cp.text, bg = cp.surface0, style = "bold" }, TelescopeSelection = { fg = cp.text, bg = cp.surface0, style = { "bold" } },
TelescopeMatching = { fg = cp.blue }, TelescopeMatching = { fg = cp.blue },
TelescopePromptPrefix = { bg = cp.crust }, TelescopePromptPrefix = { bg = cp.crust },
TelescopePromptNormal = { bg = cp.crust}, TelescopePromptNormal = { bg = cp.crust},

@ -14,38 +14,38 @@ function M.get(cp)
-- TSError -> Error for example, so you do not have to define these unless -- TSError -> Error for example, so you do not have to define these unless
-- you explicitly want to support Treesitter's improved syntax awareness. -- you explicitly want to support Treesitter's improved syntax awareness.
TSField = { fg = cp.teal }, -- For fields. TSField = { fg = cp.teal }, -- For fields.
TSProperty = { fg = cp.teal, style = cnf.styles.properties or "NONE" }, -- Same as TSField. TSProperty = { fg = cp.teal, style = cnf.styles.properties or {} }, -- Same as TSField.
TSInclude = { fg = cp.mauve, style = cnf.styles.keywords or "NONE" }, -- For includes: #include in C, use or extern crate in Rust, or require in Lua. TSInclude = { fg = cp.mauve, style = cnf.styles.keywords or {} }, -- For includes: #include in C, use or extern crate in Rust, or require in Lua.
TSOperator = { fg = operators, style = cnf.styles.operators or "NONE" }, -- For any operator: +, but also -> and * in cp. TSOperator = { fg = operators, style = cnf.styles.operators or {} }, -- For any operator: +, but also -> and * in cp.
TSKeywordOperator = { fg = cp.mauve, style = cnf.styles.operators or "NONE" }, -- For new keyword operator TSKeywordOperator = { fg = cp.mauve, style = cnf.styles.operators or {} }, -- For new keyword operator
TSPunctSpecial = { fg = cp.sky, style = cnf.styles.operators or "NONE" }, -- For special punctutation that does not fall in the catagories before. TSPunctSpecial = { fg = cp.sky, style = cnf.styles.operators or {} }, -- For special punctutation that does not fall in the catagories before.
TSFloat = { fg = math_logic, style = cnf.styles.numbers or "NONE" }, -- For floats. TSFloat = { fg = math_logic, style = cnf.styles.numbers or {} }, -- For floats.
TSNumber = { fg = math_logic, style = cnf.styles.numbers or "NONE" }, -- For all numbers TSNumber = { fg = math_logic, style = cnf.styles.numbers or {} }, -- For all numbers
TSBoolean = { fg = math_logic, style = cnf.styles.booleans or "NONE" }, -- For booleans. TSBoolean = { fg = math_logic, style = cnf.styles.booleans or {} }, -- For booleans.
TSConstructor = { fg = cp.sapphire }, -- For constructor calls and definitions: = { } in Lua, and Java constructors. TSConstructor = { fg = cp.sapphire }, -- For constructor calls and definitions: = { } in Lua, and Java constructors.
TSConstant = { fg = cp.peach }, -- For constants TSConstant = { fg = cp.peach }, -- For constants
TSConditional = { fg = cl, style = cnf.styles.conditionals or "NONE" }, -- For keywords related to conditionnals. TSConditional = { fg = cl, style = cnf.styles.conditionals or {} }, -- For keywords related to conditionnals.
TSRepeat = { fg = cl, style = cnf.styles.loops or "NONE" }, -- For keywords related to loops. TSRepeat = { fg = cl, style = cnf.styles.loops or {} }, -- For keywords related to loops.
TSException = { fg = cp.mauve, style = cnf.styles.keywords or "NONE" }, -- For exception related keywords. TSException = { fg = cp.mauve, style = cnf.styles.keywords or {} }, -- For exception related keywords.
-- builtin -- builtin
TSConstBuiltin = { fg = cp.peach, style = cnf.styles.keywords or "NONE" }, -- For constant that are built in the language: nil in Lua. TSConstBuiltin = { fg = cp.peach, style = cnf.styles.keywords or {} }, -- For constant that are built in the language: nil in Lua.
TSFuncBuiltin = { fg = cp.peach, style = cnf.styles.functions or "NONE" }, -- For builtin functions: table.insert in Lua. TSFuncBuiltin = { fg = cp.peach, style = cnf.styles.functions or {} }, -- For builtin functions: table.insert in Lua.
TSNamespace = { fg = cp.blue, style = "italic" }, -- For identifiers referring to modules and namespaces. TSNamespace = { fg = cp.blue, style = { "italic" } }, -- For identifiers referring to modules and namespaces.
TSType = { fg = cp.yellow, style = cnf.styles.types or "NONE" }, -- For types. TSType = { fg = cp.yellow, style = cnf.styles.types or {} }, -- For types.
TSTypeBuiltin = { fg = cp.yellow, style = cnf.styles.properties or "italic" }, -- For builtin types. TSTypeBuiltin = { fg = cp.yellow, style = cnf.styles.properties or "italic" }, -- For builtin types.
TSVariableBuiltin = { fg = cp.red }, -- Variable names that are defined by the languages, like this or self. TSVariableBuiltin = { fg = cp.red }, -- Variable names that are defined by the languages, like this or self.
TSFunction = { fg = cp.blue, style = cnf.styles.functions or "NONE" }, -- For function (calls and definitions). TSFunction = { fg = cp.blue, style = cnf.styles.functions or {} }, -- For function (calls and definitions).
TSFuncMacro = { fg = cp.teal, style = cnf.styles.functions or "NONE" }, -- For macro defined functions (calls and definitions): each macro_rules in Ruscp. TSFuncMacro = { fg = cp.teal, style = cnf.styles.functions or {} }, -- For macro defined functions (calls and definitions): each macro_rules in Ruscp.
TSParameter = { fg = cp.maroon, style = "italic" }, -- For parameters of a function. TSParameter = { fg = cp.maroon, style = { "italic" } }, -- For parameters of a function.
TSKeywordFunction = { fg = cp.mauve, style = cnf.styles.keywords or "NONE" }, -- For keywords used to define a fuction. TSKeywordFunction = { fg = cp.mauve, style = cnf.styles.keywords or {} }, -- For keywords used to define a fuction.
TSKeyword = { fg = keywords, style = cnf.styles.keywords or "NONE" }, -- For keywords that don't fall in previous categories. TSKeyword = { fg = keywords, style = cnf.styles.keywords or {} }, -- For keywords that don't fall in previous categories.
TSKeywordReturn = { fg = cp.mauve, style = cnf.styles.keywords or "NONE" }, TSKeywordReturn = { fg = cp.mauve, style = cnf.styles.keywords or {} },
-- TSAnnotation = { }; -- For C++/Dart attributes, annotations that can be attached to the code to denote some kind of meta information. -- TSAnnotation = { }; -- For C++/Dart attributes, annotations that can be attached to the code to denote some kind of meta information.
-- TSAttribute = { }; -- (unstable) TODO: docs -- TSAttribute = { }; -- (unstable) TODO: docs
-- TSCharacter = { }; -- For characters. -- TSCharacter = { }; -- For characters.
@ -57,18 +57,18 @@ function M.get(cp)
-- TSError = { fg = cp.red }, -- For syntax/parser errors. -- TSError = { fg = cp.red }, -- For syntax/parser errors.
-- rustTSField = { fg = cp.surface1 }, -- For fields. -- rustTSField = { fg = cp.surface1 }, -- For fields.
TSLabel = { fg = cp.sapphire }, -- For labels: label: in C and :label: in Lua. 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. TSMethod = { fg = cp.blue, style = cnf.styles.functions or {} }, -- For method calls and definitions.
-- TSNone = { }; -- TODO: docs -- TSNone = { }; -- TODO: docs
-- TSParameterReference= { }; -- For references to parameters of a function. -- TSParameterReference= { }; -- For references to parameters of a function.
tomlTSProperty = { fg = cp.blue }, -- Differentiates between string and properties tomlTSProperty = { fg = cp.blue }, -- Differentiates between string and properties
TSPunctDelimiter = { fg = cp.overlay2 }, -- For delimiters ie: . TSPunctDelimiter = { fg = cp.overlay2 }, -- For delimiters ie: .
-- TSPunctBracket = { fg = delimeters }, -- For brackets and parenthesis. -- TSPunctBracket = { fg = delimeters }, -- For brackets and parenthesis.
TSPunctBracket = { fg = cp.overlay2 }, -- For brackets and parenthesis. TSPunctBracket = { fg = cp.overlay2 }, -- For brackets and parenthesis.
TSString = { fg = cp.green, style = cnf.styles.strings or "NONE" }, -- For strings. TSString = { fg = cp.green, style = cnf.styles.strings or {} }, -- For strings.
TSStringRegex = { fg = cp.peach, style = cnf.styles.strings or "NONE" }, -- For regexes. TSStringRegex = { fg = cp.peach, style = cnf.styles.strings or {} }, -- For regexes.
-- TSSymbol = { }; -- For identifiers referring to symbols or atoms. -- TSSymbol = { }; -- For identifiers referring to symbols or atoms.
TSVariable = { fg = cp.text, style = cnf.styles.variables or "NONE" }, -- Any variable name that does not have another highlighcp. TSVariable = { fg = cp.text, style = cnf.styles.variables or {} }, -- Any variable name that does not have another highlighcp.
TSTagAttribute = { fg = cp.teal, style = "italic" }, -- Tags like html tag names. TSTagAttribute = { fg = cp.teal, style = { "italic" } }, -- Tags like html tag names.
TSTag = { fg = cp.mauve }, -- Tags like html tag names. TSTag = { fg = cp.mauve }, -- Tags like html tag names.
TSTagDelimiter = { fg = cp.sky }, -- Tag delimiter like < > / TSTagDelimiter = { fg = cp.sky }, -- Tag delimiter like < > /
TSText = { fg = cp.text }, -- For strings considerated text in a markup language. TSText = { fg = cp.text }, -- For strings considerated text in a markup language.
@ -81,16 +81,16 @@ function M.get(cp)
-- --
-- Markdown tresitter parser support -- Markdown tresitter parser support
TSURI = { fg = cp.rosewater, style = { "italic", "underline" } }, -- urls, links and emails TSURI = { fg = cp.rosewater, style = { "italic", "underline" } }, -- urls, links and emails
TSLiteral = { fg = cp.teal, style = "italic" }, -- used for inline code in markdown and for doc in python (""") TSLiteral = { fg = cp.teal, style = { "italic" } }, -- used for inline code in markdown and for doc in python (""")
TSTextReference = { fg = cp.lavender, style = "bold" }, -- references TSTextReference = { fg = cp.lavender, style = { "bold" } }, -- references
TSTitle = { fg = cp.blue, style = "bold" }, -- titles like: # Example TSTitle = { fg = cp.blue, style = { "bold" } }, -- titles like: # Example
TSEmphasis = { fg = cp.maroon, style = "italic" }, -- bold TSEmphasis = { fg = cp.maroon, style = { "italic" } }, -- bold
TSStrong = { fg = cp.maroon, style = "bold" }, -- italic TSStrong = { fg = cp.maroon, style = { "bold" } }, -- italic
TSStringEscape = { fg = cp.pink, style = cnf.styles.strings }, -- For escape characters within a string. TSStringEscape = { fg = cp.pink, style = cnf.styles.strings }, -- For escape characters within a string.
-- bash -- bash
-- bashTSFuncBuiltin = { fg = cp.red, style = "italic" }, -- bashTSFuncBuiltin = { fg = cp.red, style = { "italic" } },
-- bashTSParameter = { fg = cp.yellow, style = "italic" }, -- bashTSParameter = { fg = cp.yellow, style = { "italic" } },
-- json -- json
jsonTSLabel = { fg = cp.blue }, -- For labels: label: in C and :label: in Lua. jsonTSLabel = { fg = cp.blue }, -- For labels: label: in C and :label: in Lua.

@ -43,8 +43,8 @@ local function get_base()
Substitute = { bg = cp.surface1, fg = cp.pink }, -- |:substitute| replacement text highlighting Substitute = { bg = cp.surface1, fg = cp.pink }, -- |:substitute| replacement text highlighting
LineNr = { fg = ucolors.vary_color({ latte = cp.base0 }, cp.surface1) }, -- Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is secp. LineNr = { fg = ucolors.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. 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| 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.text, style = "bold" }, -- 'showmode' message (e.g., "-- INSERT -- ") ModeMsg = { fg = cp.text, style = { "bold" } }, -- 'showmode' message (e.g., "-- INSERT -- ")
MsgArea = { fg = cp.text }, -- Area for messages and cmdline MsgArea = { fg = cp.text }, -- Area for messages and cmdline
MsgSeparator = {}, -- Separator for scrolled messages, `msgsep` flag of 'display' MsgSeparator = {}, -- Separator for scrolled messages, `msgsep` flag of 'display'
MoreMsg = { fg = cp.blue }, -- |more-prompt| MoreMsg = { fg = cp.blue }, -- |more-prompt|
@ -61,27 +61,27 @@ local function get_base()
NormalFloat = { fg = cp.text, bg = cp.mantle }, -- Normal text in floating windows. NormalFloat = { fg = cp.text, bg = cp.mantle }, -- Normal text in floating windows.
FloatBorder = { fg = cp.blue }, FloatBorder = { fg = cp.blue },
Pmenu = { bg = cp.surface0, fg = cp.overlay2 }, -- Popup menu: normal item. Pmenu = { bg = cp.surface0, fg = cp.overlay2 }, -- Popup menu: normal item.
PmenuSel = { fg = cp.text, bg = cp.surface1, style = "bold" }, -- Popup menu: selected item. PmenuSel = { fg = cp.text, bg = cp.surface1, style = { "bold" } }, -- Popup menu: selected item.
PmenuSbar = { bg = cp.surface1 }, -- Popup menu: scrollbar. PmenuSbar = { bg = cp.surface1 }, -- Popup menu: scrollbar.
PmenuThumb = { bg = cp.overlay0 }, -- Popup menu: Thumb of the scrollbar. PmenuThumb = { bg = cp.overlay0 }, -- Popup menu: Thumb of the scrollbar.
Question = { fg = cp.blue }, -- |hit-enter| prompt and yes/no questions Question = { fg = cp.blue }, -- |hit-enter| prompt and yes/no questions
QuickFixLine = { bg = cp.surface1, style = "bold" }, -- Current |quickfix| item in the quickfix window. Combined with |hl-CursorLine| when the cursor is there. QuickFixLine = { bg = cp.surface1, style = { "bold" } }, -- Current |quickfix| item in the quickfix window. Combined with |hl-CursorLine| when the cursor is there.
Search = { bg = ucolors.darken(cp.sky, 0.30, cp.base), fg = cp.text }, -- Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand oucp. Search = { bg = ucolors.darken(cp.sky, 0.30, cp.base), fg = cp.text }, -- Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand oucp.
IncSearch = { bg = ucolors.darken(cp.sky, 0.90, cp.base), fg = cp.mantle }, -- 'incsearch' highlighting; also used for the text replaced with ":s///c" IncSearch = { bg = ucolors.darken(cp.sky, 0.90, cp.base), fg = cp.mantle }, -- 'incsearch' highlighting; also used for the text replaced with ":s///c"
CurSearch = { bg = cp.red, fg = cp.mantle }, -- 'cursearch' highlighting: highlights the current search you're on differently CurSearch = { bg = cp.red, fg = cp.mantle }, -- 'cursearch' highlighting: highlights the current search you're on differently
SpecialKey = { fg = cp.text }, -- Unprintable characters: text displayed differently from what it really is. But not 'listchars' textspace. |hl-Whitespace| 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. 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. 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. 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. 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.text, bg = cp.mantle }, -- status line of current window StatusLine = { fg = cp.text, bg = cp.mantle }, -- status line of current window
StatusLineNC = { fg = cp.surface1, bg = cp.mantle }, -- status lines of not-current windows Note: if this is equal to "StatusLine" Vim will use "^^^" in the status line of the current window. StatusLineNC = { fg = cp.surface1, bg = cp.mantle }, -- 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.mantle, fg = cp.surface1 }, -- tab pages line, not active tab page label TabLine = { bg = cp.mantle, fg = cp.surface1 }, -- tab pages line, not active tab page label
TabLineFill = { bg = cp.black }, -- tab pages line, where there are no labels TabLineFill = { bg = cp.black }, -- tab pages line, where there are no labels
TabLineSel = { fg = cp.green, bg = cp.surface1 }, -- 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. Title = { fg = cp.blue, style = { "bold" } }, -- titles for output from ":set all", ":autocmd" etcp.
Visual = { bg = cp.surface1, style = "bold" }, -- Visual mode 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". VisualNOS = { bg = cp.surface1, style = { "bold" } }, -- Visual mode selection when vim is "Not Owning the Selection".
WarningMsg = { fg = cp.yellow }, -- warning messages WarningMsg = { fg = cp.yellow }, -- warning messages
Whitespace = { fg = cp.surface1 }, -- "nbsp", "space", "tab" and "trail" in 'listchars' Whitespace = { fg = cp.surface1 }, -- "nbsp", "space", "tab" and "trail" in 'listchars'
WildMenu = { bg = cp.overlay0 }, -- current match in 'wildmenu' completion WildMenu = { bg = cp.overlay0 }, -- current match in 'wildmenu' completion
@ -127,24 +127,24 @@ local function get_base()
-- Specialoverlay0= { }, -- special things inside a overlay0 -- Specialoverlay0= { }, -- special things inside a overlay0
-- Debug = { }, -- debugging statements -- Debug = { }, -- debugging statements
Underlined = { style = "underline" }, -- (preferred) text that stands out, HTML links Underlined = { style = { "underline" } }, -- (preferred) text that stands out, HTML links
Bold = { style = "bold" }, Bold = { style = { "bold" } },
Italic = { style = "italic" }, Italic = { style = { "italic" } },
-- ("Ignore", below, may be invisible...) -- ("Ignore", below, may be invisible...)
-- Ignore = { }, -- (preferred) left blank, hidden |hl-Ignore| -- Ignore = { }, -- (preferred) left blank, hidden |hl-Ignore|
Error = { fg = cp.red }, -- (preferred) any erroneous construct Error = { fg = cp.red }, -- (preferred) any erroneous construct
Todo = { bg = cp.yellow, fg = cp.base, style = "bold" }, -- (preferred) anything that needs extra attention; mostly the keywords TODO FIXME and XXX Todo = { bg = cp.yellow, fg = cp.base, style = { "bold" } }, -- (preferred) anything that needs extra attention; mostly the keywords TODO FIXME and XXX
qfLineNr = { fg = cp.yellow }, qfLineNr = { fg = cp.yellow },
qfFileName = { fg = cp.blue }, qfFileName = { fg = cp.blue },
htmlH1 = { fg = cp.pink, style = "bold" }, htmlH1 = { fg = cp.pink, style = { "bold" } },
htmlH2 = { fg = cp.blue, style = "bold" }, htmlH2 = { fg = cp.blue, style = { "bold" } },
-- mkdHeading = { fg = cp.peach, style = "bold" }, -- mkdHeading = { fg = cp.peach, style = { "bold" } },
-- mkdCode = { bg = cp.terminal_black, fg = cp.text }, -- mkdCode = { bg = cp.terminal_black, fg = cp.text },
mkdCodeDelimiter = { bg = cp.base, fg = cp.text }, mkdCodeDelimiter = { bg = cp.base, fg = cp.text },
mkdCodeStart = { fg = cp.flamingo, style = "bold" }, mkdCodeStart = { fg = cp.flamingo, style = { "bold" } },
mkdCodeEnd = { fg = cp.flamingo, style = "bold" }, mkdCodeEnd = { fg = cp.flamingo, style = { "bold" } },
-- mkdLink = { fg = cp.blue, style = "underline" }, -- mkdLink = { fg = cp.blue, style = { "underline" } },
-- debugging -- debugging
debugPC = { bg = cp.crust }, -- used for highlighting the current line in terminal-debug debugPC = { bg = cp.crust }, -- used for highlighting the current line in terminal-debug

@ -11,26 +11,19 @@ function util.highlight(group, color)
}) })
else else
if color.style then if color.style then
if color.style ~= "NONE" then for _, style in ipairs(color.style) do
if type(color.style) == "table" then color[style] = true
for _, style in ipairs(color.style) do
color[style] = true
end
else
color[color.style] = true
end
end end
end end
color.style = nil color.style = nil
vim.api.nvim_set_hl(0, group, color) vim.api.nvim_set_hl(0, group, color)
end end
else else -- Doc: :h highlight-gui
-- Doc: :h highlight-gui if color.style then
if color.style and type(color.style) == "table" then
color.style = table.concat(color.style, ",") color.style = table.concat(color.style, ",")
end end
local style = color.style and "gui=" .. color.style or "gui=NONE" local style = (color.style and color.style ~= "") and "gui=" .. color.style or "gui=NONE"
local fg = color.fg and "guifg=" .. color.fg or "guifg=NONE" local fg = color.fg and "guifg=" .. color.fg or "guifg=NONE"
local bg = color.bg and "guibg=" .. color.bg or "guibg=NONE" local bg = color.bg and "guibg=" .. color.bg or "guibg=NONE"
local sp = color.sp and "guisp=" .. color.sp or "" local sp = color.sp and "guisp=" .. color.sp or ""

Loading…
Cancel
Save