diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..283165a --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_style = tab +insert_final_newline = true +trim_trailing_whitespace = true + +[*.{yaml,yml}] +indent_size = 2 +indent_style = space diff --git a/colors/rose-pine.lua b/colors/rose-pine.lua index fd735a8..f705290 100644 --- a/colors/rose-pine.lua +++ b/colors/rose-pine.lua @@ -1,3 +1,2 @@ -package.loaded['rose-pine.palette'] = nil - -require('rose-pine').colorscheme() +package.loaded["rose-pine.palette"] = nil +require("rose-pine").colorscheme() diff --git a/lua/lualine/themes/rose-pine-alt.lua b/lua/lualine/themes/rose-pine-alt.lua index 0f0ea8a..1edde05 100644 --- a/lua/lualine/themes/rose-pine-alt.lua +++ b/lua/lualine/themes/rose-pine-alt.lua @@ -1,18 +1,18 @@ local p = require("rose-pine.palette") return { - normal = { - a = {bg = p.surface, fg = p.rose, gui = "bold"}, - b = {bg = p.surface, fg = p.text}, - c = {bg = p.surface, fg = p.subtle, gui = "italic"} - }, - insert = {a = {bg = p.surface, fg = p.foam, gui = "bold"}}, - visual = {a = {bg = p.surface, fg = p.iris, gui = "bold"}}, - replace = {a = {bg = p.surface, fg = p.sand, gui = "bold"}}, - command = {a = {bg = p.surface, fg = p.love, gui = "bold"}}, - inactive = { - a = {bg = p.base, fg = p.subtle, gui = "bold"}, - b = {bg = p.base, fg = p.subtle}, - c = {bg = p.base, fg = p.subtle, gui = "italic"} - } + normal = { + a = { bg = p.surface, fg = p.rose, gui = "bold" }, + b = { bg = p.surface, fg = p.text }, + c = { bg = p.surface, fg = p.subtle, gui = "italic" }, + }, + insert = { a = { bg = p.surface, fg = p.foam, gui = "bold" } }, + visual = { a = { bg = p.surface, fg = p.iris, gui = "bold" } }, + replace = { a = { bg = p.surface, fg = p.sand, gui = "bold" } }, + command = { a = { bg = p.surface, fg = p.love, gui = "bold" } }, + inactive = { + a = { bg = p.base, fg = p.subtle, gui = "bold" }, + b = { bg = p.base, fg = p.subtle }, + c = { bg = p.base, fg = p.subtle, gui = "italic" }, + }, } diff --git a/lua/lualine/themes/rose-pine.lua b/lua/lualine/themes/rose-pine.lua index fde9192..e8dfd1c 100644 --- a/lua/lualine/themes/rose-pine.lua +++ b/lua/lualine/themes/rose-pine.lua @@ -1,34 +1,34 @@ local p = require("rose-pine.palette") return { - normal = { - a = {bg = p.pink, fg = p.base, gui = "bold"}, - b = {bg = p.overlay, fg = p.rose}, - c = {bg = p.base, fg = p.text} - }, - insert = { - a = {bg = p.foam, fg = p.base, gui = "bold"}, - b = {bg = p.overlay, fg = p.foam}, - c = {bg = p.base, fg = p.text} - }, - visual = { - a = {bg = p.iris, fg = p.base, gui = "bold"}, - b = {bg = p.overlay, fg = p.iris}, - c = {bg = p.base, fg = p.text} - }, - replace = { - a = {bg = p.sand, fg = p.base, gui = "bold"}, - b = {bg = p.overlay, fg = p.sand}, - c = {bg = p.base, fg = p.text} - }, - command = { - a = {bg = p.sand, fg = p.base, gui = "bold"}, - b = {bg = p.overlay, fg = p.love}, - c = {bg = p.base, fg = p.text} - }, - inactive = { - a = {bg = p.base, fg = p.muted, gui = "bold"}, - b = {bg = p.base, fg = p.muted}, - c = {bg = p.base, fg = p.muted} - } + normal = { + a = { bg = p.pink, fg = p.base, gui = "bold" }, + b = { bg = p.overlay, fg = p.rose }, + c = { bg = p.base, fg = p.text }, + }, + insert = { + a = { bg = p.foam, fg = p.base, gui = "bold" }, + b = { bg = p.overlay, fg = p.foam }, + c = { bg = p.base, fg = p.text }, + }, + visual = { + a = { bg = p.iris, fg = p.base, gui = "bold" }, + b = { bg = p.overlay, fg = p.iris }, + c = { bg = p.base, fg = p.text }, + }, + replace = { + a = { bg = p.sand, fg = p.base, gui = "bold" }, + b = { bg = p.overlay, fg = p.sand }, + c = { bg = p.base, fg = p.text }, + }, + command = { + a = { bg = p.sand, fg = p.base, gui = "bold" }, + b = { bg = p.overlay, fg = p.love }, + c = { bg = p.base, fg = p.text }, + }, + inactive = { + a = { bg = p.base, fg = p.muted, gui = "bold" }, + b = { bg = p.base, fg = p.muted }, + c = { bg = p.base, fg = p.muted }, + }, } diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua index 5c18b9c..b3cf3ea 100644 --- a/lua/rose-pine.lua +++ b/lua/rose-pine.lua @@ -1,17 +1,22 @@ -local util = require("rose-pine.util") - +local config = require('rose-pine.config') local M = {} -function M.colorscheme() - if vim.g.colors_name then vim.cmd('hi clear') end +---@param variant Variant|nil +function M.colorscheme(variant) + config.extend({ variant = variant }) - vim.opt.termguicolors = true - vim.g.colors_name = "rose-pine" + vim.opt.termguicolors = true + if vim.g.colors_name then + vim.cmd('hi clear') + vim.cmd('syntax reset') + end + vim.g.colors_name = 'rose-pine' - local theme = require("rose-pine.theme").get_theme() + require('rose-pine.theme')._load(config.options) +end - -- Set theme highlights - for group, color in pairs(theme) do util.highlight(group, color) end +function M.setup(options) + config.extend(options) end return M diff --git a/lua/rose-pine/config.lua b/lua/rose-pine/config.lua new file mode 100644 index 0000000..2d1b98a --- /dev/null +++ b/lua/rose-pine/config.lua @@ -0,0 +1,68 @@ +---@alias Variant "main" | "moon" | "dawn" +---@alias Color { fg: string, bg: string, sp: string, bold: boolean, italic: boolean, undercurl: boolean, underline: boolean, underdouble: boolean, underdotted: boolean, underdashed: boolean, strikethrough: boolean } + +local M = {} + +---@class Options +M.options = { + ---Set the desired variant: "auto" will follow the vim background, + ---defaulting to "main" for dark and "dawn" for light. To change the dark + ---variant, use `options.dark_variant = "moon"`. + ---@type "auto" | Variant + variant = "auto", + + ---Set the desired dark variant: applies when `options.variant` is set to + ---"auto" to match `vim.o.background`. + ---@type Variant + dark_variant = "main", + + bold_vert_split = false, + + dim_nc_background = false, + + disable_background = false, + disable_float_background = false, + disable_italics = false, + + groups = { + background = "base", + background_nc = "nc", + panel = "surface", + panel_nc = "base", + border = "highlight_med", + comment = "muted", + link = "iris", + punctuation = "muted", + error = "crimson", + hint = "foam", + info = "iris", + warn = "gold", + git_add = "foam", + git_change = "rose", + git_delete = "crimson", + git_dirty = "rose", + git_ignore = "muted", + git_merge = "iris", + git_rename = "sand", + git_stage = "iris", + git_text = "rose", + headings = { + h1 = "iris", + h2 = "foam", + h3 = "rose", + h4 = "gold", + h5 = "sand", + h6 = "foam", + }, + }, + + ---@type table + highlight_groups = {}, +} + +---@param options Options|nil +function M.extend(options) + M.options = vim.tbl_deep_extend("force", M.options, options or {}) +end + +return M diff --git a/lua/rose-pine/palette.lua b/lua/rose-pine/palette.lua index 621b30b..b8bff71 100644 --- a/lua/rose-pine/palette.lua +++ b/lua/rose-pine/palette.lua @@ -1,25 +1,28 @@ local palette = { - base = "#181722", -- idk - surface = "#1f1d2e", -- dark blue - overlay = "#26233a", -- dark blue - muted = "#6e6a86", -- gray? - subtle = "#908caa", -- gray? - text = "#e0def4", -- light light blue - love = "#e89b9f", -- red? - ocean = "#b2b13c", -- orange? - blu = "#8487c7", -- ??? - crimson = "#fa4678", -- red - gold = "#f59d56", - rose = "#ff82b4", - calm = "#23ff87", -- green - sand = "#cecda7", - foam = "#7acfd8", -- turquoise - pink = "#ebb9bf", -- pink - iris = "#c4a7e7", -- - highlight_low = "#21202e", - highlight_med = "#403d52", - highlight_high = "#524f67", - none = "NONE" + ---@deprecated for backwards compatibility + _experimental_nc = "#16141f", + nc = "#16141f", + base = "#181722", -- idk + surface = "#1f1d2e", -- dark blue + overlay = "#26233a", -- dark blue + muted = "#6e6a86", -- gray? + subtle = "#908caa", -- gray? + text = "#e0def4", -- light light blue + love = "#e89b9f", -- red? + ocean = "#b2b13c", -- orange? + blu = "#8487c7", -- ??? + crimson = "#fa4678", -- red + gold = "#f59d56", + rose = "#ff82b4", + calm = "#23ff87", -- green + sand = "#cecda7", + foam = "#7acfd8", -- turquoise + pink = "#ebb9bf", -- pink + iris = "#c4a7e7", -- + highlight_low = "#21202e", + highlight_med = "#403d52", + highlight_high = "#524f67", + none = "NONE", } return palette diff --git a/lua/rose-pine/plugins/bufferline.lua b/lua/rose-pine/plugins/bufferline.lua index db722cf..9f85ccd 100644 --- a/lua/rose-pine/plugins/bufferline.lua +++ b/lua/rose-pine/plugins/bufferline.lua @@ -5,7 +5,7 @@ --- local highlights = require('rose-pine.plugins.bufferline') --- require('bufferline').setup({ highlights = highlights }) -local p = require('rose-pine.palette') +local p = require("rose-pine.palette") return { -- fill = { @@ -20,10 +20,10 @@ return { -- fg = '', -- bg = '', -- }, - -- tab_selected = { - -- fg = '', - -- bg = '', - -- }, + tab_selected = { + fg = p.text, + bg = p.overlay, + }, -- tab_close = { -- fg = '', -- bg = '', diff --git a/lua/rose-pine/plugins/galaxyline.lua b/lua/rose-pine/plugins/galaxyline.lua index 7187fc9..4868baf 100644 --- a/lua/rose-pine/plugins/galaxyline.lua +++ b/lua/rose-pine/plugins/galaxyline.lua @@ -3,17 +3,17 @@ --- --- @usage --- local highlights = require('rose-pine.plugins.galaxyline') -local p = require('rose-pine.palette') +local p = require("rose-pine.palette") return { - bg = p.surface, - fg = p.text, - fg_alt = p.subtle, - yellow = p.gold, - cyan = p.rose, - green = p.pine, - orange = p.muted, - magenta = p.iris, - blue = p.foam, - red = p.love + bg = p.surface, + fg = p.text, + fg_alt = p.subtle, + yellow = p.gold, + cyan = p.rose, + green = p.pine, + orange = p.muted, + magenta = p.iris, + blue = p.foam, + red = p.love, } diff --git a/lua/rose-pine/plugins/markid.lua b/lua/rose-pine/plugins/markid.lua index e4aa77f..14291c8 100644 --- a/lua/rose-pine/plugins/markid.lua +++ b/lua/rose-pine/plugins/markid.lua @@ -4,6 +4,6 @@ --- @usage --- local highlights = require('rose-pine.plugins.markid') --- require("nvim-treesitter.configs").setup({ markid = { enable = true, colors = highlights } }) -local p = require('rose-pine.palette') +local p = require("rose-pine.palette") -return {p.foam, p.rose, p.iris} +return { p.foam, p.rose, p.iris } diff --git a/lua/rose-pine/plugins/toggleterm.lua b/lua/rose-pine/plugins/toggleterm.lua index a1a26b6..427a472 100644 --- a/lua/rose-pine/plugins/toggleterm.lua +++ b/lua/rose-pine/plugins/toggleterm.lua @@ -5,10 +5,10 @@ --- local highlights = require('rose-pine.plugins.toggleterm') --- require('toggleterm').setup({ highlights = highlights }) return { - Normal = {link = 'Normal'}, - NormalFloat = {link = 'Normal'}, - FloatBorder = {link = 'FloatBorder'}, - SignColumn = {link = 'SignColumn'}, - StatusLine = {link = 'StatusLine'}, - StatusLineNC = {link = 'StatusLineNC'} + Normal = { link = "Normal" }, + NormalFloat = { link = "Normal" }, + FloatBorder = { link = "FloatBorder" }, + SignColumn = { link = "SignColumn" }, + StatusLine = { link = "StatusLine" }, + StatusLineNC = { link = "StatusLineNC" }, } diff --git a/lua/rose-pine/theme.lua b/lua/rose-pine/theme.lua index d133655..3d116a9 100644 --- a/lua/rose-pine/theme.lua +++ b/lua/rose-pine/theme.lua @@ -1,572 +1,599 @@ -local blend = require("rose-pine.util").blend - local M = {} -function M.get_theme() - local p = require("rose-pine.palette") +---@param options Options +function M._load(options) + local h = require("rose-pine.util").highlight + local p = require("rose-pine.palette") - local theme = {} - local groups = { - background = "base", - panel = "surface", - border = "highlight_med", - comment = "muted", - link = "iris", - punctuation = "muted", + local groups = options.groups or {} + local maybe = { + base = (options.disable_background and p.none) or groups.background, + surface = (options.disable_float_background and p.none) or groups.panel, + italic = not options.disable_italics, + } + maybe.bold_vert_split = (options.bold_vert_split and groups.border) or p.none + maybe.dim_nc_background = (options.dim_nc_background and groups.background_nc) or maybe.base - error = "crimson", - hint = "foam", - info = "iris", - warn = "gold", + local float_background = options.dim_nc_background + and (options.disable_float_background and groups.panel_nc or groups.panel) + or maybe.surface - git_add = "foam", - git_change = "rose", - git_delete = "crimson", - git_dirty = "rose", - git_ignore = "muted", - git_merge = "iris", - git_rename = "sand", - git_stage = "iris", - git_text = "rose", + M.defaults = { + ["ColorColumn"] = { bg = p.overlay }, + ["Conceal"] = { bg = p.none }, + ["CurSearch"] = { link = "IncSearch" }, + ["Cursor"] = { fg = p.text, bg = p.highlight_high }, + ["CursorColumn"] = { bg = p.highlight_low }, + -- CursorIM = {}, + ["CursorLine"] = { bg = p.highlight_low }, + ["CursorLineNr"] = { fg = p.text }, + ["DarkenedPanel"] = { bg = maybe.surface }, + ["DarkenedStatusline"] = { bg = maybe.surface }, + ["DiffAdd"] = { bg = groups.git_add, blend = 20 }, - headings = { - h1 = "iris", - h2 = "foam", - h3 = "rose", - h4 = "gold", - h5 = "sand", - h6 = "foam" - } - } + ["DiffChange"] = { bg = p.overlay }, + ["DiffDelete"] = { bg = groups.git_delete, blend = 20 }, + ["DiffText"] = { bg = groups.git_text, blend = 20 }, + ["diffAdded"] = { link = "DiffAdd" }, + ["diffChanged"] = { link = "DiffChange" }, + ["diffRemoved"] = { link = "DiffDelete" }, + ["Directory"] = { fg = p.foam, bg = p.none }, + -- EndOfBuffer = {}, + ["ErrorMsg"] = { fg = p.crimson, bold = true }, + ["FloatBorder"] = { fg = groups.border, bg = maybe.surface }, + ["FloatTitle"] = { fg = p.muted }, + ["FoldColumn"] = { fg = p.muted }, + ["Folded"] = { fg = p.text, bg = maybe.surface }, + ["IncSearch"] = { fg = p.base, bg = p.rose }, -- idk + ["LineNr"] = { fg = p.muted }, + ["MatchParen"] = { fg = p.text, bg = p.highlight_med }, + ["ModeMsg"] = { fg = p.subtle }, + ["MoreMsg"] = { fg = p.iris }, + ["NonText"] = { fg = p.muted }, + ["Normal"] = { fg = p.text, bg = maybe.base }, + ["NormalFloat"] = { fg = p.text, bg = maybe.surface }, + ["NormalNC"] = { fg = p.text, bg = maybe.dim_nc_background }, + ["NvimInternalError"] = { fg = "#ffffff", bg = p.love }, + ["Pmenu"] = { fg = p.subtle, bg = maybe.surface }, + ["PmenuSbar"] = { bg = p.highlight_low }, + ["PmenuSel"] = { fg = p.text, bg = p.overlay }, + ["PmenuThumb"] = { bg = p.highlight_med }, + ["Question"] = { fg = p.gold }, + -- QuickFixLine = {}, + -- RedrawDebugNormal = {} + ["RedrawDebugClear"] = { fg = "#ffffff", bg = p.gold }, + ["RedrawDebugComposed"] = { fg = "#ffffff", bg = p.sand }, + ["RedrawDebugRecompose"] = { fg = "#ffffff", bg = p.crimson }, + ["Search"] = { bg = p.highlight_med }, + ["SpecialKey"] = { fg = p.foam }, + ["SpellBad"] = { sp = p.subtle, undercurl = true }, + ["SpellCap"] = { sp = p.subtle, undercurl = true }, + ["SpellLocal"] = { sp = p.subtle, undercurl = true }, + ["SpellRare"] = { sp = p.subtle, undercurl = true }, + ["SignColumn"] = { + fg = p.text, + bg = (options.dim_nc_background and p.none) or maybe.base, + }, + ["Substitute"] = { fg = p.base, bg = p.love }, -- IDK + ["StatusLine"] = { fg = p.subtle, bg = groups.panel }, + ["StatusLineNC"] = { fg = p.muted, bg = groups.panel_nc }, + ["StatusLineTerm"] = { link = "StatusLine" }, + ["StatusLineTermNC"] = { link = "StatusLineNC" }, + ["TabLine"] = { fg = p.subtle, bg = groups.panel }, + ["TabLineFill"] = { bg = groups.panel }, + ["TabLineSel"] = { fg = p.text, bg = p.overlay }, + ["Title"] = { fg = p.text }, + ["VertSplit"] = { fg = groups.border, bg = maybe.bold_vert_split }, + ["Visual"] = { bg = p.highlight_med }, + -- VisualNOS = {}, + ["WarningMsg"] = { fg = p.gold }, + -- Whitespace = {}, + ["WildMenu"] = { link = "IncSearch" }, - local styles = { - italic = "italic", - bold = "bold", - vert_split = p.none, - background = groups.background, - float_background = groups.panel - } - styles.nc_background = styles.background + ["Boolean"] = { fg = p.blu, italic = maybe.italic }, + ["Character"] = { fg = p.gold }, + ["Comment"] = { fg = groups.comment, italic = maybe.italic }, + ["Conditional"] = { fg = p.sand }, + ["Constant"] = { fg = p.foam }, -- IDK or gold + ["Debug"] = { fg = p.rose }, + ["Define"] = { fg = p.iris }, + ["Delimiter"] = { fg = p.subtle }, + ["Error"] = { fg = p.crimson }, + ["Exception"] = { fg = p.sand }, + ["Float"] = { fg = p.gold }, + ["Function"] = { fg = p.ocean }, + ["Identifier"] = { fg = p.rose }, + -- Ignore = {}, + ["Include"] = { fg = p.sand }, + ["Keyword"] = { fg = p.sand, italic = maybe.italic }, + ["Label"] = { fg = p.foam }, + ["Macro"] = { fg = p.iris }, + ["Number"] = { fg = p.gold }, + ["Operator"] = { fg = p.subtle }, + ["PreCondit"] = { fg = p.iris }, + ["PreProc"] = { fg = p.iris }, + ["Repeat"] = { fg = p.sand }, + ["Special"] = { fg = p.rose }, + ["SpecialChar"] = { fg = p.rose }, + ["SpecialComment"] = { fg = p.iris }, + ["Statement"] = { fg = p.sand }, + ["StorageClass"] = { fg = p.foam }, + ["String"] = { fg = p.calm }, + ["Structure"] = { fg = p.foam }, + ["Tag"] = { fg = p.foam }, + ["Todo"] = { fg = p.iris }, + ["Type"] = { fg = p.foam }, + ["Typedef"] = { link = "Type" }, + ["Underlined"] = { underline = true }, - theme = { - ColorColumn = {bg = p.overlay}, - Conceal = {bg = p.none}, - CurSearch = {link = "IncSearch"}, - -- Cursor = {}, - CursorColumn = {bg = p.highlight_low}, - -- CursorIM = {}, - CursorLine = {bg = p.highlight_low}, - CursorLineNr = {fg = p.text}, - DarkenedPanel = {bg = groups.panel}, - DarkenedStatusline = {bg = groups.panel}, - DiffAdd = {bg = blend(groups.git_add, groups.background, 0.5)}, - DiffChange = {bg = p.overlay}, - DiffDelete = {bg = blend(groups.git_delete, groups.background, 0.5)}, - DiffText = {bg = blend(groups.git_text, groups.background, 0.5)}, - diffAdded = {link = "DiffAdd"}, - diffChanged = {link = "DiffChange"}, - diffRemoved = {link = "DiffDelete"}, - Directory = {fg = p.foam, bg = p.none}, - -- EndOfBuffer = {}, - ErrorMsg = {fg = p.crimson, style = styles.bold}, - FloatBorder = {fg = groups.border}, - FloatTitle = {fg = p.muted}, - FoldColumn = {fg = p.muted}, - Folded = {fg = p.text, bg = groups.panel}, - IncSearch = {fg = p.base, bg = p.rose}, - LineNr = {fg = p.subtle}, - MatchParen = {fg = p.text, bg = p.highlight_med}, - ModeMsg = {fg = p.subtle}, - MoreMsg = {fg = p.iris}, - NonText = {fg = p.muted}, - Normal = {fg = p.text, bg = styles.background}, - NormalFloat = {fg = p.text, bg = styles.float_background}, - NormalNC = {fg = p.text, bg = styles.nc_background}, - NvimInternalError = {fg = "#ffffff", bg = p.crimson}, - Pmenu = {fg = p.subtle, bg = styles.float_background}, - PmenuSbar = {bg = p.highlight_low}, - PmenuSel = {fg = p.text, bg = p.overlay}, - PmenuThumb = {bg = p.highlight_med}, - Question = {fg = p.gold}, - -- QuickFixLine = {}, - -- RedrawDebugNormal = {} - RedrawDebugClear = {fg = "#ffffff", bg = p.gold}, - RedrawDebugComposed = {fg = "#ffffff", bg = p.sand}, - RedrawDebugRecompose = {fg = "#ffffff", bg = p.crimson}, - Search = {bg = p.highlight_med}, - SpecialKey = {fg = p.foam}, - SpellBad = {sp = p.subtle, style = "undercurl"}, - SpellCap = {sp = p.subtle, style = "undercurl"}, - SpellLocal = {sp = p.subtle, style = "undercurl"}, - SpellRare = {sp = p.subtle, style = "undercurl"}, - SignColumn = {fg = p.text, bg = styles.background}, - StatusLine = {fg = p.subtle, bg = styles.float_background}, - StatusLineNC = {fg = p.muted, bg = styles.background}, - StatusLineTerm = {link = "StatusLine"}, - StatusLineTermNC = {link = "StatusLineNC"}, - TabLine = {fg = p.subtle, bg = styles.float_background}, - TabLineFill = {bg = styles.float_background}, - TabLineSel = {fg = p.text, bg = p.overlay}, - Title = {fg = p.text}, - VertSplit = {fg = groups.border, bg = styles.vert_split}, - Visual = {bg = p.highlight_med}, - -- VisualNOS = {}, - WarningMsg = {fg = p.gold}, - -- Whitespace = {}, - WildMenu = {link = "IncSearch"}, + ["htmlArg"] = { fg = p.iris }, + ["htmlBold"] = { bold = true }, + ["htmlEndTag"] = { fg = p.subtle }, + ["htmlH1"] = { fg = groups.headings.h1, bold = true }, + ["htmlH2"] = { fg = groups.headings.h2, bold = true }, + ["htmlH3"] = { fg = groups.headings.h3, bold = true }, + ["htmlH4"] = { fg = groups.headings.h4, bold = true }, + ["htmlH5"] = { fg = groups.headings.h5, bold = true }, + ["htmlItalic"] = { italic = maybe.italic }, + ["htmlLink"] = { fg = groups.link }, + ["htmlTag"] = { fg = p.subtle }, + ["htmlTagN"] = { fg = p.text }, + ["htmlTagName"] = { fg = p.foam }, - Boolean = {fg = p.blu, style = styles.italic}, - Character = {fg = p.gold}, - Comment = {fg = groups.comment, style = styles.italic}, - Conditional = {fg = p.sand}, - Constant = {fg = p.gold}, - Debug = {fg = p.rose}, - Define = {fg = p.iris}, - Delimiter = {fg = p.subtle}, - Error = {fg = p.crimson}, - Exception = {fg = p.sand}, - Float = {fg = p.gold}, - Function = {fg = p.ocean}, - Identifier = {fg = p.rose}, - -- Ignore = {}, - Include = {fg = p.iris}, - Keyword = {fg = p.sand, style = styles.italic}, - Label = {fg = p.foam}, - Macro = {fg = p.iris}, - Number = {fg = p.gold}, - Operator = {fg = p.subtle}, - PreCondit = {fg = p.iris}, - PreProc = {fg = p.iris}, - Repeat = {fg = p.sand}, - Special = {fg = p.rose}, - SpecialChar = {fg = p.rose}, - SpecialComment = {fg = p.iris}, - Statement = {fg = p.sand}, - StorageClass = {fg = p.foam}, - String = {fg = p.calm}, - Structure = {fg = p.foam}, - Tag = {fg = p.rose}, - Todo = {fg = p.iris}, - Type = {fg = p.foam}, - Typedef = {fg = p.foam}, - Underlined = {style = "underline"}, + ["markdownDelimiter"] = { fg = p.subtle }, + ["markdownH1"] = { fg = groups.headings.h1, bold = true }, + ["markdownH1Delimiter"] = { link = "markdownH1" }, + ["markdownH2"] = { fg = groups.headings.h2, bold = true }, + ["markdownH2Delimiter"] = { link = "markdownH2" }, + ["markdownH3"] = { fg = groups.headings.h3, bold = true }, + ["markdownH3Delimiter"] = { link = "markdownH3" }, + ["markdownH4"] = { fg = groups.headings.h4, bold = true }, + ["markdownH4Delimiter"] = { link = "markdownH4" }, + ["markdownH5"] = { fg = groups.headings.h5, bold = true }, + ["markdownH5Delimiter"] = { link = "markdownH5" }, + ["markdownH6"] = { fg = groups.headings.h6, bold = true }, + ["markdownH6Delimiter"] = { link = "markdownH6" }, + ["markdownLinkText"] = { fg = groups.link, sp = groups.link, underline = true }, + ["markdownUrl"] = { link = "markdownLinkText" }, - htmlArg = {fg = p.iris}, - htmlBold = {style = styles.bold}, - htmlEndTag = {fg = p.subtle}, - htmlH1 = {fg = groups.headings.h1, style = styles.bold}, - htmlH2 = {fg = groups.headings.h2, style = styles.bold}, - htmlH3 = {fg = groups.headings.h3, style = styles.bold}, - htmlH4 = {fg = groups.headings.h4, style = styles.bold}, - htmlH5 = {fg = groups.headings.h5, style = styles.bold}, - htmlItalic = {style = styles.italic}, - htmlLink = {fg = groups.link}, - htmlTag = {fg = p.subtle}, - htmlTagN = {fg = p.text}, - htmlTagName = {fg = p.foam}, + ["mkdCode"] = { fg = p.foam, italic = maybe.italic }, + ["mkdCodeDelimiter"] = { fg = p.rose }, + ["mkdCodeEnd"] = { fg = p.foam }, + ["mkdCodeStart"] = { fg = p.foam }, + ["mkdFootnotes"] = { fg = p.foam }, + ["mkdID"] = { fg = p.foam, underline = true }, + ["mkdInlineURL"] = { fg = groups.link, underline = true }, + ["mkdLink"] = { link = "mkdInlineURL" }, + ["mkdLinkDef"] = { link = "mkdInlineURL" }, + ["mkdListItemLine"] = { fg = p.text }, + ["mkdRule"] = { fg = p.subtle }, + ["mkdURL"] = { link = "mkdInlineURL" }, - markdownDelimiter = {fg = p.subtle}, - markdownH1 = {fg = groups.headings.h1, style = styles.bold}, - markdownH1Delimiter = {link = "markdownH1"}, - markdownH2 = {fg = groups.headings.h2, style = styles.bold}, - markdownH2Delimiter = {link = "markdownH2"}, - markdownH3 = {fg = groups.headings.h3, style = styles.bold}, - markdownH3Delimiter = {link = "markdownH3"}, - markdownH4 = {fg = groups.headings.h4, style = styles.bold}, - markdownH4Delimiter = {link = "markdownH4"}, - markdownH5 = {fg = groups.headings.h5, style = styles.bold}, - markdownH5Delimiter = {link = "markdownH5"}, - markdownH6 = {fg = groups.headings.h6, style = styles.bold}, - markdownH6Delimiter = {link = "markdownH6"}, - markdownLinkText = {fg = groups.link, style = "underline"}, - markdownUrl = {link = "markdownLinkText"}, + ["DiagnosticError"] = { fg = groups.error }, + ["DiagnosticHint"] = { fg = groups.hint }, + ["DiagnosticInfo"] = { fg = groups.info }, + ["DiagnosticWarn"] = { fg = groups.warn }, + ["DiagnosticDefaultError"] = { fg = groups.error }, + ["DiagnosticDefaultHint"] = { fg = groups.hint }, + ["DiagnosticDefaultInfo"] = { fg = groups.info }, + ["DiagnosticDefaultWarn"] = { fg = groups.warn }, + ["DiagnosticFloatingError"] = { fg = groups.error }, + ["DiagnosticFloatingHint"] = { fg = groups.hint }, + ["DiagnosticFloatingInfo"] = { fg = groups.info }, + ["DiagnosticFloatingWarn"] = { fg = groups.warn }, + ["DiagnosticSignError"] = { fg = groups.error }, + ["DiagnosticSignHint"] = { fg = groups.hint }, + ["DiagnosticSignInfo"] = { fg = groups.info }, + ["DiagnosticSignWarn"] = { fg = groups.warn }, + ["DiagnosticStatusLineError"] = { fg = groups.error, bg = groups.panel }, + ["DiagnosticStatusLineHint"] = { fg = groups.hint, bg = groups.panel }, + ["DiagnosticStatusLineInfo"] = { fg = groups.info, bg = groups.panel }, + ["DiagnosticStatusLineWarn"] = { fg = groups.warn, bg = groups.panel }, + ["DiagnosticUnderlineError"] = { sp = groups.error, undercurl = true }, + ["DiagnosticUnderlineHint"] = { sp = groups.hint, undercurl = true }, + ["DiagnosticUnderlineInfo"] = { sp = groups.info, undercurl = true }, + ["DiagnosticUnderlineWarn"] = { sp = groups.warn, undercurl = true }, + ["DiagnosticVirtualTextError"] = { fg = groups.error }, + ["DiagnosticVirtualTextHint"] = { fg = groups.hint }, + ["DiagnosticVirtualTextInfo"] = { fg = groups.info }, + ["DiagnosticVirtualTextWarn"] = { fg = groups.warn }, - mkdCode = {fg = p.foam, style = styles.italic}, - mkdCodeDelimiter = {fg = p.rose}, - mkdCodeEnd = {fg = p.foam}, - mkdCodeStart = {fg = p.foam}, - mkdFootnotes = {fg = p.foam}, - mkdID = {fg = p.foam, style = "underline"}, - mkdInlineURL = {fg = groups.link, style = "underline"}, - mkdLink = {link = "mkdInlineURL"}, - mkdLinkDef = {link = "mkdInlineURL"}, - mkdListItemLine = {fg = p.text}, - mkdRule = {fg = p.subtle}, - mkdURL = {link = "mkdInlineURL"}, + -- healthcheck + ["healthError"] = { fg = groups.error }, + ["healthSuccess"] = { fg = groups.info }, + ["healthWarning"] = { fg = groups.warn }, - DiagnosticError = {fg = groups.error}, - DiagnosticHint = {fg = groups.hint}, - DiagnosticInfo = {fg = groups.info}, - DiagnosticWarn = {fg = groups.warn}, - DiagnosticDefaultError = {fg = groups.error}, - DiagnosticDefaultHint = {fg = groups.hint}, - DiagnosticDefaultInfo = {fg = groups.info}, - DiagnosticDefaultWarn = {fg = groups.warn}, - DiagnosticFloatingError = {fg = groups.error}, - DiagnosticFloatingHint = {fg = groups.hint}, - DiagnosticFloatingInfo = {fg = groups.info}, - DiagnosticFloatingWarn = {fg = groups.warn}, - DiagnosticSignError = {fg = groups.error}, - DiagnosticSignHint = {fg = groups.hint}, - DiagnosticSignInfo = {fg = groups.info}, - DiagnosticSignWarn = {fg = groups.warn}, - DiagnosticStatusLineError = {fg = groups.error, bg = groups.panel}, - DiagnosticStatusLineHint = {fg = groups.hint, bg = groups.panel}, - DiagnosticStatusLineInfo = {fg = groups.info, bg = groups.panel}, - DiagnosticStatusLineWarn = {fg = groups.warn, bg = groups.panel}, - DiagnosticUnderlineError = {sp = groups.error, style = "undercurl"}, - DiagnosticUnderlineHint = {sp = groups.hint, style = "undercurl"}, - DiagnosticUnderlineInfo = {sp = groups.info, style = "undercurl"}, - DiagnosticUnderlineWarn = {sp = groups.warn, style = "undercurl"}, - DiagnosticVirtualTextError = {fg = groups.error}, - DiagnosticVirtualTextHint = {fg = groups.hint}, - DiagnosticVirtualTextInfo = {fg = groups.info}, - DiagnosticVirtualTextWarn = {fg = groups.warn}, + -- Treesitter + ["@boolean"] = { link = "Boolean" }, + ["@character"] = { link = "Character" }, + ["@character.special"] = { link = "@character" }, + ["@class"] = { fg = p.foam }, + ["@comment"] = { link = "Comment" }, + ["@conditional"] = { link = "Conditional" }, + ["@constant"] = { link = "Constant" }, + ["@constant.builtin"] = { fg = p.love }, + ["@constant.macro"] = { link = "@constant" }, + ["@constructor"] = { fg = p.foam }, + ["@field"] = { fg = p.pink }, + ["@function"] = { link = "Function" }, + ["@function.builtin"] = { fg = p.love }, + ["@function.macro"] = { link = "@function" }, + ["@include"] = { link = "Include" }, + ["@interface"] = { fg = p.foam }, + ["@keyword"] = { link = "Keyword" }, + ["@keyword.operator"] = { fg = p.subtle }, + ["@label"] = { link = "Label" }, + ["@macro"] = { link = "Macro" }, + ["@method"] = { fg = p.rose }, + ["@number"] = { link = "Number" }, + ["@operator"] = { link = "Operator" }, + ["@parameter"] = { fg = p.iris, italic = maybe.italic }, + ["@preproc"] = { link = "PreProc" }, + ["@property"] = { fg = p.rose, italic = maybe.italic }, + ["@punctuation"] = { fg = groups.punctuation }, + ["@punctuation.bracket"] = { link = "@punctuation" }, + ["@punctuation.delimiter"] = { link = "@punctuation" }, + ["@punctuation.special"] = { link = "@punctuation" }, + ["@regexp"] = { link = "String" }, + ["@repeat"] = { link = "Repeat" }, + ["@storageclass"] = { link = "StorageClass" }, + ["@string"] = { link = "String" }, + ["@string.escape"] = { fg = p.sand }, + ["@string.special"] = { link = "@string" }, + ["@symbol"] = { link = "Identifier" }, + ["@tag"] = { link = "Tag" }, + ["@tag.attribute"] = { fg = p.iris }, + ["@tag.delimiter"] = { fg = p.subtle }, + ["@text"] = { fg = p.text }, + ["@text.strong"] = { bold = true }, + ["@text.emphasis"] = { italic = true }, + ["@text.underline"] = { underline = true }, + ["@text.strike"] = { strikethrough = true }, + ["@text.math"] = { link = "Special" }, + ["@text.environment"] = { link = "Macro" }, + ["@text.environment.name"] = { link = "Type" }, + ["@text.title"] = { link = "Title" }, + ["@text.uri"] = { fg = groups.link }, + ["@text.note"] = { link = "SpecialComment" }, + ["@text.warning"] = { fg = groups.warn }, + ["@text.danger"] = { fg = groups.error }, + ["@todo"] = { link = "Todo" }, + ["@type"] = { link = "Type" }, + ["@variable"] = { fg = p.text, italic = maybe.italic }, + ["@variable.builtin"] = { fg = p.love }, + ["@namespace"] = { link = "@include" }, - -- healthcheck - healthError = {fg = groups.error}, - healthSuccess = {fg = groups.info}, - healthWarning = {fg = groups.warn}, + -- LSP Semantic Token Groups + ["@lsp.type.comment"] = {}, + ["@lsp.type.enum"] = { link = "@type" }, + ["@lsp.type.keyword"] = { link = "@keyword" }, + ["@lsp.type.interface"] = { link = "@interface" }, + ["@lsp.type.namespace"] = { link = "@namespace" }, + ["@lsp.type.parameter"] = { link = "@parameter" }, + ["@lsp.type.property"] = { link = "@property" }, + ["@lsp.type.variable"] = {}, -- use treesitter styles for regular variables + ["@lsp.typemod.function.defaultLibrary"] = { link = "Special" }, + ["@lsp.typemod.variable.defaultLibrary"] = { link = "@variable.builtin" }, - -- TSAttribute = {}, - TSBoolean = {link = "Boolean"}, - TSCharacter = {link = "Character"}, - TSComment = {link = "Comment"}, - TSConditional = {link = "Conditional"}, - TSConstBuiltin = {fg = p.love}, - -- TSConstMacro = {}, - TSConstant = {fg = p.foam}, - TSConstructor = {fg = p.foam}, - -- TSEmphasis = {}, - -- TSError = {}, - -- TSException = {}, - TSField = {fg = p.pink}, - -- TSFloat = {}, - TSFuncBuiltin = {fg = p.love}, - -- TSFuncMacro = {}, - TSFunction = {fg = p.ocean}, - TSInclude = {fg = p.sand}, - TSKeyword = {fg = p.sand}, - -- TSKeywordFunction = {}, - TSKeywordOperator = {fg = p.subtle}, - TSLabel = {fg = p.foam}, - -- TSLiteral = {}, - -- TSMethod = {}, - -- TSNamespace = {}, - -- TSNone = {}, - TSNumber = {link = "Number"}, - TSOperator = {fg = p.subtle}, - TSParameter = {fg = p.iris, style = styles.italic}, - -- TSParameterReference = {}, - TSProperty = {fg = p.rose, style = styles.italic}, - TSPunctBracket = {fg = groups.punctuation}, - TSPunctDelimiter = {fg = groups.punctuation}, - TSPunctSpecial = {fg = groups.punctuation}, - -- TSRepeat = {}, - -- TSStrike = {}, - TSString = {link = "String"}, - TSStringEscape = {fg = p.sand}, - -- TSStringRegex = {}, - TSStringSpecial = {link = "TSString"}, - -- TSSymbol = {}, - TSTag = {fg = p.foam}, - TSTagDelimiter = {fg = p.subtle}, - TSText = {fg = p.text}, - TSTitle = {fg = groups.headings.h1, style = styles.bold}, - TSType = {link = "Type"}, - -- TSTypeBuiltin = {}, - TSURI = {fg = groups.link}, - -- TSUnderline = {}, - TSVariable = {fg = p.text, style = styles.italic}, - TSVariableBuiltin = {fg = p.love}, + -- LSP Injected Groups + ["@lsp.typemod.operator.injected"] = { link = "@operator" }, + ["@lsp.typemod.string.injected"] = { link = "@string" }, + ["@lsp.typemod.variable.injected"] = { link = "@variable" }, - -- Treesitter - ["@annotation"] = {link = "PreProc"}, - ["@attribute"] = {link = "PreProc"}, - ["@boolean"] = {link = "TSBoolean"}, - ["@character"] = {link = "TSCharacter"}, - ["@comment"] = {link = "TSComment"}, - ["@conditional"] = {link = "Conditional"}, - ["@constant"] = {link = "TSConstant"}, - ["@constant.builtin"] = {link = "TSConstBuiltin"}, - ["@constructor"] = {link = "TSConstructor"}, - ["@field"] = {link = "TSField"}, - ["@function"] = {link = "TSFunction"}, - ["@function.builtin"] = {link = "TSFuncBuiltin"}, - ["@include"] = {link = "TSInclude"}, - ["@keyword"] = {link = "TSKeyword"}, - ["@keyword.operator"] = {link = "TSKeywordOperator"}, - ["@label"] = {link = "TSLabel"}, - ["@namespace"] = {link = "Include"}, - ["@number"] = {link = "TSNumber"}, - ["@operator"] = {link = "TSOperator"}, - ["@parameter"] = {link = "TSParameter"}, - ["@property"] = {link = "TSProperty"}, - ["@punctuation.bracket"] = {fg = groups.punctuation}, - ["@punctuation.delimiter"] = {fg = groups.punctuation}, - ["@punctuation.special"] = {fg = groups.punctuation}, - ["@string"] = {link = "TSString"}, - ["@string.escape"] = {link = "TSStringEscape"}, - ["@string.special"] = {link = "TSStringSpecial"}, - ["@symbol"] = {link = "Identifier"}, - ["@tag"] = {link = "TSTag"}, - ["@tag.attribute"] = {link = "@property"}, - ["@tag.delimiter"] = {link = "TSTagDelimiter"}, - ["@text"] = {link = "TSText"}, - ["@text.strong"] = {bold = true}, - ["@text.emphasis"] = {italic = true}, - ["@text.underline"] = {underline = true}, - ["@text.strike"] = {strikethrough = true}, - ["@text.math"] = {link = "Special"}, - ["@text.environment"] = {link = "Macro"}, - ["@text.environment.name"] = {link = "Type"}, - ["@text.title"] = {link = "TSTitle"}, - ["@text.uri"] = {fg = groups.link}, - ["@text.note"] = {link = "SpecialComment"}, - ["@text.warning"] = {link = "Todo"}, - ["@text.danger"] = {link = "WarningMsg"}, - ["@todo"] = {link = "Todo"}, - ["@type"] = {link = "Type"}, - ["@variable"] = {link = "TSVariable"}, - ["@variable.builtin"] = {link = "TSVariableBuiltin"}, + -- nvim-treesitter Markdown Headings + ["@text.title.1.markdown"] = { link = "markdownH1" }, + ["@text.title.1.marker.markdown"] = { link = "markdownH1Delimiter" }, + ["@text.title.2.markdown"] = { link = "markdownH2" }, + ["@text.title.2.marker.markdown"] = { link = "markdownH2Delimiter" }, + ["@text.title.3.markdown"] = { link = "markdownH3" }, + ["@text.title.3.marker.markdown"] = { link = "markdownH3Delimiter" }, + ["@text.title.4.markdown"] = { link = "markdownH4" }, + ["@text.title.4.marker.markdown"] = { link = "markdownH4Delimiter" }, + ["@text.title.5.markdown"] = { link = "markdownH5" }, + ["@text.title.5.marker.markdown"] = { link = "markdownH5Delimiter" }, + ["@text.title.6.markdown"] = { link = "markdownH6" }, + ["@text.title.6.marker.markdown"] = { link = "markdownH6Delimiter" }, - -- vim.lsp.buf.document_highlight() - LspReferenceText = {bg = p.highlight_med}, - LspReferenceRead = {bg = p.highlight_med}, - LspReferenceWrite = {bg = p.highlight_med}, + -- vim.lsp.buf.document_highlight() + ["LspReferenceText"] = { bg = p.highlight_med }, + ["LspReferenceRead"] = { bg = p.highlight_med }, + ["LspReferenceWrite"] = { bg = p.highlight_med }, - -- lsp-highlight-codelens - LspCodeLens = {fg = p.subtle}, -- virtual text of code lens - LspCodeLensSeparator = {fg = p.highlight_high}, -- separator between two or more code lens + -- lsp-highlight-codelens + ["LspCodeLens"] = { fg = p.subtle }, -- virtual text of code len + ["LspCodeLensSeparator"] = { fg = p.highlight_high }, -- separator between two or more code len - -- romgrk/barbar.nvim - BufferCurrent = {fg = p.text, bg = p.overlay}, - BufferCurrentIndex = {fg = p.text, bg = p.overlay}, - BufferCurrentMod = {fg = p.foam, bg = p.overlay}, - BufferCurrentSign = {fg = p.subtle, bg = p.overlay}, - BufferCurrentTarget = {fg = p.gold, bg = p.overlay}, - BufferInactive = {fg = p.subtle}, - BufferInactiveIndex = {fg = p.subtle}, - BufferInactiveMod = {fg = p.foam}, - BufferInactiveSign = {fg = p.muted}, - BufferInactiveTarget = {fg = p.gold}, - BufferTabpageFill = {fg = groups.background, bg = groups.background}, - BufferVisible = {fg = p.subtle}, - BufferVisibleIndex = {fg = p.subtle}, - BufferVisibleMod = {fg = p.foam}, - BufferVisibleSign = {fg = p.muted}, - BufferVisibleTarget = {fg = p.gold}, + -- romgrk/barbar.nvim + ["BufferCurrent"] = { fg = p.text, bg = p.overlay }, + ["BufferCurrentIndex"] = { fg = p.text, bg = p.overlay }, + ["BufferCurrentMod"] = { fg = p.foam, bg = p.overlay }, + ["BufferCurrentSign"] = { fg = p.subtle, bg = p.overlay }, + ["BufferCurrentTarget"] = { fg = p.gold, bg = p.overlay }, + ["BufferInactive"] = { fg = p.subtle }, + ["BufferInactiveIndex"] = { fg = p.subtle }, + ["BufferInactiveMod"] = { fg = p.foam }, + ["BufferInactiveSign"] = { fg = p.muted }, + ["BufferInactiveTarget"] = { fg = p.gold }, + ["BufferTabpageFill"] = { fg = groups.background, bg = groups.background }, + ["BufferVisible"] = { fg = p.subtle }, + ["BufferVisibleIndex"] = { fg = p.subtle }, + ["BufferVisibleMod"] = { fg = p.foam }, + ["BufferVisibleSign"] = { fg = p.muted }, + ["BufferVisibleTarget"] = { fg = p.gold }, - -- lewis6991/gitsigns.nvim - GitSignsAdd = {fg = groups.git_add}, - GitSignsChange = {fg = groups.git_change}, - GitSignsDelete = {fg = groups.git_delete}, - SignAdd = {link = "GitSignsAdd"}, - SignChange = {link = "GitSignsChange"}, - SignDelete = {link = "GitSignsDelete"}, + -- lewis6991/gitsigns.nvim + ["GitSignsAdd"] = { fg = groups.git_add, bg = groups.background }, + ["GitSignsChange"] = { fg = groups.git_change, bg = groups.background }, + ["GitSignsDelete"] = { fg = groups.git_delete, bg = groups.background }, + ["SignAdd"] = { link = "GitSignsAdd" }, + ["SignChange"] = { link = "GitSignsChange" }, + ["SignDelete"] = { link = "GitSignsDelete" }, - -- mvllow/modes.nvim - ModesCopy = {bg = p.gold}, - ModesDelete = {bg = p.crimson}, - ModesInsert = {bg = p.foam}, - ModesVisual = {bg = p.iris}, + -- mvllow/modes.nvim + ["ModesCopy"] = { bg = p.gold }, + ["ModesDelete"] = { bg = p.crimson }, + ["ModesInsert"] = { bg = p.foam }, + ["ModesVisual"] = { bg = p.iris }, - -- kyazdani42/nvim-tree.lua - NvimTreeEmptyFolderName = {fg = p.muted}, - NvimTreeFileDeleted = {fg = p.crimson}, - NvimTreeFileDirty = {fg = p.rose}, - NvimTreeFileMerge = {fg = p.iris}, - NvimTreeFileNew = {fg = p.foam}, - NvimTreeFileRenamed = {fg = p.sand}, - NvimTreeFileStaged = {fg = p.iris}, - NvimTreeFolderIcon = {fg = p.subtle}, - NvimTreeFolderName = {fg = p.foam}, - NvimTreeGitDeleted = {fg = groups.git_delete}, - NvimTreeGitDirty = {fg = groups.git_dirty}, - NvimTreeGitIgnored = {fg = groups.git_ignore}, - NvimTreeGitMerge = {fg = groups.git_merge}, - NvimTreeGitNew = {fg = groups.git_add}, - NvimTreeGitRenamed = {fg = groups.git_rename}, - NvimTreeGitStaged = {fg = groups.git_stage}, - NvimTreeImageFile = {fg = p.text}, - NvimTreeNormal = {fg = p.text}, - NvimTreeOpenedFile = {fg = p.text, bg = p.highlight_med}, - NvimTreeOpenedFolderName = {link = "NvimTreeFolderName"}, - NvimTreeRootFolder = {fg = p.iris}, - NvimTreeSpecialFile = {link = "NvimTreeNormal"}, - NvimTreeWindowPicker = {fg = groups.background, bg = p.iris}, + -- kyazdani42/nvim-tree.lua + ["NvimTreeEmptyFolderName"] = { fg = p.muted }, + ["NvimTreeFileDeleted"] = { fg = p.crimson }, + ["NvimTreeFileDirty"] = { fg = p.rose }, + ["NvimTreeFileMerge"] = { fg = p.iris }, + ["NvimTreeFileNew"] = { fg = p.foam }, + ["NvimTreeFileRenamed"] = { fg = p.sand }, + ["NvimTreeFileStaged"] = { fg = p.iris }, + ["NvimTreeFolderIcon"] = { fg = p.subtle }, + ["NvimTreeFolderName"] = { fg = p.foam }, + ["NvimTreeGitDeleted"] = { fg = groups.git_delete }, + ["NvimTreeGitDirty"] = { fg = groups.git_dirty }, + ["NvimTreeGitIgnored"] = { fg = groups.git_ignore }, + ["NvimTreeGitMerge"] = { fg = groups.git_merge }, + ["NvimTreeGitNew"] = { fg = groups.git_add }, + ["NvimTreeGitRenamed"] = { fg = groups.git_rename }, + ["NvimTreeGitStaged"] = { fg = groups.git_stage }, + ["NvimTreeImageFile"] = { fg = p.text }, + ["NvimTreeNormal"] = { fg = p.text }, + ["NvimTreeOpenedFile"] = { fg = p.text, bg = p.highlight_med }, + ["NvimTreeOpenedFolderName"] = { link = "NvimTreeFolderName" }, + ["NvimTreeRootFolder"] = { fg = p.iris }, + ["NvimTreeSpecialFile"] = { link = "NvimTreeNormal" }, + ["NvimTreeWindowPicker"] = { fg = p.love, bg = p.love, blend = 10 }, - -- folke/which-key.nvim - WhichKey = {fg = p.iris}, - WhichKeyGroup = {fg = p.foam}, - WhichKeySeparator = {fg = p.subtle}, - WhichKeyDesc = {fg = p.gold}, - WhichKeyFloat = {bg = groups.panel}, - WhichKeyValue = {fg = p.rose}, + -- nvim-neo-tree/neo-tree.nvim + ["NeoTreeTitleBar"] = { fg = p.surface, bg = p.pine }, + ["NeoTreeGitAdded"] = { fg = p.foam }, + ["NeoTreeGitModified"] = { fg = p.rose }, + ["NeoTreeGitDeleted"] = { fg = p.love }, + ["NeoTreeGitRenamed"] = { fg = p.pine }, + ["NeoTreeGitIgnored"] = { fg = p.muted }, + ["NeoTreeGitUntracked"] = { fg = p.gold }, + ["NeoTreeGitConflict"] = { fg = p.iris }, - -- luka-reineke/indent-blankline.nvim - IndentBlanklineChar = {fg = p.muted}, - IndentBlanklineSpaceChar = {fg = p.muted}, - IndentBlanklineSpaceCharBlankline = {fg = p.muted}, + -- folke/which-key.nvim + ["WhichKey"] = { fg = p.iris }, + ["WhichKeyGroup"] = { fg = p.foam }, + ["WhichKeySeparator"] = { fg = p.subtle }, + ["WhichKeyDesc"] = { fg = p.gold }, + ["WhichKeyFloat"] = { bg = maybe.surface }, + ["WhichKeyValue"] = { fg = p.rose }, - -- hrsh7th/nvim-cmp - CmpItemAbbr = {fg = p.subtle}, - CmpItemAbbrDeprecated = {fg = p.subtle, style = "strikethrough"}, - CmpItemAbbrMatch = {fg = p.text, style = styles.bold}, - CmpItemAbbrMatchFuzzy = {fg = p.text, style = styles.bold}, - CmpItemKind = {fg = p.iris}, - CmpItemKindClass = {fg = p.gold}, - CmpItemKindFunction = {fg = p.iris}, - CmpItemKindInterface = {fg = p.gold}, - CmpItemKindMethod = {fg = p.iris}, - CmpItemKindSnippet = {fg = p.iris}, - CmpItemKindVariable = {fg = p.foam}, + -- luka-reineke/indent-blankline.nvim + ["IndentBlanklineChar"] = { fg = p.muted, nocombine = true }, + ["IndentBlanklineSpaceChar"] = { fg = p.muted, nocombine = true }, + ["IndentBlanklineSpaceCharBlankline"] = { fg = p.muted, nocombine = true }, - -- TimUntersberger/neogit - NeogitDiffAddHighlight = {fg = p.foam, bg = p.highlight_med}, - NeogitDiffContextHighlight = {bg = p.highlight_low}, - NeogitDiffDeleteHighlight = {fg = p.crimson, bg = p.highlight_med}, - NeogitHunkHeader = {bg = p.highlight_low}, - NeogitHunkHeaderHighlight = {bg = p.highlight_low}, + -- hrsh7th/nvim-cmp + ["CmpItemAbbr"] = { fg = p.subtle }, + ["CmpItemAbbrDeprecated"] = { fg = p.subtle, strikethrough = true }, + ["CmpItemAbbrMatch"] = { fg = p.text, bold = true }, + ["CmpItemAbbrMatchFuzzy"] = { fg = p.text, bold = true }, + ["CmpItemKind"] = { fg = p.iris }, + ["CmpItemKindClass"] = { fg = p.gold }, + ["CmpItemKindFunction"] = { fg = p.iris }, + ["CmpItemKindInterface"] = { fg = p.gold }, + ["CmpItemKindMethod"] = { fg = p.iris }, + ["CmpItemKindSnippet"] = { fg = p.sand }, + ["CmpItemKindVariable"] = { fg = p.foam }, - -- vimwiki/vimwiki - VimwikiHR = {fg = p.subtle}, - VimwikiHeader1 = {fg = groups.headings.h1, style = styles.bold}, - VimwikiHeader2 = {fg = groups.headings.h2, style = styles.bold}, - VimwikiHeader3 = {fg = groups.headings.h3, style = styles.bold}, - VimwikiHeader4 = {fg = groups.headings.h4, style = styles.bold}, - VimwikiHeader5 = {fg = groups.headings.h5, style = styles.bold}, - VimwikiHeader6 = {fg = groups.headings.h6, style = styles.bold}, - VimwikiHeaderChar = {fg = p.sand}, - VimwikiLink = {fg = groups.link, style = "underline"}, - VimwikiList = {fg = p.iris}, - VimwikiNoExistsLink = {fg = p.crimson}, + -- TimUntersberger/neogit + ["NeogitDiffAddHighlight"] = { fg = p.foam, bg = p.highlight_med }, + ["NeogitDiffContextHighlight"] = { bg = p.highlight_low }, + ["NeogitDiffDeleteHighlight"] = { fg = p.love, bg = p.highlight_med }, + ["NeogitHunkHeader"] = { bg = p.highlight_low }, + ["NeogitHunkHeaderHighlight"] = { bg = p.highlight_low }, - -- nvim-neorg/neorg - NeorgHeading1Prefix = {fg = groups.headings.h1, style = styles.bold}, - NeorgHeading1Title = {link = "NeorgHeading1Prefix"}, - NeorgHeading2Prefix = {fg = groups.headings.h2, style = styles.bold}, - NeorgHeading2Title = {link = "NeorgHeading2Prefix"}, - NeorgHeading3Prefix = {fg = groups.headings.h3, style = styles.bold}, - NeorgHeading3Title = {link = "NeorgHeading3Prefix"}, - NeorgHeading4Prefix = {fg = groups.headings.h4, style = styles.bold}, - NeorgHeading4Title = {link = "NeorgHeading4Prefix"}, - NeorgHeading5Prefix = {fg = groups.headings.h5, style = styles.bold}, - NeorgHeading5Title = {link = "NeorgHeading5Prefix"}, - NeorgHeading6Prefix = {fg = groups.headings.h6, style = styles.bold}, - NeorgHeading6Title = {link = "NeorgHeading6Prefix"}, - NeorgMarkerTitle = {fg = p.text, style = styles.bold}, + -- vimwiki/vimwiki + ["VimwikiHR"] = { fg = p.subtle }, + ["VimwikiHeader1"] = { fg = groups.headings.h1, bold = true }, + ["VimwikiHeader2"] = { fg = groups.headings.h2, bold = true }, + ["VimwikiHeader3"] = { fg = groups.headings.h3, bold = true }, + ["VimwikiHeader4"] = { fg = groups.headings.h4, bold = true }, + ["VimwikiHeader5"] = { fg = groups.headings.h5, bold = true }, + ["VimwikiHeader6"] = { fg = groups.headings.h6, bold = true }, + ["VimwikiHeaderChar"] = { fg = p.pine }, + ["VimwikiLink"] = { fg = groups.link, underline = true }, + ["VimwikiList"] = { fg = p.iris }, + ["VimwikiNoExistsLink"] = { fg = p.love }, - -- tami5/lspsaga.nvim (fork of glepnir/lspsaga.nvim) - DefinitionCount = {fg = p.rose}, - DefinitionIcon = {fg = p.rose}, - DefintionPreviewTitle = {fg = p.rose, style = styles.bold}, - LspFloatWinBorder = {fg = groups.border}, - LspFloatWinNormal = {bg = groups.background}, - LspSagaAutoPreview = {fg = p.subtle}, - LspSagaCodeActionBorder = {fg = groups.border}, - LspSagaCodeActionContent = {fg = p.foam}, - LspSagaCodeActionTitle = {fg = p.gold, style = styles.bold}, - LspSagaCodeActionTruncateLine = {link = "LspSagaCodeActionBorder"}, - LspSagaDefPreviewBorder = {fg = groups.border}, - LspSagaDiagnosticBorder = {fg = groups.border}, - LspSagaDiagnosticHeader = {fg = p.gold, style = styles.bold}, - LspSagaDiagnosticTruncateLine = {link = "LspSagaDiagnosticBorder"}, - LspSagaDocTruncateLine = {link = "LspSagaHoverBorder"}, - LspSagaFinderSelection = {fg = p.gold}, - LspSagaHoverBorder = {fg = groups.border}, - LspSagaLspFinderBorder = {fg = groups.border}, - LspSagaRenameBorder = {fg = p.sand}, - LspSagaRenamePromptPrefix = {fg = p.love}, - LspSagaShTruncateLine = {link = "LspSagaSignatureHelpBorder"}, - LspSagaSignatureHelpBorder = {fg = p.sand}, - ReferencesCount = {fg = p.rose}, - ReferencesIcon = {fg = p.rose}, - SagaShadow = {bg = p.overlay}, - TargetWord = {fg = p.iris}, + -- nvim-neorg/neorg + ["NeorgHeading1Prefix"] = { fg = groups.headings.h1, bold = true }, + ["NeorgHeading1Title"] = { link = "NeorgHeading1Prefix" }, + ["NeorgHeading2Prefix"] = { fg = groups.headings.h2, bold = true }, + ["NeorgHeading2Title"] = { link = "NeorgHeading2Prefix" }, + ["NeorgHeading3Prefix"] = { fg = groups.headings.h3, bold = true }, + ["NeorgHeading3Title"] = { link = "NeorgHeading3Prefix" }, + ["NeorgHeading4Prefix"] = { fg = groups.headings.h4, bold = true }, + ["NeorgHeading4Title"] = { link = "NeorgHeading4Prefix" }, + ["NeorgHeading5Prefix"] = { fg = groups.headings.h5, bold = true }, + ["NeorgHeading5Title"] = { link = "NeorgHeading5Prefix" }, + ["NeorgHeading6Prefix"] = { fg = groups.headings.h6, bold = true }, + ["NeorgHeading6Title"] = { link = "NeorgHeading6Prefix" }, + ["NeorgMarkerTitle"] = { fg = p.text, bold = true }, - -- ray-x/lsp_signature.nvim - LspSignatureActiveParameter = {bg = p.overlay}, + -- tami5/lspsaga.nvim (fork of glepnir/lspsaga.nvim) + ["DefinitionCount"] = { fg = p.rose }, + ["DefinitionIcon"] = { fg = p.rose }, + ["DefintionPreviewTitle"] = { fg = p.rose, bold = true }, + ["LspFloatWinBorder"] = { fg = groups.border }, + ["LspFloatWinNormal"] = { bg = maybe.surface }, + ["LspSagaAutoPreview"] = { fg = p.subtle }, + ["LspSagaCodeActionBorder"] = { fg = groups.border }, + ["LspSagaCodeActionContent"] = { fg = p.foam }, + ["LspSagaCodeActionTitle"] = { fg = p.gold, bold = true }, + ["LspSagaCodeActionTruncateLine"] = { link = "LspSagaCodeActionBorder" }, + ["LspSagaDefPreviewBorder"] = { fg = groups.border }, + ["LspSagaDiagnosticBorder"] = { fg = groups.border }, + ["LspSagaDiagnosticHeader"] = { fg = p.gold, bold = true }, + ["LspSagaDiagnosticTruncateLine"] = { link = "LspSagaDiagnosticBorder" }, + ["LspSagaDocTruncateLine"] = { link = "LspSagaHoverBorder" }, + ["LspSagaFinderSelection"] = { fg = p.gold }, + ["LspSagaHoverBorder"] = { fg = groups.border }, + ["LspSagaLspFinderBorder"] = { fg = groups.border }, + ["LspSagaRenameBorder"] = { fg = p.pine }, + ["LspSagaRenamePromptPrefix"] = { fg = p.love }, + ["LspSagaShTruncateLine"] = { link = "LspSagaSignatureHelpBorder" }, + ["LspSagaSignatureHelpBorder"] = { fg = p.pine }, + ["ReferencesCount"] = { fg = p.rose }, + ["ReferencesIcon"] = { fg = p.rose }, + ["SagaShadow"] = { bg = p.overlay }, + ["TargetWord"] = { fg = p.iris }, - -- rlane/pounce.nvim - PounceAccept = {fg = p.love, bg = p.highlight_high}, - PounceAcceptBest = {fg = p.base, bg = p.gold}, - PounceGap = {link = "Search"}, - PounceMatch = {link = "Search"}, + -- ray-x/lsp_signature.nvim + ["LspSignatureActiveParameter"] = { bg = p.overlay }, - -- nvim-telescope/telescope.nvim - TelescopeBorder = {fg = groups.border}, - TelescopeMatching = {fg = p.rose}, - TelescopeNormal = {fg = p.subtle}, - TelescopePromptNormal = {fg = p.text}, - TelescopePromptPrefix = {fg = p.subtle}, - TelescopeSelection = {fg = p.text, bg = p.overlay}, - TelescopeSelectionCaret = {fg = p.rose, bg = p.overlay}, - TelescopeTitle = {fg = p.subtle}, + -- rlane/pounce.nvim + ["PounceAccept"] = { fg = p.love, bg = p.highlight_high }, + ["PounceAcceptBest"] = { fg = p.base, bg = p.gold }, + ["PounceGap"] = { link = "Search" }, + ["PounceMatch"] = { link = "Search" }, - -- rcarriga/nvim-notify - NotifyINFOBorder = {fg = p.foam}, - NotifyINFOTitle = {link = "NotifyINFOBorder"}, - NotifyINFOIcon = {link = "NotifyINFOBorder"}, - NotifyWARNBorder = {fg = p.gold}, - NotifyWARNTitle = {link = "NotifyWARNBorder"}, - NotifyWARNIcon = {link = "NotifyWARNBorder"}, - NotifyDEBUGBorder = {fg = p.muted}, - NotifyDEBUGTitle = {link = "NotifyDEBUGBorder"}, - NotifyDEBUGIcon = {link = "NotifyDEBUGBorder"}, - NotifyTRACEBorder = {fg = p.iris}, - NotifyTRACETitle = {link = "NotifyTRACEBorder"}, - NotifyTRACEIcon = {link = "NotifyTRACEBorder"}, - NotifyERRORBorder = {fg = p.crimson}, - NotifyERRORTitle = {link = "NotifyERRORBorder"}, - NotifyERRORIcon = {link = "NotifyERRORBorder"}, + -- ggandor/leap.nvim + ["LeapMatch"] = { link = "MatchParen" }, + ["LeapLabelPrimary"] = { link = "IncSearch" }, + ["LeapLabelSecondary"] = { fg = p.base, bg = p.pine }, - -- rcarriga/nvim-dap-ui - DapUIVariable = {link = "Normal"}, - DapUIValue = {link = "Normal"}, - DapUIFrameName = {link = "Normal"}, - DapUIThread = {fg = p.gold}, - DapUIWatchesValue = {link = "DapUIThread"}, - DapUIBreakpointsInfo = {link = "DapUIThread"}, - DapUIBreakpointsCurrentLine = {fg = p.gold, style = styles.bold}, - DapUIWatchesEmpty = {fg = p.crimson}, - DapUIWatchesError = {link = "DapUIWatchesEmpty"}, - DapUIBreakpointsDisabledLine = {fg = p.muted}, - DapUISource = {fg = p.iris}, - DapUIBreakpointsPath = {fg = p.foam}, - DapUIScope = {link = "DapUIBreakpointsPath"}, - DapUILineNumber = {link = "DapUIBreakpointsPath"}, - DapUIBreakpointsLine = {link = "DapUIBreakpointsPath"}, - DapUIFloatBorder = {link = "DapUIBreakpointsPath"}, - DapUIStoppedThread = {link = "DapUIBreakpointsPath"}, - DapUIDecoration = {link = "DapUIBreakpointsPath"}, - DapUIModifiedValue = {fg = p.foam, style = styles.bold}, + -- phaazon/hop.nvim + ["HopNextKey"] = { fg = p.love }, + ["HopNextKey1"] = { fg = p.foam }, + ["HopNextKey2"] = { fg = p.pine }, + ["HopUnmatched"] = { fg = p.highlight_high }, - -- glepnir/dashboard-nvim - DashboardShortcut = {fg = p.love}, - DashboardHeader = {fg = p.sand}, - DashboardCenter = {fg = p.gold}, - DashboardFooter = {fg = p.iris} - } + -- nvim-telescope/telescope.nvim + ["TelescopeBorder"] = { fg = groups.border, bg = float_background }, + ["TelescopeMatching"] = { fg = p.rose }, + ["TelescopeNormal"] = { fg = p.subtle, bg = float_background }, + ["TelescopePromptNormal"] = { fg = p.text, bg = float_background }, + ["TelescopePromptPrefix"] = { fg = p.subtle }, + ["TelescopeSelection"] = { fg = p.text, bg = p.overlay }, + ["TelescopeSelectionCaret"] = { fg = p.rose, bg = p.overlay }, + ["TelescopeTitle"] = { fg = p.subtle }, - vim.g.terminal_color_0 = p.overlay -- black - vim.g.terminal_color_8 = p.subtle -- bright black - vim.g.terminal_color_1 = p.love -- red - vim.g.terminal_color_9 = p.love -- bright red - vim.g.terminal_color_2 = p.sand -- green - vim.g.terminal_color_10 = p.sand -- bright green - vim.g.terminal_color_3 = p.gold -- yellow - vim.g.terminal_color_11 = p.gold -- bright yellow - vim.g.terminal_color_4 = p.foam -- blue - vim.g.terminal_color_12 = p.foam -- bright blue - vim.g.terminal_color_5 = p.iris -- magenta - vim.g.terminal_color_13 = p.iris -- bright magenta - vim.g.terminal_color_6 = p.rose -- cyan - vim.g.terminal_color_14 = p.rose -- bright cyan - vim.g.terminal_color_7 = p.text -- white - vim.g.terminal_color_15 = p.text -- bright white + -- rcarriga/nvim-notify + ["NotifyINFOBorder"] = { fg = p.foam }, + ["NotifyINFOTitle"] = { link = "NotifyINFOBorder" }, + ["NotifyINFOIcon"] = { link = "NotifyINFOBorder" }, + ["NotifyWARNBorder"] = { fg = p.gold }, + ["NotifyWARNTitle"] = { link = "NotifyWARNBorder" }, + ["NotifyWARNIcon"] = { link = "NotifyWARNBorder" }, + ["NotifyDEBUGBorder"] = { fg = p.muted }, + ["NotifyDEBUGTitle"] = { link = "NotifyDEBUGBorder" }, + ["NotifyDEBUGIcon"] = { link = "NotifyDEBUGBorder" }, + ["NotifyTRACEBorder"] = { fg = p.iris }, + ["NotifyTRACETitle"] = { link = "NotifyTRACEBorder" }, + ["NotifyTRACEIcon"] = { link = "NotifyTRACEBorder" }, + ["NotifyERRORBorder"] = { fg = p.crimson }, + ["NotifyERRORTitle"] = { link = "NotifyERRORBorder" }, + ["NotifyERRORIcon"] = { link = "NotifyERRORBorder" }, - return theme + -- rcarriga/nvim-dap-ui + ["DapUIVariable"] = { link = "Normal" }, + ["DapUIValue"] = { link = "Normal" }, + ["DapUIFrameName"] = { link = "Normal" }, + ["DapUIThread"] = { fg = p.gold }, + ["DapUIWatchesValue"] = { link = "DapUIThread" }, + ["DapUIBreakpointsInfo"] = { link = "DapUIThread" }, + ["DapUIBreakpointsCurrentLine"] = { fg = p.gold, bold = true }, + ["DapUIWatchesEmpty"] = { fg = p.crimson }, + ["DapUIWatchesError"] = { link = "DapUIWatchesEmpty" }, + ["DapUIBreakpointsDisabledLine"] = { fg = p.muted }, + ["DapUISource"] = { fg = p.iris }, + ["DapUIBreakpointsPath"] = { fg = p.foam }, + ["DapUIScope"] = { link = "DapUIBreakpointsPath" }, + ["DapUILineNumber"] = { link = "DapUIBreakpointsPath" }, + ["DapUIBreakpointsLine"] = { link = "DapUIBreakpointsPath" }, + ["DapUIFloatBorder"] = { link = "DapUIBreakpointsPath" }, + ["DapUIStoppedThread"] = { link = "DapUIBreakpointsPath" }, + ["DapUIDecoration"] = { link = "DapUIBreakpointsPath" }, + ["DapUIModifiedValue"] = { fg = p.foam, bold = true }, + + -- glepnir/dashboard-nvim + ["DashboardShortcut"] = { fg = p.love }, + ["DashboardHeader"] = { fg = p.pine }, + ["DashboardCenter"] = { fg = p.gold }, + ["DashboardFooter"] = { fg = p.iris }, + + -- SmiteshP/nvim-navic + ["NavicIconsFile"] = { fg = p.base }, + ["NavicIconsModule"] = { fg = p.rose }, + ["NavicIconsNamespace"] = { fg = p.base }, + ["NavicIconsPackage"] = { fg = p.base }, + ["NavicIconsClass"] = { fg = p.foam }, + ["NavicIconsMethod"] = { fg = p.iris }, + ["NavicIconsProperty"] = { fg = p.foam }, + ["NavicIconsField"] = { fg = p.foam }, + ["NavicIconsConstructor"] = { fg = p.gold }, + ["NavicIconsEnum"] = { fg = p.gold }, + ["NavicIconsInterface"] = { fg = p.foam }, + ["NavicIconsFunction"] = { fg = p.pine }, + ["NavicIconsVariable"] = { fg = p.text }, + ["NavicIconsConstant"] = { fg = p.gold }, + ["NavicIconsString"] = { fg = p.gold }, + ["NavicIconsNumber"] = { fg = p.gold }, + ["NavicIconsBoolean"] = { fg = p.rose }, + ["NavicIconsArray"] = { fg = p.gold }, + ["NavicIconsObject"] = { fg = p.gold }, + ["NavicIconsKey"] = { fg = p.iris }, + ["NavicIconsKeyword"] = { fg = p.pine }, + ["NavicIconsNull"] = { fg = p.love }, + ["NavicIconsEnumMember"] = { fg = p.foam }, + ["NavicIconsStruct"] = { fg = p.foam }, + ["NavicIconsEvent"] = { fg = p.gold }, + ["NavicIconsOperator"] = { fg = p.subtle }, + ["NavicIconsTypeParameter"] = { fg = p.foam }, + ["NavicText"] = { fg = p.subtle }, + ["NavicSeparator"] = { fg = p.subtle }, + + -- folke/noice.nvim + ["NoiceCursor"] = { fg = p.highlight_high, bg = p.text }, -- IDK + + -- echasnovski/mini.indentscope + ["MiniIndentscopeSymbol"] = { fg = p.highlight_med }, + ["MiniIndentscopeSymbolOff"] = { fg = p.highlight_med }, + + -- goolord/alpha-nvim + ["AlphaHeader"] = { fg = p.pine }, + ["AlphaButtons"] = { fg = p.foam }, + ["AlphaShortcut"] = { fg = p.rose }, + ["AlphaFooter"] = { fg = p.gold }, + } + -- Set users highlight_group customisations. + for group, opts in pairs(options.highlight_groups) do + local default_opts = M.defaults[group] + + if (opts.inherit == nil or opts.inherit) and default_opts ~= nil then -- On merge. + opts.inherit = nil -- Don't add this key to the highlight_group after merge. + M.defaults[group] = vim.tbl_extend("force", default_opts, opts) + else -- On overwrite. + opts.inherit = nil -- Don't add this key to the highlight_group. + M.defaults[group] = opts + end + end + + -- Set highlights. + for group, color in pairs(M.defaults) do + h(group, color) + end end return M diff --git a/lua/rose-pine/util.lua b/lua/rose-pine/util.lua index 3885738..b9e0af1 100644 --- a/lua/rose-pine/util.lua +++ b/lua/rose-pine/util.lua @@ -31,31 +31,35 @@ end ---@param bg string background color ---@param alpha number number between 0 (background) and 1 (foreground) util.blend = function(fg, bg, alpha) - fg = rgb(parse_color(fg)) - bg = rgb(parse_color(bg)) + local fg_rgb = rgb(parse_color(fg)) + local bg_rgb = rgb(parse_color(bg)) - local function blend_channel(i) - local ret = (alpha * fg[i] + ((1 - alpha) * bg[i])) - return math.floor(math.min(math.max(0, ret), 255) + 0.5) - end + local function blend_channel(i) + local ret = (alpha * fg_rgb[i] + ((1 - alpha) * bg_rgb[i])) + return math.floor(math.min(math.max(0, ret), 255) + 0.5) + end return string.format("#%02X%02X%02X", blend_channel(1), blend_channel(2), blend_channel(3)) end ---@param group string ----@param color table +---@param color table util.highlight = function(group, color) - local style = color.style and "gui=" .. color.style or "gui=NONE" - local fg = color.fg and "guifg=" .. parse_color(color.fg) or "guifg=NONE" - local bg = color.bg and "guibg=" .. parse_color(color.bg) or "guibg=NONE" - local sp = color.sp and "guisp=" .. parse_color(color.sp) or "" + local fg = color.fg and parse_color(color.fg) or 'none' + local bg = color.bg and parse_color(color.bg) or 'none' + local sp = color.sp and parse_color(color.sp) or '' - vim.cmd(string.format("highlight %s %s %s %s %s", group, style, fg, bg, sp)) + if + color.blend ~= nil + and (color.blend >= 0 or color.blend <= 100) + and bg ~= nil + then + bg = util.blend(bg, parse_color('base') or '', color.blend / 100) + end - if color.link then - vim.cmd(string.format("highlight! link %s %s", group, color.link)) - end + color = vim.tbl_extend('force', color, { fg = fg, bg = bg, sp = sp }) + vim.api.nvim_set_hl(0, group, color) end return util diff --git a/readme.md b/readme.md index 0d48947..a8dc3bc 100644 --- a/readme.md +++ b/readme.md @@ -4,3 +4,29 @@ I often make changes to this theme, so if you want to use this theme, make a fork if you don't want random changes I make. + +## Install + +**[Paq](https://github.com/savq/paq-nvim)** + +```lua +require('paq')({ + { 'NycRat/rose-pine', as = 'rose-pine' } +}) +``` + +**[lazy.nvim](https://github.com/folke/lazy.nvim)** + +```lua +require("lazy").setup({ + { 'NycRat/rose-pine', name = 'rose-pine' } +}) +``` + +**[packer.nvim](https://github.com/wbthomason/packer.nvim)** + +```lua +require('packer').startup(function(use) + use({ 'NycRat/rose-pine', as = 'rose-pine' }) +end) +```