montreal.nvim/colors/montreal.lua

947 lines
39 KiB
Lua

-- settings based on: https://github.com/navarasu/onedark.nvim
local vim = vim -- assign global "vim" to prevent a lot of warnings
vim.o.termguicolors = true
vim.g.colors_name = "montreal"
-- CONFIGURATION
local transparent = true; -- whether to use a transparent background
local ending_tildes = false -- whether to show tildes (~) at the end of a buffer
-- possible font_style_* values: "none" or a comma separated combination of :h highlight-args
local font_style_comments = "italic"
local font_style_keywords = "none"
local font_style_functions = "none"
local font_style_strings = "none"
local font_style_variables = "none"
local invert_item_kind_icon_highlights_in_cmp_menu = false
-- COLORS
local none = "none"
local bg_darker = "#101018"
local bg_dark = "#1D1D2B"
local bg_normal = "#29293D"
local bg_light = "#353550"
local fg_darker = "#7575A3"
local fg_dark = "#A3A3C2"
local fg_normal = "#D1D1E0"
local fg_light = "#FFFFFF"
local red = "#FF5555"
local orange = "#FF8822"
local yellow = "#FFBB00"
local green = "#44BB44"
local cyan = "#44BBFF"
local blue = "#0099FF"
local violet = "#7788FF"
local purple = "#BB88FF"
local red_dark = "#DD2222"
--local orange_dark = "#CC4400"
local yellow_dark = "#AA6600"
local green_dark = "#228822"
local cyan_dark = "#334455"
local blue_dark = "#0066FF"
--local purple_dark = "#8855DD"
-- TERMINAL (darker shades)
vim.g.terminal_color_0 = fg_darker
vim.g.terminal_color_1 = red
vim.g.terminal_color_2 = violet
vim.g.terminal_color_3 = yellow
vim.g.terminal_color_4 = blue
vim.g.terminal_color_5 = purple
vim.g.terminal_color_6 = green
vim.g.terminal_color_7 = cyan
-- (lighter shades)
vim.g.terminal_color_8 = fg_darker
vim.g.terminal_color_9 = red
vim.g.terminal_color_10 = violet
vim.g.terminal_color_11 = yellow
vim.g.terminal_color_12 = blue
vim.g.terminal_color_13 = purple
vim.g.terminal_color_14 = green
vim.g.terminal_color_15 = cyan
-- HELPER FUNCTION TO SET HIGHLIGHT GROUPS
local function set_highlight_groups(highlight_groups)
for group_name, group_values in pairs(highlight_groups) do
vim.api.nvim_command(string.format("highlight %s guifg=%s guibg=%s guisp=%s gui=%s", group_name,
group_values.fg or "none",
group_values.bg or "none",
group_values.sp or "none",
group_values.fmt or "none"))
end
end
-- COMMON HIGHLIGHTS
local common_highlights = {
Normal = { fg = fg_normal, bg = transparent and none or bg_normal },
Terminal = { fg = fg_normal, bg = transparent and none or bg_normal },
EndOfBuffer = { fg = ending_tildes and bg_light or bg_normal, bg = transparent and none or bg_normal },
FoldColumn = { fg = fg_normal, bg = transparent and none or bg_normal },
Folded = { fg = fg_normal, bg = transparent and none or bg_normal },
SignColumn = { fg = fg_normal, bg = transparent and none or bg_normal },
ToolbarLine = { fg = fg_normal },
Cursor = { fmt = "reverse" },
vCursor = { fmt = "reverse" },
iCursor = { fmt = "reverse" },
lCursor = { fmt = "reverse" },
CursorIM = { fmt = "reverse" },
CursorColumn = { bg = bg_normal },
CursorLine = { bg = bg_light },
ColorColumn = { bg = bg_normal },
CursorLineNr = { fg = fg_normal },
LineNr = { fg = fg_darker },
Conceal = { fg = fg_dark, bg = bg_normal },
DiffAdd = { fg = none, bg = green_dark },
DiffChange = { fg = none, bg = yellow_dark },
DiffDelete = { fg = none, bg = red_dark },
DiffText = { fg = none, bg = blue_dark },
DiffAdded = { fg = green },
DiffRemoved = { fg = red },
DiffFile = { fg = cyan },
DiffIndexLine = { fg = fg_dark },
Directory = { fg = fg_dark },
ErrorMsg = { fg = red, fmt = "bold" },
WarningMsg = { fg = yellow, fmt = "bold" },
MoreMsg = { fg = blue, fmt = "bold" },
CurSearch = { fg = bg_dark, bg = green },
IncSearch = { fg = bg_dark, bg = green },
Search = { fg = bg_dark, bg = green_dark },
Substitute = { fg = bg_dark, bg = green },
MatchParen = { fg = none, fmt = "underline" },
NonText = { fg = fg_dark },
Whitespace = { fg = fg_dark },
SpecialKey = { fg = fg_dark },
Pmenu = { fg = fg_dark, bg = bg_dark },
PmenuSbar = { bg = bg_dark }, -- scroll bar rail
PmenuThumb = { bg = bg_light }, -- scroll bar
PmenuSel = { fg = fg_light, bg = bg_light },
PmenuMatch = { fg = blue },
PmenuMatchSel = { fg = violet },
WildMenu = { fg = bg_dark, bg = blue },
Question = { fg = yellow },
SpellBad = { fg = none, fmt = "undercurl", sp = red },
SpellCap = { fg = none, fmt = "undercurl", sp = yellow },
SpellLocal = { fg = none, fmt = "undercurl", sp = blue },
SpellRare = { fg = none, fmt = "undercurl", sp = purple },
StatusLine = { fg = fg_normal, bg = bg_light },
StatusLineTerm = { fg = fg_normal, bg = bg_light },
StatusLineNC = { fg = fg_dark, bg = bg_normal },
StatusLineTermNC = { fg = fg_dark, bg = bg_normal },
TabLine = { fg = fg_normal, bg = bg_normal },
TabLineFill = { fg = fg_darker, bg = bg_dark },
TabLineSel = { fg = bg_dark, bg = fg_normal },
VertSplit = { fg = bg_normal },
Visual = { fg = none, bg = cyan_dark },
VisualNOS = { fg = none, bg = green, fmt = "underline" },
QuickFixLine = { fg = blue, fmt = "underline" },
Debug = { fg = yellow },
debugPC = { fg = bg_dark, bg = green },
debugBreakpoint = { fg = bg_dark, bg = red },
ToolbarButton = { fg = bg_dark, bg = blue_dark },
FloatBorder = { fg = fg_dark, bg = bg_normal },
NormalFloat = { fg = fg_normal, bg = bg_normal },
}
set_highlight_groups(common_highlights)
-- SYNTAX HIGHLIGHTS
local syntax_highlights = {
String = { fg = orange, fmt = font_style_strings },
Character = { fg = green },
Number = { fg = green },
Float = { fg = green },
Boolean = { fg = green },
Type = { fg = violet },
Structure = { fg = blue },
StorageClass = { fg = blue },
Identifier = { fg = red, fmt = font_style_variables },
Constant = { fg = green },
PreProc = { fg = purple },
PreCondit = { fg = purple },
Include = { fg = purple },
Keyword = { fg = purple, fmt = font_style_keywords },
Define = { fg = purple },
Typedef = { fg = purple },
Exception = { fg = purple },
Conditional = { fg = purple, fmt = font_style_keywords },
Repeat = { fg = purple, fmt = font_style_keywords },
Statement = { fg = purple },
Macro = { fg = red },
Error = { fg = red },
Label = { fg = purple },
Special = { fg = red },
SpecialChar = { fg = red },
Function = { fg = yellow, fmt = font_style_functions },
Operator = { fg = purple },
Title = { fg = fg_normal, fmt = "bold" },
Tag = { fg = green },
Delimiter = { fg = fg_dark },
Comment = { fg = fg_darker, fmt = font_style_comments },
SpecialComment = { fg = fg_darker, fmt = font_style_comments },
Todo = { fg = bg_dark, bg = yellow, fmt = font_style_comments .. ",bold" },
}
set_highlight_groups(syntax_highlights)
-- TREESITTER HIGHLIGHTS
local treesitter_highlights
if vim.api.nvim_call_function("has", { "nvim-0.8" }) ~= 1 then
treesitter_highlights = {
TSAnnotation = { fg = fg_normal },
TSAttribute = { fg = blue },
TSBoolean = { fg = green },
TSCharacter = { fg = green },
TSComment = { fg = fg_darker, fmt = font_style_comments },
TSConditional = { fg = purple, fmt = font_style_keywords },
TSConstant = { fg = green },
TSConstBuiltin = { fg = green },
TSConstMacro = { fg = green },
TSConstructor = { fg = violet },
TSError = { fg = fg_normal },
TSException = { fg = purple },
TSField = { fg = blue },
TSFloat = { fg = green },
TSFunction = { fg = yellow, fmt = font_style_functions },
TSFuncBuiltin = { fg = cyan, fmt = font_style_functions },
TSFuncMacro = { fg = cyan, fmt = font_style_functions },
TSInclude = { fg = purple },
TSKeyword = { fg = purple, fmt = font_style_keywords },
TSKeywordFunction = { fg = purple, fmt = font_style_functions },
TSKeywordOperator = { fg = purple, fmt = font_style_keywords },
TSLabel = { fg = red },
TSMethod = { fg = yellow, fmt = font_style_functions },
TSNamespace = { fg = yellow },
TSNone = { fg = fg_normal },
TSNumber = { fg = green },
TSOperator = { fg = purple },
TSParameter = { fg = blue },
TSParameterReference = { fg = blue },
TSProperty = { fg = blue },
TSPunctDelimiter = { fg = fg_dark },
TSPunctBracket = { fg = fg_dark },
TSPunctSpecial = { fg = red },
TSRepeat = { fg = purple, fmt = font_style_keywords },
TSString = { fg = orange, fmt = font_style_strings },
TSStringRegex = { fg = yellow, fmt = font_style_strings },
TSStringEscape = { fg = red, fmt = font_style_strings },
TSSymbol = { fg = cyan },
TSTag = { fg = purple },
TSTagDelimiter = { fg = purple },
TSText = { fg = fg_normal },
TSStrong = { fg = fg_normal, fmt = "bold" },
TSEmphasis = { fg = fg_normal, fmt = "italic" },
TSUnderline = { fg = fg_normal, fmt = "underline" },
TSStrike = { fg = fg_normal, fmt = "strikethrough" },
TSTitle = { fg = fg_normal, fmt = "bold" },
TSLiteral = { fg = orange },
TSURI = { fg = orange, fmt = "underline" },
TSMath = { fg = fg_normal },
TSTextReference = { fg = blue },
TSEnvironment = { fg = fg_normal },
TSEnvironmentName = { fg = fg_normal },
TSNote = { fg = fg_normal },
TSWarning = { fg = fg_normal },
TSDanger = { fg = fg_normal },
TSType = { fg = violet },
TSTypeBuiltin = { fg = violet },
TSVariable = { fg = fg_normal, fmt = font_style_variables },
TSVariableBuiltin = { fg = red, fmt = font_style_variables },
}
else
treesitter_highlights = {
["@annotation"] = { fg = fg_normal },
["@attribute"] = { fg = blue },
["@attribute.typescript"] = { fg = blue },
["@boolean"] = { fg = green },
["@character"] = { fg = green },
["@comment"] = { fg = fg_darker, fmt = font_style_comments },
["@conditional"] = { fg = purple, fmt = font_style_keywords },
["@constant"] = { fg = green },
["@constant.builtin"] = { fg = green },
["@constant.macro"] = { fg = orange },
["@constructor"] = { fg = violet },
["@error"] = { fg = fg_normal },
["@exception"] = { fg = purple },
["@field"] = { fg = blue },
["@float"] = { fg = green },
["@function"] = { fg = yellow, fmt = font_style_functions },
["@function.builtin"] = { fg = cyan, fmt = font_style_functions },
["@function.macro"] = { fg = blue, fmt = font_style_functions },
["@include"] = { fg = purple },
["@keyword"] = { fg = purple, fmt = font_style_keywords },
["@keyword.function"] = { fg = purple, fmt = font_style_functions },
["@keyword.operator"] = { fg = purple, fmt = font_style_keywords },
["@label"] = { fg = purple },
["@method"] = { fg = yellow, fmt = font_style_functions },
["@namespace"] = { fg = yellow },
["@none"] = { fg = fg_normal },
["@number"] = { fg = green },
["@operator"] = { fg = purple },
["@parameter"] = { fg = blue },
["@parameter.reference"] = { fg = blue },
["@preproc"] = { fg = purple },
["@property"] = { fg = blue },
["@punctuation.delimiter"] = { fg = fg_dark },
["@punctuation.bracket"] = { fg = fg_dark },
["@punctuation.special"] = { fg = red },
["@repeat"] = { fg = purple, fmt = font_style_keywords },
["@string"] = { fg = orange, fmt = font_style_strings },
["@string.regex"] = { fg = yellow, fmt = font_style_strings },
["@string.escape"] = { fg = red, fmt = font_style_strings },
["@symbol"] = { fg = cyan },
["@tag"] = { fg = purple },
["@tag.attribute"] = { fg = blue },
["@tag.delimiter"] = { fg = fg_dark },
["@text"] = { fg = fg_normal },
["@text.strong"] = { fg = fg_normal, fmt = "bold" },
["@text.emphasis"] = { fg = fg_normal, fmt = "italic" },
["@text.underline"] = { fg = fg_normal, fmt = "underline" },
["@text.strike"] = { fg = fg_normal, fmt = "strikethrough" },
["@text.title"] = { fg = fg_normal, fmt = "bold" },
["@text.literal"] = { fg = orange },
["@text.uri"] = { fg = orange, fmt = "underline" },
["@text.todo"] = { fg = bg_dark, bg = yellow, fmt = font_style_comments .. ",bold" },
["@text.math"] = { fg = fg_normal },
["@text.reference"] = { fg = blue },
["@text.environment"] = { fg = fg_normal },
["@text.environment.name"] = { fg = fg_normal },
["@text.diff.add"] = { fg = green },
["@text.diff.delete"] = { fg = red },
["@note"] = { fg = fg_normal },
["@warning"] = { fg = fg_normal },
["@danger"] = { fg = fg_normal },
["@type"] = { fg = violet },
["@type.builtin"] = { fg = violet },
["@variable"] = { fg = fg_normal, fmt = font_style_variables },
["@variable.builtin"] = { fg = red, fmt = font_style_variables },
}
end
set_highlight_groups(treesitter_highlights)
-- LSP HIGHLIGHTS
if vim.api.nvim_call_function("has", { "nvim-0.9" }) == 1 then
local lsp_highlights = {
["@lsp.type.comment"] = treesitter_highlights["@comment"],
["@lsp.type.enum"] = treesitter_highlights["@type"],
["@lsp.type.enumMember"] = treesitter_highlights["@constant.builtin"],
["@lsp.type.interface"] = treesitter_highlights["@type"],
["@lsp.type.typeParameter"] = treesitter_highlights["@type"],
["@lsp.type.keyword"] = treesitter_highlights["@keyword"],
["@lsp.type.namespace"] = treesitter_highlights["@namespace"],
["@lsp.type.parameter"] = treesitter_highlights["@parameter"],
["@lsp.type.property"] = treesitter_highlights["@property"],
["@lsp.type.variable"] = treesitter_highlights["@variable"],
["@lsp.type.macro"] = treesitter_highlights["@function.macro"],
["@lsp.type.method"] = treesitter_highlights["@method"],
["@lsp.type.number"] = treesitter_highlights["@number"],
["@lsp.type.generic"] = treesitter_highlights["@text"],
["@lsp.type.builtinType"] = treesitter_highlights["@type.builtin"],
["@lsp.typemod.method.defaultLibrary"] = treesitter_highlights["@function"],
["@lsp.typemod.function.defaultLibrary"] = treesitter_highlights["@function"],
["@lsp.typemod.operator.injected"] = treesitter_highlights["@operator"],
["@lsp.typemod.string.injected"] = treesitter_highlights["@string"],
["@lsp.typemod.variable.defaultLibrary"] = treesitter_highlights["@variable.builtin"],
["@lsp.typemod.variable.injected"] = treesitter_highlights["@variable"],
["@lsp.typemod.variable.static"] = treesitter_highlights["@constant"],
}
set_highlight_groups(lsp_highlights)
end
-- LANGUAGE HIGHLIGHTS
local c_language_highlights = {
cInclude = { fg = blue },
cStorageClass = { fg = purple },
cTypedef = { fg = purple },
cDefine = { fg = cyan },
cTSInclude = { fg = blue },
cTSConstant = { fg = green },
cTSConstMacro = { fg = purple },
cTSOperator = { fg = purple },
}
set_highlight_groups(c_language_highlights)
local cpp_language_highlights = {
cppStatement = { fg = purple, fmt = "bold" },
cppTSInclude = { fg = blue },
cppTSConstant = { fg = green },
cppTSConstMacro = { fg = purple },
cppTSOperator = { fg = purple },
}
set_highlight_groups(cpp_language_highlights)
local markdown_language_highlights = {
markdownBlockquote = { fg = fg_dark },
markdownBold = { fg = none, fmt = "bold" },
markdownBoldDelimiter = { fg = fg_dark },
markdownCode = { fg = cyan },
markdownCodeBlock = { fg = blue },
markdownCodeDelimiter = { fg = purple },
markdownH1 = { fg = fg_light, fmt = "bold,underline" },
markdownH2 = { fg = fg_light, fmt = "bold,underline" },
markdownH3 = { fg = fg_light, fmt = "bold,underline" },
markdownH4 = { fg = fg_light, fmt = "bold,underline" },
markdownH5 = { fg = fg_light, fmt = "bold,underline" },
markdownH6 = { fg = fg_light, fmt = "bold,underline" },
markdownHeadingDelimiter = { fg = fg_dark },
markdownHeadingRule = { fg = fg_dark },
markdownId = { fg = yellow },
markdownIdDeclaration = { fg = red },
markdownItalic = { fg = none, fmt = "italic" },
markdownItalicDelimiter = { fg = fg_dark, fmt = "italic" },
markdownLinkDelimiter = { fg = fg_dark },
markdownLinkText = { fg = cyan, fmt = "underline" },
markdownLinkTextDelimiter = { fg = fg_dark },
markdownListMarker = { fg = purple },
markdownOrderedListMarker = { fg = purple },
markdownRule = { fg = purple },
markdownUrl = { fg = blue, fmt = "underline" },
markdownUrlDelimiter = { fg = fg_dark },
markdownUrlTitleDelimiter = { fg = green }
}
set_highlight_groups(markdown_language_highlights)
local php_language_highlights = {
phpFunctions = { fg = fg_normal, fmt = font_style_functions },
phpMethods = { fg = cyan },
phpStructure = { fg = purple },
phpOperator = { fg = purple },
phpMemberSelector = { fg = fg_normal },
phpVarSelector = { fg = orange, fmt = font_style_variables },
phpIdentifier = { fg = orange, fmt = font_style_variables },
phpBoolean = { fg = cyan },
phpNumber = { fg = orange },
phpHereDoc = { fg = green },
phpNowDoc = { fg = green },
phpSCKeyword = { fg = purple, fmt = font_style_keywords },
phpFCKeyword = { fg = purple, fmt = font_style_keywords },
phpRegion = { fg = blue }
}
set_highlight_groups(php_language_highlights)
local scala_language_highlights = {
scalaNameDefinition = { fg = fg_normal },
scalaInterpolationBoundary = { fg = purple },
scalaInterpolation = { fg = purple },
scalaTypeOperator = { fg = red },
scalaOperator = { fg = red },
scalaKeywordModifier = { fg = red, fmt = font_style_keywords },
}
set_highlight_groups(scala_language_highlights)
local tex_language_highlights = {
latexTSInclude = { fg = blue },
latexTSFuncMacro = { fg = fg_normal, fmt = font_style_functions },
latexTSEnvironment = { fg = cyan, fmt = "bold" },
latexTSEnvironmentName = { fg = yellow },
texCmdEnv = { fg = cyan },
texEnvArgName = { fg = yellow },
latexTSTitle = { fg = green },
latexTSType = { fg = violet },
latexTSMath = { fg = orange },
texMathZoneX = { fg = orange },
texMathZoneXX = { fg = orange },
texMathDelimZone = { fg = fg_light },
texMathDelim = { fg = purple },
texMathOper = { fg = red },
texCmd = { fg = purple },
texCmdPart = { fg = blue },
texCmdPackage = { fg = blue },
texPgfType = { fg = yellow },
}
set_highlight_groups(tex_language_highlights)
local vim_language_highlights = {
vimOption = { fg = red },
vimSetEqual = { fg = yellow },
vimMap = { fg = purple },
vimMapModKey = { fg = orange },
vimNotation = { fg = red },
vimMapLhs = { fg = fg_normal },
vimMapRhs = { fg = blue },
vimVar = { fg = fg_normal, fmt = font_style_variables },
vimCommentTitle = { fg = fg_light, fmt = font_style_comments },
}
set_highlight_groups(vim_language_highlights)
-- ICON PLUGIN HIGHLIGHTS
local item_kind_icon_colors = {
Default = purple,
Array = yellow,
Boolean = green,
Class = blue,
Color = green,
Constant = green,
Constructor = violet,
Enum = purple,
EnumMember = blue,
Event = yellow,
Field = blue,
File = blue,
Folder = orange,
Function = yellow,
Interface = blue,
Key = purple,
Keyword = purple,
Method = yellow,
Module = orange,
Namespace = red,
Null = fg_dark,
Number = green,
Object = red,
Operator = purple,
Package = yellow,
Property = blue,
Reference = orange,
Snippet = red,
String = orange,
Struct = blue,
Text = fg_light,
TypeParameter = red,
Unit = orange,
Value = green,
Variable = cyan,
}
local cmp_plugin_highlights = {
CmpItemAbbr = { fg = fg_normal },
CmpItemAbbrDeprecated = { fg = fg_light, fmt = "strikethrough" },
CmpItemAbbrMatch = { fg = cyan },
CmpItemAbbrMatchFuzzy = { fg = cyan, fmt = "underline" },
CmpItemMenu = { fg = fg_light },
CmpItemKind = { fg = purple, fmt = invert_item_kind_icon_highlights_in_cmp_menu and "reverse" },
}
local navic_plugin_highlights = {
NavicText = { fg = fg_normal },
NavicSeparator = { fg = fg_light },
}
local outline_plugin_highlights = {
FocusedSymbol = { fg = purple, bg = bg_light, fmt = "bold" },
AerialLine = { fg = purple, bg = bg_light, fmt = "bold" },
}
for kind, color in pairs(item_kind_icon_colors) do
cmp_plugin_highlights["CmpItemKind" .. kind] = {
fg = color,
fmt = invert_item_kind_icon_highlights_in_cmp_menu and
"reverse"
}
navic_plugin_highlights["NavicIcons" .. kind] = { fg = color }
outline_plugin_highlights["Aerial" .. kind .. "Icon"] = { fg = color }
end
set_highlight_groups(cmp_plugin_highlights)
set_highlight_groups(navic_plugin_highlights)
set_highlight_groups(outline_plugin_highlights)
-- LSP PLUGIN HIGHLIGHTS
local lsp_plugin_highlights = {
LspCxxHlGroupEnumConstant = { fg = green },
LspCxxHlGroupMemberVariable = { fg = orange },
LspCxxHlGroupNamespace = { fg = blue },
LspCxxHlSkippedRegion = { fg = fg_dark },
LspCxxHlSkippedRegionBeginEnd = { fg = red },
DiagnosticError = { fg = red },
DiagnosticHint = { fg = yellow },
DiagnosticInfo = { fg = cyan },
DiagnosticWarn = { fg = yellow },
DiagnosticVirtualTextError = { fg = red },
DiagnosticVirtualTextWarn = { fg = yellow },
DiagnosticVirtualTextInfo = { fg = cyan },
DiagnosticVirtualTextHint = { fg = purple },
DiagnosticUnderlineError = { fmt = "undercurl", sp = red },
DiagnosticUnderlineHint = { fmt = "undercurl", sp = purple },
DiagnosticUnderlineInfo = { fmt = "undercurl", sp = blue },
DiagnosticUnderlineWarn = { fmt = "undercurl", sp = yellow },
LspReferenceText = { bg = bg_light },
LspReferenceWrite = { bg = bg_light },
LspReferenceRead = { bg = bg_light },
LspCodeLens = { fg = fg_darker, fmt = font_style_comments },
LspCodeLensSeparator = { fg = fg_dark },
}
lsp_plugin_highlights.LspDiagnosticsDefaultError = lsp_plugin_highlights.DiagnosticError
lsp_plugin_highlights.LspDiagnosticsDefaultHint = lsp_plugin_highlights.DiagnosticHint
lsp_plugin_highlights.LspDiagnosticsDefaultInformation = lsp_plugin_highlights.DiagnosticInfo
lsp_plugin_highlights.LspDiagnosticsDefaultWarning = lsp_plugin_highlights.DiagnosticWarn
lsp_plugin_highlights.LspDiagnosticsUnderlineError = lsp_plugin_highlights.DiagnosticUnderlineError
lsp_plugin_highlights.LspDiagnosticsUnderlineHint = lsp_plugin_highlights.DiagnosticUnderlineHint
lsp_plugin_highlights.LspDiagnosticsUnderlineInformation = lsp_plugin_highlights.DiagnosticUnderlineInfo
lsp_plugin_highlights.LspDiagnosticsUnderlineWarning = lsp_plugin_highlights.DiagnosticUnderlineWarn
lsp_plugin_highlights.LspDiagnosticsVirtualTextError = lsp_plugin_highlights.DiagnosticVirtualTextError
lsp_plugin_highlights.LspDiagnosticsVirtualTextWarning = lsp_plugin_highlights.DiagnosticVirtualTextWarn
lsp_plugin_highlights.LspDiagnosticsVirtualTextInformation = lsp_plugin_highlights.DiagnosticVirtualTextInfo
lsp_plugin_highlights.LspDiagnosticsVirtualTextHint = lsp_plugin_highlights.DiagnosticVirtualTextHint
set_highlight_groups(lsp_plugin_highlights)
-- PLUGIN HIGHLIGHTS
local ale_plugin_highlights = {
ALEErrorSign = lsp_plugin_highlights.DiagnosticError,
ALEInfoSign = lsp_plugin_highlights.DiagnosticInfo,
ALEWarningSign = lsp_plugin_highlights.DiagnosticWarn,
}
set_highlight_groups(ale_plugin_highlights)
local bufferline_plugin_highlights = {
-- visible: the buffer is visible but not selected
-- selected: the buffer is selected
BufferLineFill = {},
BufferLineBackground = { bg = bg_dark }, -- background of tabs with invisible and unselected buffers
BufferLineSeparator = { fg = bg_light, bg = bg_dark }, -- single character between tabs
BufferLineBufferVisible = { fg = fg_normal, bg = bg_normal },
BufferLineBufferSelected = { fg = fg_light, bg = bg_light, fmt = "bold" },
BufferLineDuplicate = { fg = fg_dark, bg = bg_dark },
BufferLineDuplicateVisible = { fg = fg_normal, bg = bg_normal },
BufferLineDuplicateSelected = { fg = fg_light, bg = bg_light, fmt = "bold" },
BufferLineIndicatorVisible = { bg = bg_normal }, -- single character preceding buffer
BufferLineIndicatorSelected = { bg = bg_light },
BufferLinePick = { fg = blue, bg = bg_dark, fmt = "bold" }, -- single character identifying a buffer when picking
BufferLinePickVisible = { fg = blue, bg = bg_normal, fmt = "bold" },
BufferLinePickSelected = { fg = blue, bg = bg_light, fmt = "bold" },
BufferLineNumbers = { fg = fg_dark, bg = bg_dark },
BufferLineNumbersVisible = { fg = fg_normal, bg = bg_dark },
BufferLineNumbersSelected = { fg = fg_light, bg = bg_dark },
-- requires special code to work, see:
-- https://github.com/akinsho/bufferline.nvim/issues/884#issuecomment-2734464291
BufferLineDevIcon = { fg = fg_dark, bg = bg_dark },
BufferLineDevIconVisible = { fg = fg_normal, bg = bg_normal },
BufferLineDevIconSelected = { fg = fg_light, bg = bg_light },
BufferLineModified = { fg = fg_dark, bg = bg_dark },
BufferLineModifiedVisible = { fg = fg_normal, bg = bg_normal },
BufferLineModifiedSelected = { fg = fg_light, bg = bg_light },
BufferLineCloseButton = { fg = fg_dark, bg = bg_dark },
BufferLineCloseButtonVisible = { fg = fg_dark, bg = bg_normal },
BufferLineCloseButtonSelected = { fg = fg_normal, bg = bg_light },
BufferLineHint = { fg = blue, bg = bg_dark },
BufferLineHintVisible = { fg = blue, bg = bg_normal, fmt = "bold" },
BufferLineHintSelected = { fg = blue, bg = bg_light, fmt = "bold" },
BufferLineHintDiagnostic = { fg = blue, bg = bg_dark },
BufferLineHintDiagnosticVisible = { fg = blue, bg = bg_normal, fmt = "bold" },
BufferLineHintDiagnosticSelected = { fg = blue, bg = bg_light, fmt = "bold" },
BufferLineInfo = { fg = blue, bg = bg_dark },
BufferLineInfoVisible = { fg = blue, bg = bg_normal, fmt = "bold" },
BufferLineInfoSelected = { fg = blue, bg = bg_light, fmt = "bold" },
BufferLineInfoDiagnostic = { fg = blue, bg = bg_dark },
BufferLineInfoDiagnosticVisible = { fg = blue, bg = bg_normal, fmt = "bold" },
BufferLineInfoDiagnosticSelected = { fg = blue, bg = bg_light, fmt = "bold" },
BufferLineWarning = { fg = yellow, bg = bg_dark },
BufferLineWarningVisible = { fg = yellow, bg = bg_normal, fmt = "bold" },
BufferLineWarningSelected = { fg = yellow, bg = bg_light, fmt = "bold" },
BufferLineWarningDiagnostic = { fg = yellow, bg = bg_dark },
BufferLineWarningDiagnosticVisible = { fg = yellow, bg = bg_normal, fmt = "bold" },
BufferLineWarningDiagnosticSelected = { fg = yellow, bg = bg_light, fmt = "bold" },
BufferLineError = { fg = red, bg = bg_dark },
BufferLineErrorVisible = { fg = red, bg = bg_normal, fmt = "bold" },
BufferLineErrorSelected = { fg = red, bg = bg_light, fmt = "bold" },
BufferLineErrorDiagnostic = { fg = red, bg = bg_dark },
BufferLineErrorDiagnosticVisible = { fg = red, bg = bg_normal, fmt = "bold" },
BufferLineErrorDiagnosticSelected = { fg = red, bg = bg_light, fmt = "bold" },
BufferLineTruncMarker = { fg = fg_normal }, -- the characters to show bufferline overflow to either side
BufferLineOffsetSeparator = { fg = fg_normal }, -- separator between the bufferline and offset windows
-- BufferLineGroupLabel = {},
-- BufferLineGroupSeparator = {},
-- BufferLineTab = {},
-- BufferLineTabSelected = {},
-- BufferLineTabClose = {},
-- BufferLineTabSeparator = {},
-- BufferLineTabSeparatorSelected = {},
}
set_highlight_groups(bufferline_plugin_highlights)
local barbar_plugin_highlights = {
BufferCurrent = { fmt = "bold" },
BufferCurrentMod = { fg = yellow, fmt = "bold" },
BufferCurrentSign = { fg = purple },
BufferInactiveMod = { fg = fg_light, bg = bg_normal },
BufferVisible = { fg = fg_light, bg = bg_dark },
BufferVisibleMod = { fg = yellow, bg = bg_dark },
BufferVisibleIndex = { fg = fg_light, bg = bg_dark },
BufferVisibleSign = { fg = fg_light, bg = bg_dark },
BufferVisibleTarget = { fg = fg_light, bg = bg_dark },
}
set_highlight_groups(barbar_plugin_highlights)
local coc_plugin_highlights = {
CocErrorSign = lsp_plugin_highlights.DiagnosticError,
CocHintSign = lsp_plugin_highlights.DiagnosticHint,
CocInfoSign = lsp_plugin_highlights.DiagnosticInfo,
CocWarningSign = lsp_plugin_highlights.DiagnosticWarn,
}
set_highlight_groups(coc_plugin_highlights)
local dashboard_plugin_highlights = {
DashboardShortCut = { fg = blue },
DashboardHeader = { fg = yellow },
DashboardCenter = { fg = cyan },
DashboardFooter = { fg = red_dark, fmt = "italic" }
}
set_highlight_groups(dashboard_plugin_highlights)
local diffview_plugin_highlights = {
DiffviewFilePanelTitle = { fg = blue, fmt = "bold" },
DiffviewFilePanelCounter = { fg = purple, fmt = "bold" },
DiffviewFilePanelFileName = { fg = fg_normal },
DiffviewNormal = common_highlights.Normal,
DiffviewCursorLine = common_highlights.CursorLine,
DiffviewVertSplit = common_highlights.VertSplit,
DiffviewSignColumn = common_highlights.SignColumn,
DiffviewStatusLine = common_highlights.StatusLine,
DiffviewStatusLineNC = common_highlights.StatusLineNC,
DiffviewEndOfBuffer = common_highlights.EndOfBuffer,
DiffviewFilePanelRootPath = { fg = fg_dark },
DiffviewFilePanelPath = { fg = fg_dark },
DiffviewFilePanelInsertions = { fg = green },
DiffviewFilePanelDeletions = { fg = red },
DiffviewStatusAdded = { fg = green },
DiffviewStatusUntracked = { fg = blue },
DiffviewStatusModified = { fg = blue },
DiffviewStatusRenamed = { fg = blue },
DiffviewStatusCopied = { fg = blue },
DiffviewStatusTypeChange = { fg = blue },
DiffviewStatusUnmerged = { fg = blue },
DiffviewStatusUnknown = { fg = red },
DiffviewStatusDeleted = { fg = red },
DiffviewStatusBroken = { fg = red }
}
set_highlight_groups(diffview_plugin_highlights)
local gitgutter_plugin_highlights = {
GitGutterAdd = { fg = green },
GitGutterChange = { fg = yellow },
GitGutterDelete = { fg = red },
}
set_highlight_groups(gitgutter_plugin_highlights)
local gitsigns_plugin_highlights = {
GitSignsAdd = { fg = green },
GitSignsAddLn = { fg = green },
GitSignsAddNr = { fg = green },
GitSignsChange = { fg = yellow },
GitSignsChangeLn = { fg = yellow },
GitSignsChangeNr = { fg = yellow },
GitSignsDelete = { fg = red },
GitSignsDeleteLn = { fg = red },
GitSignsDeleteNr = { fg = red }
}
set_highlight_groups(gitsigns_plugin_highlights)
local hop_plugin_highlights = {
HopNextKey = { fg = red, fmt = "bold" },
HopNextKey1 = { fg = cyan, fmt = "bold" },
HopNextKey2 = { fg = blue_dark },
HopUnmatched = { fg = fg_dark },
}
set_highlight_groups(hop_plugin_highlights)
local indent_blankline_plugin_highlights = {
IndentBlanklineIndent1 = { fg = blue },
IndentBlanklineIndent2 = { fg = green },
IndentBlanklineIndent3 = { fg = cyan },
IndentBlanklineIndent4 = { fg = fg_light },
IndentBlanklineIndent5 = { fg = purple },
IndentBlanklineIndent6 = { fg = red },
IndentBlanklineChar = { fg = bg_light, fmt = "nocombine" },
IndentBlanklineContextChar = { fg = fg_darker, fmt = "nocombine" },
IndentBlanklineContextStart = { sp = fg_darker, fmt = "underline" },
IndentBlanklineContextSpaceChar = { fmt = "nocombine" },
}
set_highlight_groups(indent_blankline_plugin_highlights)
local mini_plugin_highlights = {
MiniCompletionActiveParameter = { fmt = "underline" },
MiniCursorword = { fmt = "underline" },
MiniCursorwordCurrent = { fmt = "underline" },
MiniIndentscopeSymbol = { fg = fg_dark },
MiniIndentscopePrefix = { fmt = "nocombine" }, -- Make it invisible
MiniJump = { fg = purple, fmt = "underline", sp = purple },
MiniJump2dSpot = { fg = red, fmt = "bold,nocombine" },
MiniStarterCurrent = { fmt = "nocombine" },
MiniStarterFooter = { fg = red_dark, fmt = "italic" },
MiniStarterHeader = { fg = yellow },
MiniStarterInactive = { fg = fg_darker, fmt = font_style_comments },
MiniStarterItem = { fg = fg_normal, bg = transparent and none or bg_dark },
MiniStarterItemBullet = { fg = fg_dark },
MiniStarterItemPrefix = { fg = yellow },
MiniStarterSection = { fg = fg_light },
MiniStarterQuery = { fg = cyan },
MiniStatuslineDevinfo = { fg = fg_normal, bg = bg_light },
MiniStatuslineFileinfo = { fg = fg_normal, bg = bg_light },
MiniStatuslineFilename = { fg = fg_dark, bg = bg_normal },
MiniStatuslineInactive = { fg = fg_dark, bg = bg_dark },
MiniStatuslineModeCommand = { fg = bg_dark, bg = yellow, fmt = "bold" },
MiniStatuslineModeInsert = { fg = bg_dark, bg = blue, fmt = "bold" },
MiniStatuslineModeNormal = { fg = bg_dark, bg = green, fmt = "bold" },
MiniStatuslineModeOther = { fg = bg_dark, bg = cyan, fmt = "bold" },
MiniStatuslineModeReplace = { fg = bg_dark, bg = red, fmt = "bold" },
MiniStatuslineModeVisual = { fg = bg_dark, bg = purple, fmt = "bold" },
MiniSurround = { fg = bg_dark, bg = orange },
MiniTablineCurrent = { fmt = "bold" },
MiniTablineFill = { fg = fg_dark, bg = bg_normal },
MiniTablineHidden = { fg = fg_normal, bg = bg_normal },
MiniTablineModifiedCurrent = { fg = orange, fmt = "bold,italic" },
MiniTablineModifiedHidden = { fg = fg_light, bg = bg_normal, fmt = "italic" },
MiniTablineModifiedVisible = { fg = yellow, bg = bg_dark, fmt = "italic" },
MiniTablineTabpagesection = { fg = bg_dark, bg = yellow_dark },
MiniTablineVisible = { fg = fg_light, bg = bg_dark },
MiniTestEmphasis = { fmt = "bold" },
MiniTestFail = { fg = red, fmt = "bold" },
MiniTestPass = { fg = green, fmt = "bold" },
MiniTrailspace = { bg = red },
}
set_highlight_groups(mini_plugin_highlights)
local nvim_tree_plugin_highlights = {
NvimTreeNormal = { fg = fg_normal, bg = transparent and none or bg_dark },
NvimTreeVertSplit = { fg = bg_dark, bg = transparent and none or bg_dark },
NvimTreeEndOfBuffer = { fg = ending_tildes and bg_light or bg_dark, bg = transparent and none or bg_dark },
NvimTreeRootFolder = { fg = fg_dark, fmt = "bold" },
NvimTreeGitDirty = { fg = fg_normal },
NvimTreeGitNew = { fg = fg_normal },
NvimTreeGitDeleted = { fg = red },
NvimTreeSpecialFile = { fg = fg_normal, fmt = "underline" },
NvimTreeIndentMarker = { fg = fg_dark },
NvimTreeImageFile = { fg = fg_dark },
NvimTreeSymlink = { fg = purple },
NvimTreeFolderName = { fg = fg_dark },
NvimTreeExecFile = { fg = fg_light },
}
set_highlight_groups(nvim_tree_plugin_highlights)
local neo_tree_plugin_highlights = {
NeoTreeNormal = { fg = fg_normal, bg = transparent and none or bg_dark },
NeoTreeNormalNC = { fg = fg_normal, bg = transparent and none or bg_dark },
NeoTreeVertSplit = { fg = bg_normal, bg = transparent and none or bg_normal },
NeoTreeWinSeparator = { fg = bg_normal, bg = transparent and none or bg_normal },
NeoTreeEndOfBuffer = { fg = ending_tildes and bg_light or bg_dark, bg = transparent and none or bg_dark },
NeoTreeRootName = { fg = fg_dark, fmt = "bold" },
NeoTreeGitAdded = { fg = green },
NeoTreeGitDeleted = { fg = red },
NeoTreeGitModified = { fg = yellow },
NeoTreeGitConflict = { fg = red, fmt = "bold" },
NeoTreeGitUntracked = { fg = red, fmt = "italic" },
NeoTreeIndentMarker = { fg = fg_dark },
NeoTreeSymbolicLinkTarget = { fg = purple },
}
set_highlight_groups(neo_tree_plugin_highlights)
local neotest_plugin_highlights = {
NeotestAdapterName = { fg = purple, fmt = "bold" },
NeotestDir = { fg = cyan },
NeotestExpandMarker = { fg = fg_dark },
NeotestFailed = { fg = red },
NeotestFile = { fg = cyan },
NeotestFocused = { fmt = "bold,italic" },
NeotestIndent = { fg = fg_dark },
NeotestMarked = { fg = orange, fmt = "bold" },
NeotestNamespace = { fg = blue },
NeotestPassed = { fg = green },
NeotestRunning = { fg = yellow },
NeotestWinSelect = { fg = cyan, fmt = "bold" },
NeotestSkipped = { fg = fg_light },
NeotestTarget = { fg = purple },
NeotestTest = { fg = fg_normal },
NeotestUnknown = { fg = fg_light },
}
set_highlight_groups(neotest_plugin_highlights)
local rainbow_delimiters_plugin_highlights = {
RainbowDelimiterRed = { fg = red },
RainbowDelimiterOrange = { fg = orange },
RainbowDelimiterYellow = { fg = yellow },
RainbowDelimiterGreen = { fg = green },
RainbowDelimiterCyan = { fg = cyan },
RainbowDelimiterBlue = { fg = blue },
RainbowDelimiterViolet = { fg = purple },
}
set_highlight_groups(rainbow_delimiters_plugin_highlights)
local telescope_plugin_highlights = {
TelescopeBorder = { fg = red },
TelescopePromptBorder = { fg = cyan },
TelescopeResultsBorder = { fg = cyan },
TelescopePreviewBorder = { fg = cyan },
TelescopeMatching = { fg = orange, fmt = "bold" },
TelescopePromptPrefix = { fg = green },
TelescopeSelection = { bg = bg_light },
TelescopeSelectionCaret = { fg = yellow }
}
set_highlight_groups(telescope_plugin_highlights)
local ts_rainbow_plugin_highlights = {
rainbowcol1 = { fg = fg_light },
rainbowcol2 = { fg = yellow },
rainbowcol3 = { fg = blue },
rainbowcol4 = { fg = orange },
rainbowcol5 = { fg = purple },
rainbowcol6 = { fg = green },
rainbowcol7 = { fg = red }
}
set_highlight_groups(ts_rainbow_plugin_highlights)
local ts_rainbow2_plugin_highlights = {
TSRainbowRed = { fg = red },
TSRainbowYellow = { fg = yellow },
TSRainbowBlue = { fg = blue },
TSRainbowOrange = { fg = orange },
TSRainbowGreen = { fg = green },
TSRainbowViolet = { fg = purple },
TSRainbowCyan = { fg = cyan },
}
set_highlight_groups(ts_rainbow2_plugin_highlights)
local whichkey_plugin_highlights = {
WhichKey = { fg = purple },
WhichKeyDesc = { fg = blue },
WhichKeyGroup = { fg = violet },
WhichKeySeparator = { fg = fg_dark }
}
set_highlight_groups(whichkey_plugin_highlights)
local lualine_plugin_highlights = {
lualine_a_normal = { fg = fg_normal, bg = bg_light, fmt = "bold" },
lualine_b_normal = { fg = fg_normal, bg = bg_normal },
lualine_c_normal = { fg = fg_dark, bg = bg_dark },
lualine_a_insert = { fg = bg_darker, bg = blue, fmt = "bold" },
lualine_b_insert = { fg = fg_normal, bg = bg_normal },
lualine_c_insert = { fg = fg_dark, bg = bg_dark },
lualine_a_replace = { fg = bg_darker, bg = cyan, fmt = "bold" },
lualine_b_replace = { fg = fg_normal, bg = bg_normal },
lualine_c_replace = { fg = fg_dark, bg = bg_dark },
lualine_a_visual = { fg = bg_darker, bg = purple, fmt = "bold" },
lualine_b_visual = { fg = fg_normal, bg = bg_normal },
lualine_c_visual = { fg = fg_dark, bg = bg_dark },
lualine_a_command = { fg = bg_darker, bg = yellow, fmt = "bold" },
lualine_b_command = { fg = fg_normal, bg = bg_normal },
lualine_c_command = { fg = fg_dark, bg = bg_dark },
lualine_a_terminal = { fg = bg_darker, bg = violet, fmt = "bold" },
lualine_b_terminal = { fg = fg_normal, bg = bg_normal },
lualine_c_terminal = { fg = fg_dark, bg = bg_dark },
}
set_highlight_groups(lualine_plugin_highlights)