feat: use new style definitions for hl groups. Keep backward compatibility for string styles
This commit is contained in:
10
README.md
10
README.md
@@ -133,11 +133,11 @@ require("tokyonight").setup({
|
|||||||
terminal_colors = true, -- Configure the colors used when opening a `:terminal` in Neovim
|
terminal_colors = true, -- Configure the colors used when opening a `:terminal` in Neovim
|
||||||
styles = {
|
styles = {
|
||||||
-- Style to be applied to different syntax groups
|
-- Style to be applied to different syntax groups
|
||||||
-- Value is any valid attr-list value `:help attr-list`
|
-- Value is any valid attr-list value for `:help nvim_set_hl`
|
||||||
comments = "italic",
|
comments = { italic = true },
|
||||||
keywords = "italic",
|
keywords = { italic = true },
|
||||||
functions = "NONE",
|
functions = {},
|
||||||
variables = "NONE",
|
variables = {},
|
||||||
-- Background styles. Can be "dark", "transparent" or "normal"
|
-- Background styles. Can be "dark", "transparent" or "normal"
|
||||||
sidebars = "dark", -- style for sidebars, see below
|
sidebars = "dark", -- style for sidebars, see below
|
||||||
floats = "dark", -- style for floating windows
|
floats = "dark", -- style for floating windows
|
||||||
|
|||||||
@@ -1,17 +1,19 @@
|
|||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
---@class Config
|
---@class Config
|
||||||
|
---@field on_colors fun(colors: ColorScheme)
|
||||||
|
---@field on_highlights fun(highlights: Highlights, colors: ColorScheme)
|
||||||
local defaults = {
|
local defaults = {
|
||||||
style = "storm", -- The theme comes in three styles, `storm`, a darker variant `night` and `day`
|
style = "storm", -- The theme comes in three styles, `storm`, a darker variant `night` and `day`
|
||||||
transparent = false, -- Enable this to disable setting the background color
|
transparent = false, -- Enable this to disable setting the background color
|
||||||
terminal_colors = true, -- Configure the colors used when opening a `:terminal` in Neovim
|
terminal_colors = true, -- Configure the colors used when opening a `:terminal` in Neovim
|
||||||
styles = {
|
styles = {
|
||||||
-- Style to be applied to different syntax groups
|
-- Style to be applied to different syntax groups
|
||||||
-- Value is any valid attr-list value `:help attr-list`
|
-- Value is any valid attr-list value for `:help nvim_set_hl`
|
||||||
comments = "italic",
|
comments = { italic = true },
|
||||||
keywords = "italic",
|
keywords = { italic = true },
|
||||||
functions = "NONE",
|
functions = {},
|
||||||
variables = "NONE",
|
variables = {},
|
||||||
-- Background styles. Can be "dark", "transparent" or "normal"
|
-- Background styles. Can be "dark", "transparent" or "normal"
|
||||||
sidebars = "dark", -- style for sidebars, see below
|
sidebars = "dark", -- style for sidebars, see below
|
||||||
floats = "dark", -- style for floating windows
|
floats = "dark", -- style for floating windows
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ function M.setup()
|
|||||||
-- TermCursorNC= { }, -- cursor in an unfocused terminal
|
-- TermCursorNC= { }, -- cursor in an unfocused terminal
|
||||||
ErrorMsg = { fg = c.error }, -- error messages on the command line
|
ErrorMsg = { fg = c.error }, -- error messages on the command line
|
||||||
VertSplit = { fg = c.border }, -- the column separating vertically split windows
|
VertSplit = { fg = c.border }, -- the column separating vertically split windows
|
||||||
WinSeparator = { fg = c.border, style = "bold" }, -- the column separating vertically split windows
|
WinSeparator = { fg = c.border, bold = true }, -- the column separating vertically split windows
|
||||||
Folded = { fg = c.blue, bg = c.fg_gutter }, -- line used for closed folds
|
Folded = { fg = c.blue, bg = c.fg_gutter }, -- line used for closed folds
|
||||||
FoldColumn = { bg = c.bg, fg = c.comment }, -- 'foldcolumn'
|
FoldColumn = { bg = c.bg, fg = c.comment }, -- 'foldcolumn'
|
||||||
SignColumn = { bg = options.transparent and c.none or c.bg, fg = c.fg_gutter }, -- column where |signs| are displayed
|
SignColumn = { bg = options.transparent and c.none or c.bg, fg = c.fg_gutter }, -- column where |signs| are displayed
|
||||||
@@ -53,8 +53,8 @@ function M.setup()
|
|||||||
Substitute = { bg = c.red, fg = c.black }, -- |:substitute| replacement text highlighting
|
Substitute = { bg = c.red, fg = c.black }, -- |:substitute| replacement text highlighting
|
||||||
LineNr = { fg = c.fg_gutter }, -- Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set.
|
LineNr = { fg = c.fg_gutter }, -- Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set.
|
||||||
CursorLineNr = { fg = c.dark5 }, -- Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line.
|
CursorLineNr = { fg = c.dark5 }, -- Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line.
|
||||||
MatchParen = { fg = c.orange, 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 = c.orange, bold = true }, -- The character under the cursor or just before it, if it is a paired bracket, and its match. |pi_paren.txt|
|
||||||
ModeMsg = { fg = c.fg_dark, style = "bold" }, -- 'showmode' message (e.g., "-- INSERT -- ")
|
ModeMsg = { fg = c.fg_dark, bold = true }, -- 'showmode' message (e.g., "-- INSERT -- ")
|
||||||
MsgArea = { fg = c.fg_dark, bg = c.bg_sidebar }, -- Area for messages and cmdline
|
MsgArea = { fg = c.fg_dark, bg = c.bg_sidebar }, -- 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 = c.blue }, -- |more-prompt|
|
MoreMsg = { fg = c.blue }, -- |more-prompt|
|
||||||
@@ -69,20 +69,20 @@ function M.setup()
|
|||||||
PmenuSbar = { bg = util.lighten(c.bg_popup, 0.95) }, -- Popup menu: scrollbar.
|
PmenuSbar = { bg = util.lighten(c.bg_popup, 0.95) }, -- Popup menu: scrollbar.
|
||||||
PmenuThumb = { bg = c.fg_gutter }, -- Popup menu: Thumb of the scrollbar.
|
PmenuThumb = { bg = c.fg_gutter }, -- Popup menu: Thumb of the scrollbar.
|
||||||
Question = { fg = c.blue }, -- |hit-enter| prompt and yes/no questions
|
Question = { fg = c.blue }, -- |hit-enter| prompt and yes/no questions
|
||||||
QuickFixLine = { bg = c.bg_visual, style = "bold" }, -- Current |quickfix| item in the quickfix window. Combined with |hl-CursorLine| when the cursor is there.
|
QuickFixLine = { bg = c.bg_visual, bold = true }, -- Current |quickfix| item in the quickfix window. Combined with |hl-CursorLine| when the cursor is there.
|
||||||
Search = { bg = c.bg_search, fg = c.fg }, -- Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand out.
|
Search = { bg = c.bg_search, fg = c.fg }, -- Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand out.
|
||||||
IncSearch = { bg = c.orange, fg = c.black }, -- 'incsearch' highlighting; also used for the text replaced with ":s///c"
|
IncSearch = { bg = c.orange, fg = c.black }, -- 'incsearch' highlighting; also used for the text replaced with ":s///c"
|
||||||
SpecialKey = { fg = c.dark3 }, -- Unprintable characters: text displayed differently from what it really is. But not 'listchars' whitespace. |hl-Whitespace|
|
SpecialKey = { fg = c.dark3 }, -- Unprintable characters: text displayed differently from what it really is. But not 'listchars' whitespace. |hl-Whitespace|
|
||||||
SpellBad = { sp = c.error, style = "undercurl" }, -- Word that is not recognized by the spellchecker. |spell| Combined with the highlighting used otherwise.
|
SpellBad = { sp = c.error, undercurl = true }, -- Word that is not recognized by the spellchecker. |spell| Combined with the highlighting used otherwise.
|
||||||
SpellCap = { sp = c.warning, style = "undercurl" }, -- Word that should start with a capital. |spell| Combined with the highlighting used otherwise.
|
SpellCap = { sp = c.warning, undercurl = true }, -- Word that should start with a capital. |spell| Combined with the highlighting used otherwise.
|
||||||
SpellLocal = { sp = c.info, 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 = c.info, undercurl = true }, -- Word that is recognized by the spellchecker as one that is used in another region. |spell| Combined with the highlighting used otherwise.
|
||||||
SpellRare = { sp = c.hint, 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 = c.hint, undercurl = true }, -- Word that is recognized by the spellchecker as one that is hardly ever used. |spell| Combined with the highlighting used otherwise.
|
||||||
StatusLine = { fg = c.fg_sidebar, bg = c.bg_statusline }, -- status line of current window
|
StatusLine = { fg = c.fg_sidebar, bg = c.bg_statusline }, -- status line of current window
|
||||||
StatusLineNC = { fg = c.fg_gutter, bg = c.bg_statusline }, -- 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 = c.fg_gutter, bg = c.bg_statusline }, -- 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 = c.bg_statusline, fg = c.fg_gutter }, -- tab pages line, not active tab page label
|
TabLine = { bg = c.bg_statusline, fg = c.fg_gutter }, -- tab pages line, not active tab page label
|
||||||
TabLineFill = { bg = c.black }, -- tab pages line, where there are no labels
|
TabLineFill = { bg = c.black }, -- tab pages line, where there are no labels
|
||||||
TabLineSel = { fg = c.black, bg = c.blue }, -- tab pages line, active tab page label
|
TabLineSel = { fg = c.black, bg = c.blue }, -- tab pages line, active tab page label
|
||||||
Title = { fg = c.blue, style = "bold" }, -- titles for output from ":set all", ":autocmd" etc.
|
Title = { fg = c.blue, bold = true }, -- titles for output from ":set all", ":autocmd" etc.
|
||||||
Visual = { bg = c.bg_visual }, -- Visual mode selection
|
Visual = { bg = c.bg_visual }, -- Visual mode selection
|
||||||
VisualNOS = { bg = c.bg_visual }, -- Visual mode selection when vim is "Not Owning the Selection".
|
VisualNOS = { bg = c.bg_visual }, -- Visual mode selection when vim is "Not Owning the Selection".
|
||||||
WarningMsg = { fg = c.warning }, -- warning messages
|
WarningMsg = { fg = c.warning }, -- warning messages
|
||||||
@@ -131,9 +131,9 @@ function M.setup()
|
|||||||
-- SpecialComment= { }, -- special things inside a comment
|
-- SpecialComment= { }, -- special things inside a comment
|
||||||
-- Debug = { }, -- debugging statements
|
-- Debug = { }, -- debugging statements
|
||||||
|
|
||||||
Underlined = { style = "underline" }, -- (preferred) text that stands out, HTML links
|
Underlined = { underline = true }, -- (preferred) text that stands out, HTML links
|
||||||
Bold = { style = "bold" },
|
Bold = { bold = true },
|
||||||
Italic = { style = "italic" },
|
Italic = { italic = true },
|
||||||
|
|
||||||
-- ("Ignore", below, may be invisible...)
|
-- ("Ignore", below, may be invisible...)
|
||||||
-- Ignore = { }, -- (preferred) left blank, hidden |hl-Ignore|
|
-- Ignore = { }, -- (preferred) left blank, hidden |hl-Ignore|
|
||||||
@@ -144,24 +144,24 @@ function M.setup()
|
|||||||
qfLineNr = { fg = c.dark5 },
|
qfLineNr = { fg = c.dark5 },
|
||||||
qfFileName = { fg = c.blue },
|
qfFileName = { fg = c.blue },
|
||||||
|
|
||||||
htmlH1 = { fg = c.magenta, style = "bold" },
|
htmlH1 = { fg = c.magenta, bold = true },
|
||||||
htmlH2 = { fg = c.blue, style = "bold" },
|
htmlH2 = { fg = c.blue, bold = true },
|
||||||
|
|
||||||
-- mkdHeading = { fg = c.orange, style = "bold" },
|
-- mkdHeading = { fg = c.orange, bold = true },
|
||||||
-- mkdCode = { bg = c.terminal_black, fg = c.fg },
|
-- mkdCode = { bg = c.terminal_black, fg = c.fg },
|
||||||
mkdCodeDelimiter = { bg = c.terminal_black, fg = c.fg },
|
mkdCodeDelimiter = { bg = c.terminal_black, fg = c.fg },
|
||||||
mkdCodeStart = { fg = c.teal, style = "bold" },
|
mkdCodeStart = { fg = c.teal, bold = true },
|
||||||
mkdCodeEnd = { fg = c.teal, style = "bold" },
|
mkdCodeEnd = { fg = c.teal, bold = true },
|
||||||
-- mkdLink = { fg = c.blue, style = "underline" },
|
-- mkdLink = { fg = c.blue, underline = true },
|
||||||
|
|
||||||
markdownHeadingDelimiter = { fg = c.orange, style = "bold" },
|
markdownHeadingDelimiter = { fg = c.orange, bold = true },
|
||||||
markdownCode = { fg = c.teal },
|
markdownCode = { fg = c.teal },
|
||||||
markdownCodeBlock = { fg = c.teal },
|
markdownCodeBlock = { fg = c.teal },
|
||||||
markdownH1 = { fg = c.magenta, style = "bold" },
|
markdownH1 = { fg = c.magenta, bold = true },
|
||||||
markdownH2 = { fg = c.blue, style = "bold" },
|
markdownH2 = { fg = c.blue, bold = true },
|
||||||
markdownLinkText = { fg = c.blue, style = "underline" },
|
markdownLinkText = { fg = c.blue, underline = true },
|
||||||
|
|
||||||
["@punctuation.special.markdown"] = { fg = c.orange, style = "bold" },
|
["@punctuation.special.markdown"] = { fg = c.orange, bold = true },
|
||||||
["@text.literal.markdown_inline"] = { bg = c.terminal_black, fg = c.blue },
|
["@text.literal.markdown_inline"] = { bg = c.terminal_black, fg = c.blue },
|
||||||
|
|
||||||
debugPC = { bg = c.bg_sidebar }, -- used for highlighting the current line in terminal-debug
|
debugPC = { bg = c.bg_sidebar }, -- used for highlighting the current line in terminal-debug
|
||||||
@@ -184,10 +184,10 @@ function M.setup()
|
|||||||
DiagnosticVirtualTextInfo = { bg = util.darken(c.info, 0.1), fg = c.info }, -- Used for "Information" diagnostic virtual text
|
DiagnosticVirtualTextInfo = { bg = util.darken(c.info, 0.1), fg = c.info }, -- Used for "Information" diagnostic virtual text
|
||||||
DiagnosticVirtualTextHint = { bg = util.darken(c.hint, 0.1), fg = c.hint }, -- Used for "Hint" diagnostic virtual text
|
DiagnosticVirtualTextHint = { bg = util.darken(c.hint, 0.1), fg = c.hint }, -- Used for "Hint" diagnostic virtual text
|
||||||
|
|
||||||
DiagnosticUnderlineError = { style = "undercurl", sp = c.error }, -- Used to underline "Error" diagnostics
|
DiagnosticUnderlineError = { undercurl = true, sp = c.error }, -- Used to underline "Error" diagnostics
|
||||||
DiagnosticUnderlineWarn = { style = "undercurl", sp = c.warning }, -- Used to underline "Warning" diagnostics
|
DiagnosticUnderlineWarn = { undercurl = true, sp = c.warning }, -- Used to underline "Warning" diagnostics
|
||||||
DiagnosticUnderlineInfo = { style = "undercurl", sp = c.info }, -- Used to underline "Information" diagnostics
|
DiagnosticUnderlineInfo = { undercurl = true, sp = c.info }, -- Used to underline "Information" diagnostics
|
||||||
DiagnosticUnderlineHint = { style = "undercurl", sp = c.hint }, -- Used to underline "Hint" diagnostics
|
DiagnosticUnderlineHint = { undercurl = true, sp = c.hint }, -- Used to underline "Hint" diagnostics
|
||||||
|
|
||||||
LspSignatureActiveParameter = { fg = c.orange },
|
LspSignatureActiveParameter = { fg = c.orange },
|
||||||
LspCodeLens = { fg = c.comment },
|
LspCodeLens = { fg = c.comment },
|
||||||
@@ -317,12 +317,12 @@ function M.setup()
|
|||||||
-- NvimTree
|
-- NvimTree
|
||||||
NvimTreeNormal = { fg = c.fg_sidebar, bg = c.bg_sidebar },
|
NvimTreeNormal = { fg = c.fg_sidebar, bg = c.bg_sidebar },
|
||||||
NvimTreeNormalNC = { fg = c.fg_sidebar, bg = c.bg_sidebar },
|
NvimTreeNormalNC = { fg = c.fg_sidebar, bg = c.bg_sidebar },
|
||||||
NvimTreeRootFolder = { fg = c.blue, style = "bold" },
|
NvimTreeRootFolder = { fg = c.blue, bold = true },
|
||||||
NvimTreeGitDirty = { fg = c.git.change },
|
NvimTreeGitDirty = { fg = c.git.change },
|
||||||
NvimTreeGitNew = { fg = c.git.add },
|
NvimTreeGitNew = { fg = c.git.add },
|
||||||
NvimTreeGitDeleted = { fg = c.git.delete },
|
NvimTreeGitDeleted = { fg = c.git.delete },
|
||||||
NvimTreeOpenedFile = { bg = c.bg_highlight },
|
NvimTreeOpenedFile = { bg = c.bg_highlight },
|
||||||
NvimTreeSpecialFile = { fg = c.purple, style = "underline" },
|
NvimTreeSpecialFile = { fg = c.purple, underline = true },
|
||||||
NvimTreeIndentMarker = { fg = c.fg_gutter },
|
NvimTreeIndentMarker = { fg = c.fg_gutter },
|
||||||
NvimTreeImageFile = { fg = c.fg_sidebar },
|
NvimTreeImageFile = { fg = c.fg_sidebar },
|
||||||
NvimTreeSymlink = { fg = c.blue },
|
NvimTreeSymlink = { fg = c.blue },
|
||||||
@@ -348,7 +348,7 @@ function M.setup()
|
|||||||
DashboardShortCut = { fg = c.cyan },
|
DashboardShortCut = { fg = c.cyan },
|
||||||
DashboardHeader = { fg = c.blue },
|
DashboardHeader = { fg = c.blue },
|
||||||
DashboardCenter = { fg = c.magenta },
|
DashboardCenter = { fg = c.magenta },
|
||||||
DashboardFooter = { fg = c.yellow, style = "italic" },
|
DashboardFooter = { fg = c.yellow, italic = true },
|
||||||
|
|
||||||
-- WhichKey
|
-- WhichKey
|
||||||
WhichKey = { fg = c.cyan },
|
WhichKey = { fg = c.cyan },
|
||||||
@@ -412,36 +412,36 @@ function M.setup()
|
|||||||
SneakScope = { bg = c.bg_visual },
|
SneakScope = { bg = c.bg_visual },
|
||||||
|
|
||||||
-- Hop
|
-- Hop
|
||||||
HopNextKey = { fg = c.magenta2, style = "bold" },
|
HopNextKey = { fg = c.magenta2, bold = true },
|
||||||
HopNextKey1 = { fg = c.blue2, style = "bold" },
|
HopNextKey1 = { fg = c.blue2, bold = true },
|
||||||
HopNextKey2 = { fg = util.darken(c.blue2, 0.3) },
|
HopNextKey2 = { fg = util.darken(c.blue2, 0.3) },
|
||||||
HopUnmatched = { fg = c.dark3 },
|
HopUnmatched = { fg = c.dark3 },
|
||||||
|
|
||||||
LeapMatch = { bg = c.magenta2, fg = c.fg, style = "bold" },
|
LeapMatch = { bg = c.magenta2, fg = c.fg, bold = true },
|
||||||
LeapLabelPrimary = { fg = c.magenta2, style = "bold" },
|
LeapLabelPrimary = { fg = c.magenta2, bold = true },
|
||||||
LeapLabelSecondary = { fg = c.green1, style = "bold" },
|
LeapLabelSecondary = { fg = c.green1, bold = true },
|
||||||
LeapBackdrop = { fg = c.dark3 },
|
LeapBackdrop = { fg = c.dark3 },
|
||||||
|
|
||||||
LightspeedGreyWash = { fg = c.dark3 },
|
LightspeedGreyWash = { fg = c.dark3 },
|
||||||
-- LightspeedCursor = { link = "Cursor" },
|
-- LightspeedCursor = { link = "Cursor" },
|
||||||
LightspeedLabel = { fg = c.magenta2, style = "bold,underline" },
|
LightspeedLabel = { fg = c.magenta2, bold = true, underline = true },
|
||||||
LightspeedLabelDistant = { fg = c.green1, style = "bold,underline" },
|
LightspeedLabelDistant = { fg = c.green1, bold = true, underline = true },
|
||||||
LightspeedLabelDistantOverlapped = { fg = c.green2, style = "underline" },
|
LightspeedLabelDistantOverlapped = { fg = c.green2, underline = true },
|
||||||
LightspeedLabelOverlapped = { fg = c.magenta2, style = "underline" },
|
LightspeedLabelOverlapped = { fg = c.magenta2, underline = true },
|
||||||
LightspeedMaskedChar = { fg = c.orange },
|
LightspeedMaskedChar = { fg = c.orange },
|
||||||
LightspeedOneCharMatch = { bg = c.magenta2, fg = c.fg, style = "bold" },
|
LightspeedOneCharMatch = { bg = c.magenta2, fg = c.fg, bold = true },
|
||||||
LightspeedPendingOpArea = { bg = c.magenta2, fg = c.fg },
|
LightspeedPendingOpArea = { bg = c.magenta2, fg = c.fg },
|
||||||
LightspeedShortcut = { bg = c.magenta2, fg = c.fg, style = "bold,underline" },
|
LightspeedShortcut = { bg = c.magenta2, fg = c.fg, bold = true, underline = true },
|
||||||
-- LightspeedShortcutOverlapped = { link = "LightspeedShortcut" },
|
-- LightspeedShortcutOverlapped = { link = "LightspeedShortcut" },
|
||||||
-- LightspeedUniqueChar = { link = "LightspeedUnlabeledMatch" },
|
-- LightspeedUniqueChar = { link = "LightspeedUnlabeledMatch" },
|
||||||
LightspeedUnlabeledMatch = { fg = c.blue2, style = "bold" },
|
LightspeedUnlabeledMatch = { fg = c.blue2, bold = true },
|
||||||
|
|
||||||
-- Cmp
|
-- Cmp
|
||||||
CmpDocumentation = { fg = c.fg, bg = c.bg_float },
|
CmpDocumentation = { fg = c.fg, bg = c.bg_float },
|
||||||
CmpDocumentationBorder = { fg = c.border_highlight, bg = c.bg_float },
|
CmpDocumentationBorder = { fg = c.border_highlight, bg = c.bg_float },
|
||||||
|
|
||||||
CmpItemAbbr = { fg = c.fg, bg = c.none },
|
CmpItemAbbr = { fg = c.fg, bg = c.none },
|
||||||
CmpItemAbbrDeprecated = { fg = c.fg_gutter, bg = c.none, style = "strikethrough" },
|
CmpItemAbbrDeprecated = { fg = c.fg_gutter, bg = c.none, strikethrough = true },
|
||||||
CmpItemAbbrMatch = { fg = c.blue1, bg = c.none },
|
CmpItemAbbrMatch = { fg = c.blue1, bg = c.none },
|
||||||
CmpItemAbbrMatchFuzzy = { fg = c.blue1, bg = c.none },
|
CmpItemAbbrMatchFuzzy = { fg = c.blue1, bg = c.none },
|
||||||
|
|
||||||
@@ -500,20 +500,20 @@ function M.setup()
|
|||||||
ScrollbarMisc = { fg = c.purple, bg = c.none },
|
ScrollbarMisc = { fg = c.purple, bg = c.none },
|
||||||
|
|
||||||
-- Mini
|
-- Mini
|
||||||
MiniCompletionActiveParameter = { style = "underline" },
|
MiniCompletionActiveParameter = { underline = true },
|
||||||
|
|
||||||
MiniCursorword = { bg = c.fg_gutter },
|
MiniCursorword = { bg = c.fg_gutter },
|
||||||
MiniCursorwordCurrent = { bg = c.fg_gutter },
|
MiniCursorwordCurrent = { bg = c.fg_gutter },
|
||||||
|
|
||||||
MiniIndentscopeSymbol = { fg = c.blue1 },
|
MiniIndentscopeSymbol = { fg = c.blue1 },
|
||||||
MiniIndentscopePrefix = { style = "nocombine" }, -- Make it invisible
|
MiniIndentscopePrefix = { nocombine = true }, -- Make it invisible
|
||||||
|
|
||||||
MiniJump = { fg = c.bg_highlight, bg = c.magenta },
|
MiniJump = { fg = c.bg_highlight, bg = c.magenta },
|
||||||
|
|
||||||
MiniJump2dSpot = { fg = c.magenta2, style = "bold,nocombine" },
|
MiniJump2dSpot = { fg = c.magenta2, bold = true, nocombine = true },
|
||||||
|
|
||||||
MiniStarterCurrent = { style = "nocombine" },
|
MiniStarterCurrent = { nocombine = true },
|
||||||
MiniStarterFooter = { fg = c.yellow, style = "italic" },
|
MiniStarterFooter = { fg = c.yellow, italic = true },
|
||||||
MiniStarterHeader = { fg = c.blue },
|
MiniStarterHeader = { fg = c.blue },
|
||||||
MiniStarterInactive = { fg = c.comment, style = options.styles.comments },
|
MiniStarterInactive = { fg = c.comment, style = options.styles.comments },
|
||||||
MiniStarterItem = { fg = c.fg, bg = options.transparent and c.none or c.bg },
|
MiniStarterItem = { fg = c.fg, bg = options.transparent and c.none or c.bg },
|
||||||
@@ -526,12 +526,12 @@ function M.setup()
|
|||||||
MiniStatuslineFileinfo = { fg = c.fg_dark, bg = c.bg_highlight },
|
MiniStatuslineFileinfo = { fg = c.fg_dark, bg = c.bg_highlight },
|
||||||
MiniStatuslineFilename = { fg = c.fg_dark, bg = c.fg_gutter },
|
MiniStatuslineFilename = { fg = c.fg_dark, bg = c.fg_gutter },
|
||||||
MiniStatuslineInactive = { fg = c.blue, bg = c.bg_statusline },
|
MiniStatuslineInactive = { fg = c.blue, bg = c.bg_statusline },
|
||||||
MiniStatuslineModeCommand = { fg = c.black, bg = c.yellow, style = "bold" },
|
MiniStatuslineModeCommand = { fg = c.black, bg = c.yellow, bold = true },
|
||||||
MiniStatuslineModeInsert = { fg = c.black, bg = c.green, style = "bold" },
|
MiniStatuslineModeInsert = { fg = c.black, bg = c.green, bold = true },
|
||||||
MiniStatuslineModeNormal = { fg = c.black, bg = c.blue, style = "bold" },
|
MiniStatuslineModeNormal = { fg = c.black, bg = c.blue, bold = true },
|
||||||
MiniStatuslineModeOther = { fg = c.black, bg = c.teal, style = "bold" },
|
MiniStatuslineModeOther = { fg = c.black, bg = c.teal, bold = true },
|
||||||
MiniStatuslineModeReplace = { fg = c.black, bg = c.red, style = "bold" },
|
MiniStatuslineModeReplace = { fg = c.black, bg = c.red, bold = true },
|
||||||
MiniStatuslineModeVisual = { fg = c.black, bg = c.magenta, style = "bold" },
|
MiniStatuslineModeVisual = { fg = c.black, bg = c.magenta, bold = true },
|
||||||
|
|
||||||
MiniSurround = { bg = c.orange, fg = c.black },
|
MiniSurround = { bg = c.orange, fg = c.black },
|
||||||
|
|
||||||
@@ -544,9 +544,9 @@ function M.setup()
|
|||||||
MiniTablineTabpagesection = { bg = c.bg_statusline, fg = c.none },
|
MiniTablineTabpagesection = { bg = c.bg_statusline, fg = c.none },
|
||||||
MiniTablineVisible = { fg = c.fg, bg = c.bg_statusline },
|
MiniTablineVisible = { fg = c.fg, bg = c.bg_statusline },
|
||||||
|
|
||||||
MiniTestEmphasis = { style = "bold" },
|
MiniTestEmphasis = { bold = true },
|
||||||
MiniTestFail = { fg = c.red, style = "bold" },
|
MiniTestFail = { fg = c.red, bold = true },
|
||||||
MiniTestPass = { fg = c.green, style = "bold" },
|
MiniTestPass = { fg = c.green, bold = true },
|
||||||
|
|
||||||
MiniTrailspace = { bg = c.red },
|
MiniTrailspace = { bg = c.red },
|
||||||
}
|
}
|
||||||
@@ -571,7 +571,7 @@ function M.setup()
|
|||||||
theme.defer = {}
|
theme.defer = {}
|
||||||
|
|
||||||
if options.hide_inactive_statusline then
|
if options.hide_inactive_statusline then
|
||||||
local inactive = { style = "underline", bg = c.none, fg = c.bg, sp = c.border }
|
local inactive = { underline = true, bg = c.none, fg = c.bg, sp = c.border }
|
||||||
|
|
||||||
-- StatusLineNC
|
-- StatusLineNC
|
||||||
theme.highlights.StatusLineNC = inactive
|
theme.highlights.StatusLineNC = inactive
|
||||||
|
|||||||
@@ -49,16 +49,21 @@ function M.invert_color(color)
|
|||||||
end
|
end
|
||||||
|
|
||||||
---@param group string
|
---@param group string
|
||||||
function M.highlight(group, color)
|
function M.highlight(group, hl)
|
||||||
group = ts.get(group)
|
group = ts.get(group)
|
||||||
if not group then
|
if not group then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local hl = { fg = color.fg, bg = color.bg, sp = color.sp, link = color.link }
|
if hl.style then
|
||||||
if color.style and color.style:lower() ~= "none" then
|
if type(hl.style) == "table" then
|
||||||
for s in string.gmatch(color.style, "([^,]+)") do
|
hl = vim.tbl_extend("force", hl, hl.style)
|
||||||
hl[s] = true
|
elseif hl.style:lower() ~= "none" then
|
||||||
|
-- handle old string style definitions
|
||||||
|
for s in string.gmatch(hl.style, "([^,]+)") do
|
||||||
|
hl[s] = true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
hl.style = nil
|
||||||
end
|
end
|
||||||
vim.api.nvim_set_hl(0, group, hl)
|
vim.api.nvim_set_hl(0, group, hl)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user