feat: use new style definitions for hl groups. Keep backward compatibility for string styles

This commit is contained in:
Folke Lemaitre
2022-09-12 07:51:08 +02:00
parent fe120cc71e
commit 25a1a77b00
4 changed files with 80 additions and 73 deletions

View File

@@ -1,17 +1,19 @@
local M = {}
---@class Config
---@field on_colors fun(colors: ColorScheme)
---@field on_highlights fun(highlights: Highlights, colors: ColorScheme)
local defaults = {
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",
keywords = "italic",
functions = "NONE",
variables = "NONE",
-- Value is any valid attr-list value for `:help nvim_set_hl`
comments = { italic = true },
keywords = { italic = true },
functions = {},
variables = {},
-- Background styles. Can be "dark", "transparent" or "normal"
sidebars = "dark", -- style for sidebars, see below
floats = "dark", -- style for floating windows