feat: callbacks to easily override (or add) colors and highlights

This commit is contained in:
Folke Lemaitre
2022-09-05 20:32:31 +02:00
parent ec13e0f44f
commit 12649d34fe
5 changed files with 71 additions and 91 deletions

View File

@@ -2,24 +2,35 @@ local M = {}
---@class Config
local defaults = {
style = "storm",
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
terminal_colors = true, -- Configure the colors used when opening a `:terminal` in Neovim |
styles = {
-- Style to be applied to different syntax groups
-- Value is any valid attr-list value `:help attr-list`
comments = "italic",
functions = "NONE",
keywords = "italic",
functions = "NONE",
variables = "NONE",
-- Background styles. Can be "dark", "transparent" or "normal"
sidebars = "dark", -- style for sidebars, see below
floats = "dark", -- style for floating windows
},
colors = {},
darkFloat = true,
darkSidebar = true,
dayBrightness = 0.3,
dev = false,
hideInactiveStatusline = false,
lualineBold = false,
sidebars = {},
terminalColors = true,
transparent = false,
transparentSidebar = false,
sidebars = { "qf", "help" }, -- Set a darker background on sidebar-like windows. For example: `["qf", "vista_kind", "terminal", "packer"]` |
day_brightness = 0.3, -- Adjusts the brightness of the colors of the **Day** style. Number between 0 and 1, from dull to vibrant colors |
hide_inactive_statusline = false, -- Enabling this option, will hide inactive statuslines and replace them with a thin border instead. Should work with the standard **StatusLine** and **LuaLine**. |
lualine_bold = false, -- When `true`, section headers in the lualine theme will be bold |
--- You can override specific color groups to use other groups or a hex color |
--- fucntion will be called with a ColorScheme table
---@param colors ColorScheme
on_colors = function(colors) end,
--- You can override specific highlights to use other groups or a hex color |
--- fucntion will be called with a Highlights and ColorScheme table
---@param highlights Highlights
---@param colors ColorScheme
on_highlights = function(highlights, colors) end,
}
---@type Config