diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index cd69062..b7603ef 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -15,14 +15,30 @@ body: required: true - type: input attributes: - label: "Terminal / multiplexer" - placeholder: "Kitty / tmux" + label: "Terminal" + placeholder: "Kitty" validations: required: true - type: textarea attributes: label: Describe the bug - description: A clear and concise description of what the bug is. Please include screenshots if possible and any related errors you see in Neovim. + description: A clear and concise description of what the bug is. Please include any related errors you see in Neovim. + validations: + required: true + - type: textarea + attributes: + label: Steps To Reproduce + description: Steps to reproduce the behavior. + placeholder: | + 1. + 2. + 3. + validations: + required: true + - type: textarea + attributes: + label: Expected Behavior + description: A concise description of what you expected to happen. validations: required: true - type: textarea @@ -30,25 +46,36 @@ body: label: Repro description: Minimal `init.lua` to reproduce this issue. Save as `repro.lua` and run with `nvim -u repro.lua` value: | - vim.o.packpath = "/tmp/nvim/site" + -- DO NOT change the paths and do not remove the colorscheme + local root = vim.fn.fnamemodify("./.repro", ":p") - local plugins = { - rose_pine = "https://github.com/rose-pine/neovim", - -- ADD OTHER PLUGINS _NECESSARY_ TO REPRODUCE THE ISSUE - } - - for name, url in pairs(plugins) do - local install_path = "/tmp/nvim/site/pack/test/start/" .. name - if vim.fn.isdirectory(install_path) == 0 then - vim.fn.system({ "git", "clone", "--depth=1", url, install_path }) - end + -- Set stdpaths to use .repro + for _, name in ipairs({ "config", "data", "state", "cache" }) do + vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name end - require("rose-pine").setup({ - -- ADD ROSÉ PINE CONFIG THAT IS _NECESSARY_ TO REPRODUCE THE ISSUE + -- Bootstrap lazy.nvim + local lazypath = root .. "/plugins/lazy.nvim" + if not vim.loop.fs_stat(lazypath) then + vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, }) + end + vim.opt.runtimepath:prepend(lazypath) + + -- Install plugins + local plugins = { + "rose-pine/neovim", + name = "rose-pine", + config = function() + -- Add relevant Rosé Pine config below + require("rose-pine").setup({}) + end + } + require("lazy").setup(plugins, { + root = root .. "/plugins", }) - vim.cmd("colorscheme rose-pine") + vim.cmd.colorscheme("rose-pine") + -- Add anything else here render: Lua validations: required: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index bd9d3f6..2b45cdb 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -3,12 +3,24 @@ description: Suggest a new feature title: "feature: " labels: [enhancement] body: + - type: textarea + validations: + required: true + attributes: + label: Is your feature request related to a problem? Please describe. + description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - type: textarea validations: required: true attributes: label: Describe the solution you'd like description: A clear and concise description of what you want to happen. + - type: textarea + validations: + required: true + attributes: + label: Describe alternatives you've considered + description: A clear and concise description of any alternative solutions or features you've considered. - type: textarea validations: required: false diff --git a/.stylua.toml b/.stylua.toml new file mode 100644 index 0000000..9d5f247 --- /dev/null +++ b/.stylua.toml @@ -0,0 +1,4 @@ +column_width = 80 +indent_type = "Tabs" +line_endings = "Unix" +quote_style = "AutoPreferSingle" diff --git a/changelog.md b/changelog.md deleted file mode 100644 index bd583ba..0000000 --- a/changelog.md +++ /dev/null @@ -1,82 +0,0 @@ -# Changelog - -## v2.0.0-next.1 - -### What's new - -- Add proper support for `StatusLineTerm` & `StatusLineTermNC`, controlled via `enable.terminal` -- Add background glow to diagnostic virtual text -- Add `extend_background_behind_borders` -- Add `styles.bold` and alternatively styling when disabled -- Add `before_highlight` hook to allow changing palette values and behaviours -- Increase contrast of search, visual selections, and more - -### Features - -**extend_background_behind_borders** - -Extend float backgrounds behind borders. Results vary depending on your border characters. - -```lua -{ - extend_background_behind_borders = true -} -``` - -**styles.transparency** - -Enable a unique experience focused around transparent terminals, avoiding large backgrounds and differentiating selections with foreground colours when possible. - -```lua -{ - styles = { - transparency = true - } -} -``` - -**before_highlight** - -```lua -{ - before_highlight = function(group, highlight, palette) - -- Disable all undercurls - if highlight.undercurl then - highlight.undercurl = false - end - - -- Change palette colour - if highlight.fg == palette.pine then - highlight.fg = palette.foam - end - end, -} -``` - -### Breaking changes - -> [!WARNING] -> Removed or renamed options should continue to work via internal migrations but backwards compatibility is not tested and may break at any time. - -```diff -- dim_nc_background = true, -+ dim_inactive_windows = true, - -- disable_background = true, -- disable_float_background = true, -+ styles.transparency = true - -- disable_italics = true, -+ styles.italic = false, - -- groups = { -- background = "...", -- comment = "...", -- punctuation = "...", -- }, -+ highlight_groups = { -+ Normal = { bg = "..." }, -+ Comment = { fg = "..." }, -+ ["@punctuation"] = { fg = "..." }, -+ } -``` diff --git a/colors/rose-pine-dawn.lua b/colors/rose-pine-dawn.lua index a95b327..b4482c0 100644 --- a/colors/rose-pine-dawn.lua +++ b/colors/rose-pine-dawn.lua @@ -1,2 +1 @@ -package.loaded["rose-pine.palette"] = nil -require("rose-pine").colorscheme("dawn") +require('rose-pine').colorscheme({ variant = 'dawn' }) diff --git a/colors/rose-pine-main.lua b/colors/rose-pine-main.lua index 15729c9..6951634 100644 --- a/colors/rose-pine-main.lua +++ b/colors/rose-pine-main.lua @@ -1,2 +1 @@ -package.loaded["rose-pine.palette"] = nil -require("rose-pine").colorscheme("main") +require('rose-pine').colorscheme({ variant = 'main' }) diff --git a/colors/rose-pine-moon.lua b/colors/rose-pine-moon.lua index 34b58c0..57e6a68 100644 --- a/colors/rose-pine-moon.lua +++ b/colors/rose-pine-moon.lua @@ -1,2 +1 @@ -package.loaded["rose-pine.palette"] = nil -require("rose-pine").colorscheme("moon") +require('rose-pine').colorscheme({ variant = 'moon' }) diff --git a/colors/rose-pine.lua b/colors/rose-pine.lua index f705290..fd735a8 100644 --- a/colors/rose-pine.lua +++ b/colors/rose-pine.lua @@ -1,2 +1,3 @@ -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 287144f..1e1ee36 100644 --- a/lua/lualine/themes/rose-pine-alt.lua +++ b/lua/lualine/themes/rose-pine-alt.lua @@ -1,32 +1,26 @@ -local p = require("rose-pine.palette") -local config = require("rose-pine.config") - -local bg_base = p.base -if config.options.styles.transparency then - bg_base = "NONE" -end +local p = require('rose-pine.palette') return { normal = { - a = { bg = p.surface, fg = p.rose, gui = "bold" }, + 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" }, + c = { bg = p.surface, fg = p.subtle, gui = 'italic' }, }, insert = { - a = { bg = p.surface, fg = p.foam, gui = "bold" }, + a = { bg = p.surface, fg = p.foam, gui = 'bold' }, }, visual = { - a = { bg = p.surface, fg = p.iris, gui = "bold" }, + a = { bg = p.surface, fg = p.iris, gui = 'bold' }, }, replace = { - a = { bg = p.surface, fg = p.pine, gui = "bold" }, + a = { bg = p.surface, fg = p.pine, gui = 'bold' }, }, command = { - a = { bg = p.surface, fg = p.love, gui = "bold" }, + a = { bg = p.surface, fg = p.love, gui = 'bold' }, }, inactive = { - a = { bg = bg_base, fg = p.subtle, gui = "bold" }, - b = { bg = bg_base, fg = p.subtle }, - c = { bg = bg_base, fg = p.subtle, gui = "italic" }, + 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 e409130..dde3075 100644 --- a/lua/lualine/themes/rose-pine.lua +++ b/lua/lualine/themes/rose-pine.lua @@ -1,40 +1,34 @@ -local p = require("rose-pine.palette") -local config = require("rose-pine.config") - -local bg_base = p.surface -if config.options.styles.transparency then - bg_base = "NONE" -end +local p = require('rose-pine.palette') return { normal = { - a = { bg = p.rose, fg = p.base, gui = "bold" }, + a = { bg = p.rose, fg = p.base, gui = 'bold' }, b = { bg = p.overlay, fg = p.rose }, - c = { bg = bg_base, fg = p.text }, + c = { bg = p.base, fg = p.text }, }, insert = { - a = { bg = p.foam, fg = p.base, gui = "bold" }, + a = { bg = p.foam, fg = p.base, gui = 'bold' }, b = { bg = p.overlay, fg = p.foam }, - c = { bg = bg_base, fg = p.text }, + c = { bg = p.base, fg = p.text }, }, visual = { - a = { bg = p.iris, fg = p.base, gui = "bold" }, + a = { bg = p.iris, fg = p.base, gui = 'bold' }, b = { bg = p.overlay, fg = p.iris }, - c = { bg = bg_base, fg = p.text }, + c = { bg = p.base, fg = p.text }, }, replace = { - a = { bg = p.pine, fg = p.base, gui = "bold" }, + a = { bg = p.pine, fg = p.base, gui = 'bold' }, b = { bg = p.overlay, fg = p.pine }, - c = { bg = bg_base, fg = p.text }, + c = { bg = p.base, fg = p.text }, }, command = { - a = { bg = p.love, fg = p.base, gui = "bold" }, + a = { bg = p.love, fg = p.base, gui = 'bold' }, b = { bg = p.overlay, fg = p.love }, - c = { bg = bg_base, fg = p.text }, + c = { bg = p.base, fg = p.text }, }, inactive = { - a = { bg = bg_base, fg = p.muted, gui = "bold" }, - b = { bg = bg_base, fg = p.muted }, - c = { bg = bg_base, fg = p.muted }, + 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 f10ffcd..bbfadb1 100644 --- a/lua/rose-pine.lua +++ b/lua/rose-pine.lua @@ -1,1242 +1,22 @@ +local config = require('rose-pine.config') local M = {} -local config = require("rose-pine.config") -local function set_highlights() - local utilities = require("rose-pine.utilities") - local palette = require("rose-pine.palette") - local styles = config.options.styles - - local groups = {} - for group, color in pairs(config.options.groups) do - groups[group] = utilities.parse_color(color) +---@param options Config|nil +function M.colorscheme(options) + if options then + config.extend(options) end - local function make_border(fg) - fg = fg or groups.border - return { - fg = fg, - bg = (config.options.extend_background_behind_borders and not styles.transparency) and palette.surface - or "NONE", - } + if vim.g.colors_name then + vim.cmd('hi clear') end - local highlights = {} - local legacy_highlights = { - ["@attribute.diff"] = { fg = palette.gold }, - ["@boolean"] = { link = "Boolean" }, - ["@class"] = { fg = palette.foam }, - ["@conditional"] = { link = "Conditional" }, - ["@field"] = { fg = palette.foam }, - ["@include"] = { link = "Include" }, - ["@interface"] = { fg = palette.foam }, - ["@macro"] = { link = "Macro" }, - ["@method"] = { fg = palette.rose }, - ["@namespace"] = { link = "Include" }, - ["@number"] = { link = "Number" }, - ["@parameter"] = { fg = palette.iris, italic = styles.italic }, - ["@preproc"] = { link = "PreProc" }, - ["@punctuation"] = { fg = palette.subtle }, - ["@punctuation.bracket"] = { link = "@punctuation" }, - ["@punctuation.delimiter"] = { link = "@punctuation" }, - ["@punctuation.special"] = { link = "@punctuation" }, - ["@regexp"] = { link = "String" }, - ["@repeat"] = { link = "Repeat" }, - ["@storageclass"] = { link = "StorageClass" }, - ["@symbol"] = { link = "Identifier" }, - ["@text"] = { fg = palette.text }, - ["@text.danger"] = { fg = groups.error }, - ["@text.diff.add"] = { fg = groups.git_add, bg = groups.git_add, blend = 20 }, - ["@text.diff.delete"] = { fg = groups.git_delete, bg = groups.git_delete, blend = 20 }, - ["@text.emphasis"] = { italic = styles.italic }, - ["@text.environment"] = { link = "Macro" }, - ["@text.environment.name"] = { link = "Type" }, - ["@text.math"] = { link = "Special" }, - ["@text.note"] = { link = "SpecialComment" }, - ["@text.strike"] = { strikethrough = true }, - ["@text.strong"] = { bold = styles.bold }, - ["@text.title"] = { link = "Title" }, - ["@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" }, - ["@text.underline"] = { underline = true }, - ["@text.uri"] = { fg = groups.link }, - ["@text.warning"] = { fg = groups.warn }, - ["@todo"] = { link = "Todo" }, - - -- lukas-reineke/indent-blankline.nvim - IndentBlanklineChar = { fg = palette.muted, nocombine = true }, - IndentBlanklineSpaceChar = { fg = palette.muted, nocombine = true }, - IndentBlanklineSpaceCharBlankline = { fg = palette.muted, nocombine = true }, - } - local default_highlights = { - ColorColumn = { bg = palette.surface }, - Conceal = { bg = "NONE" }, - CurSearch = { fg = palette.base, bg = palette.gold }, - Cursor = { fg = palette.text, bg = palette.highlight_high }, - CursorColumn = { bg = palette.overlay }, - -- CursorIM = {}, - CursorLine = { bg = palette.overlay }, - CursorLineNr = { fg = palette.text, bold = styles.bold }, - -- DarkenedPanel = { }, - -- DarkenedStatusline = {}, - DiffAdd = { bg = groups.git_add, blend = 20 }, - DiffChange = { bg = groups.git_change, blend = 20 }, - DiffDelete = { bg = groups.git_delete, blend = 20 }, - DiffText = { bg = groups.git_text, blend = 40 }, - diffAdded = { link = "DiffAdd" }, - diffChanged = { link = "DiffChange" }, - diffRemoved = { link = "DiffDelete" }, - Directory = { fg = palette.foam, bold = styles.bold }, - -- EndOfBuffer = {}, - ErrorMsg = { fg = groups.error, bold = styles.bold }, - FloatBorder = make_border(), - FloatTitle = { fg = palette.foam, bg = groups.panel, bold = styles.bold }, - FoldColumn = { fg = palette.muted }, - Folded = { fg = palette.text, bg = groups.panel }, - IncSearch = { link = "CurSearch" }, - LineNr = { fg = palette.muted }, - MatchParen = { fg = palette.pine, bg = palette.pine, blend = 25 }, - ModeMsg = { fg = palette.subtle }, - MoreMsg = { fg = palette.iris }, - NonText = { fg = palette.muted }, - Normal = { fg = palette.text, bg = palette.base }, - NormalFloat = { bg = groups.panel }, - NormalNC = { fg = palette.text, bg = config.options.dim_inactive_windows and palette._nc or palette.base }, - NvimInternalError = { link = "ErrorMsg" }, - Pmenu = { fg = palette.subtle, bg = groups.panel }, - PmenuExtra = { fg = palette.muted, bg = groups.panel }, - PmenuExtraSel = { fg = palette.subtle, bg = palette.overlay }, - PmenuKind = { fg = palette.foam, bg = groups.panel }, - PmenuKindSel = { fg = palette.subtle, bg = palette.overlay }, - PmenuSbar = { bg = groups.panel }, - PmenuSel = { fg = palette.text, bg = palette.overlay }, - PmenuThumb = { bg = palette.muted }, - Question = { fg = palette.gold }, - QuickFixLine = { fg = palette.foam }, - -- RedrawDebugNormal = {}, - RedrawDebugClear = { fg = palette.base, bg = palette.gold }, - RedrawDebugComposed = { fg = palette.base, bg = palette.pine }, - RedrawDebugRecompose = { fg = palette.base, bg = palette.love }, - Search = { fg = palette.text, bg = palette.gold, blend = 20 }, - SignColumn = { fg = palette.text, bg = "NONE" }, - SpecialKey = { fg = palette.foam }, - SpellBad = { sp = palette.subtle, undercurl = true }, - SpellCap = { sp = palette.subtle, undercurl = true }, - SpellLocal = { sp = palette.subtle, undercurl = true }, - SpellRare = { sp = palette.subtle, undercurl = true }, - StatusLine = { fg = palette.subtle, bg = groups.panel }, - StatusLineNC = { fg = palette.muted, bg = groups.panel, blend = 60 }, - StatusLineTerm = { fg = palette.base, bg = palette.pine }, - StatusLineTermNC = { fg = palette.base, bg = palette.pine, blend = 60 }, - Substitute = { link = "IncSearch" }, - TabLine = { fg = palette.subtle, bg = groups.panel }, - TabLineFill = { bg = groups.panel }, - TabLineSel = { fg = palette.text, bg = palette.overlay, bold = styles.bold }, - Title = { fg = palette.foam, bold = styles.bold }, - VertSplit = { fg = groups.border }, - Visual = { bg = palette.iris, blend = 15 }, - -- VisualNOS = {}, - WarningMsg = { fg = groups.warn, bold = styles.bold }, - -- Whitespace = {}, - WildMenu = { link = "IncSearch" }, - WinBar = { fg = palette.subtle, bg = groups.panel }, - WinBarNC = { fg = palette.muted, bg = groups.panel, blend = 60 }, - WinSeparator = { fg = groups.border }, - - DiagnosticError = { fg = groups.error }, - DiagnosticHint = { fg = groups.hint }, - DiagnosticInfo = { fg = groups.info }, - DiagnosticOk = { fg = groups.ok }, - DiagnosticWarn = { fg = groups.warn }, - DiagnosticDefaultError = { link = "DiagnosticError" }, - DiagnosticDefaultHint = { link = "DiagnosticHint" }, - DiagnosticDefaultInfo = { link = "DiagnosticInfo" }, - DiagnosticDefaultOk = { link = "DiagnosticOk" }, - DiagnosticDefaultWarn = { link = "DiagnosticWarn" }, - DiagnosticFloatingError = { link = "DiagnosticError" }, - DiagnosticFloatingHint = { link = "DiagnosticHint" }, - DiagnosticFloatingInfo = { link = "DiagnosticInfo" }, - DiagnosticFloatingOk = { link = "DiagnosticOk" }, - DiagnosticFloatingWarn = { link = "DiagnosticWarn" }, - DiagnosticSignError = { link = "DiagnosticError" }, - DiagnosticSignHint = { link = "DiagnosticHint" }, - DiagnosticSignInfo = { link = "DiagnosticInfo" }, - DiagnosticSignOk = { link = "DiagnosticOk" }, - DiagnosticSignWarn = { link = "DiagnosticWarn" }, - DiagnosticUnderlineError = { sp = groups.error, undercurl = true }, - DiagnosticUnderlineHint = { sp = groups.hint, undercurl = true }, - DiagnosticUnderlineInfo = { sp = groups.info, undercurl = true }, - DiagnosticUnderlineOk = { sp = groups.ok, undercurl = true }, - DiagnosticUnderlineWarn = { sp = groups.warn, undercurl = true }, - DiagnosticVirtualTextError = { fg = groups.error, bg = groups.error, blend = 10 }, - DiagnosticVirtualTextHint = { fg = groups.hint, bg = groups.hint, blend = 10 }, - DiagnosticVirtualTextInfo = { fg = groups.info, bg = groups.info, blend = 10 }, - DiagnosticVirtualTextOk = { fg = groups.ok, bg = groups.ok, blend = 10 }, - DiagnosticVirtualTextWarn = { fg = groups.warn, bg = groups.warn, blend = 10 }, - - Boolean = { fg = palette.rose }, - Character = { fg = palette.gold }, - Comment = { fg = palette.subtle, italic = styles.italic }, - Conditional = { fg = palette.pine }, - Constant = { fg = palette.gold }, - Debug = { fg = palette.rose }, - Define = { fg = palette.iris }, - Delimiter = { fg = palette.subtle }, - Error = { fg = palette.love }, - Exception = { fg = palette.pine }, - Float = { fg = palette.gold }, - Function = { fg = palette.rose }, - Identifier = { fg = palette.text }, - Include = { fg = palette.pine }, - Keyword = { fg = palette.pine }, - Label = { fg = palette.foam }, - LspCodeLens = { fg = palette.subtle }, - LspCodeLensSeparator = { fg = palette.muted }, - LspInlayHint = { fg = palette.muted, bg = palette.muted, blend = 10 }, - LspReferenceRead = { bg = palette.highlight_med }, - LspReferenceText = { bg = palette.highlight_med }, - LspReferenceWrite = { bg = palette.highlight_med }, - Macro = { fg = palette.iris }, - Number = { fg = palette.gold }, - Operator = { fg = palette.subtle }, - PreCondit = { fg = palette.iris }, - PreProc = { link = "PreCondit" }, - Repeat = { fg = palette.pine }, - Special = { fg = palette.foam }, - SpecialChar = { link = "Special" }, - SpecialComment = { fg = palette.iris }, - Statement = { fg = palette.pine, bold = styles.bold }, - StorageClass = { fg = palette.foam }, - String = { fg = palette.gold }, - Structure = { fg = palette.foam }, - Tag = { fg = palette.foam }, - Todo = { fg = palette.rose, bg = palette.rose, blend = 20 }, - Type = { fg = palette.foam }, - TypeDef = { link = "Type" }, - Underlined = { fg = palette.iris, underline = true }, - - healthError = { fg = groups.error }, - healthSuccess = { fg = groups.info }, - healthWarning = { fg = groups.warn }, - - htmlArg = { fg = palette.iris }, - htmlBold = { bold = styles.bold }, - htmlEndTag = { fg = palette.subtle }, - htmlH1 = { link = "markdownH1" }, - htmlH2 = { link = "markdownH2" }, - htmlH3 = { link = "markdownH3" }, - htmlH4 = { link = "markdownH4" }, - htmlH5 = { link = "markdownH5" }, - htmlItalic = { italic = styles.italic }, - htmlLink = { link = "markdownUrl" }, - htmlTag = { fg = palette.subtle }, - htmlTagN = { fg = palette.text }, - htmlTagName = { fg = palette.foam }, - - markdownDelimiter = { fg = palette.subtle }, - markdownH1 = { fg = groups.h1, bold = styles.bold }, - markdownH1Delimiter = { link = "markdownH1" }, - markdownH2 = { fg = groups.h2, bold = styles.bold }, - markdownH2Delimiter = { link = "markdownH2" }, - markdownH3 = { fg = groups.h3, bold = styles.bold }, - markdownH3Delimiter = { link = "markdownH3" }, - markdownH4 = { fg = groups.h4, bold = styles.bold }, - markdownH4Delimiter = { link = "markdownH4" }, - markdownH5 = { fg = groups.h5, bold = styles.bold }, - markdownH5Delimiter = { link = "markdownH5" }, - markdownH6 = { fg = groups.h6, bold = styles.bold }, - markdownH6Delimiter = { link = "markdownH6" }, - markdownLinkText = { link = "markdownUrl" }, - markdownUrl = { fg = groups.link, sp = groups.link, underline = true }, - - mkdCode = { fg = palette.foam, italic = styles.italic }, - mkdCodeDelimiter = { fg = palette.rose }, - mkdCodeEnd = { fg = palette.foam }, - mkdCodeStart = { fg = palette.foam }, - mkdFootnotes = { fg = palette.foam }, - mkdID = { fg = palette.foam, underline = true }, - mkdInlineURL = { link = "markdownUrl" }, - mkdLink = { link = "markdownUrl" }, - mkdLinkDef = { link = "markdownUrl" }, - mkdListItemLine = { fg = palette.text }, - mkdRule = { fg = palette.subtle }, - mkdURL = { link = "markdownUrl" }, - - --- Treesitter - --- |:help treesitter-highlight-groups| - ["@variable"] = { fg = palette.text, italic = styles.italic }, - ["@variable.builtin"] = { fg = palette.love, italic = styles.italic, bold = styles.bold }, - ["@variable.parameter"] = { fg = palette.iris, italic = styles.italic }, - ["@variable.parameter.builtin"] = { fg = palette.iris, italic = styles.italic, bold = styles.bold }, - ["@variable.member"] = { fg = palette.foam }, - - ["@constant"] = { fg = palette.gold }, - ["@constant.builtin"] = { fg = palette.gold, bold = styles.bold }, - ["@constant.macro"] = { fg = palette.gold }, - - ["@module"] = { fg = palette.text }, - ["@module.builtin"] = { fg = palette.text, bold = styles.bold }, - ["@label"] = { link = "Label" }, - - ["@string"] = { link = "String" }, - -- ["@string.documentation"] = {}, - ["@string.regexp"] = { fg = palette.iris }, - ["@string.escape"] = { fg = palette.pine }, - ["@string.special"] = { link = "String" }, - ["@string.special.symbol"] = { link = "Identifier" }, - ["@string.special.url"] = { fg = groups.link }, - -- ["@string.special.path"] = {}, - - ["@character"] = { link = "Character" }, - ["@character.special"] = { link = "Character" }, - - ["@boolean"] = { link = "Boolean" }, - ["@number"] = { link = "Number" }, - ["@number.float"] = { link = "Number" }, - ["@float"] = { link = "Number" }, - - ["@type"] = { fg = palette.foam }, - ["@type.builtin"] = { fg = palette.foam, bold = styles.bold }, - -- ["@type.definition"] = {}, - - ["@attribute"] = { fg = palette.iris }, - ["@attribute.builtin"] = { fg = palette.iris, bold = styles.bold }, - ["@property"] = { fg = palette.foam, italic = styles.italic }, - - ["@function"] = { fg = palette.rose }, - ["@function.builtin"] = { fg = palette.rose, bold = styles.bold }, - -- ["@function.call"] = {}, - ["@function.macro"] = { link = "Function" }, - - ["@function.method"] = { fg = palette.rose }, - ["@function.method.call"] = { fg = palette.iris }, - - ["@constructor"] = { fg = palette.foam }, - ["@operator"] = { link = "Operator" }, - - ["@keyword"] = { link = "Keyword" }, - -- ["@keyword.coroutine"] = {}, - -- ["@keyword.function"] = {}, - ["@keyword.operator"] = { fg = palette.subtle }, - ["@keyword.import"] = { fg = palette.pine }, - ["@keyword.storage"] = { fg = palette.foam }, - ["@keyword.repeat"] = { fg = palette.pine }, - ["@keyword.return"] = { fg = palette.pine }, - ["@keyword.debug"] = { fg = palette.rose }, - ["@keyword.exception"] = { fg = palette.pine }, - - ["@keyword.conditional"] = { fg = palette.pine }, - ["@keyword.conditional.ternary"] = { fg = palette.pine }, - - ["@keyword.directive"] = { fg = palette.iris }, - ["@keyword.directive.define"] = { fg = palette.iris }, - - --- Punctuation - ["@punctuation.delimiter"] = { fg = palette.subtle }, - ["@punctuation.bracket"] = { fg = palette.subtle }, - ["@punctuation.special"] = { fg = palette.subtle }, - - --- Comments - ["@comment"] = { link = "Comment" }, - -- ["@comment.documentation"] = {}, - - ["@comment.error"] = { fg = groups.error }, - ["@comment.warning"] = { fg = groups.warn }, - ["@comment.todo"] = { fg = groups.todo, bg = groups.todo, blend = 15 }, - ["@comment.hint"] = { fg = groups.hint, bg = groups.hint, blend = 15 }, - ["@comment.info"] = { fg = groups.info, bg = groups.info, blend = 15 }, - ["@comment.note"] = { fg = groups.note, bg = groups.note, blend = 15 }, - - --- Markup - ["@markup.strong"] = { bold = styles.bold }, - ["@markup.italic"] = { italic = styles.italic }, - ["@markup.strikethrough"] = { strikethrough = true }, - ["@markup.underline"] = { underline = true }, - - ["@markup.heading"] = { fg = palette.foam, bold = styles.bold }, - - ["@markup.quote"] = { fg = palette.text }, - ["@markup.math"] = { link = "Special" }, - ["@markup.environment"] = { link = "Macro" }, - ["@markup.environment.name"] = { link = "@type" }, - - -- ["@markup.link"] = {}, - ["@markup.link.markdown_inline"] = { fg = palette.subtle }, - ["@markup.link.label.markdown_inline"] = { fg = palette.foam }, - ["@markup.link.url"] = { fg = groups.link }, - - -- ["@markup.raw"] = { bg = palette.surface }, - -- ["@markup.raw.block"] = { bg = palette.surface }, - ["@markup.raw.delimiter.markdown"] = { fg = palette.subtle }, - - ["@markup.list"] = { fg = palette.pine }, - ["@markup.list.checked"] = { fg = palette.foam, bg = palette.foam, blend = 10 }, - ["@markup.list.unchecked"] = { fg = palette.text }, - - -- Markdown headings - ["@markup.heading.1.markdown"] = { link = "markdownH1" }, - ["@markup.heading.2.markdown"] = { link = "markdownH2" }, - ["@markup.heading.3.markdown"] = { link = "markdownH3" }, - ["@markup.heading.4.markdown"] = { link = "markdownH4" }, - ["@markup.heading.5.markdown"] = { link = "markdownH5" }, - ["@markup.heading.6.markdown"] = { link = "markdownH6" }, - ["@markup.heading.1.marker.markdown"] = { link = "markdownH1Delimiter" }, - ["@markup.heading.2.marker.markdown"] = { link = "markdownH2Delimiter" }, - ["@markup.heading.3.marker.markdown"] = { link = "markdownH3Delimiter" }, - ["@markup.heading.4.marker.markdown"] = { link = "markdownH4Delimiter" }, - ["@markup.heading.5.marker.markdown"] = { link = "markdownH5Delimiter" }, - ["@markup.heading.6.marker.markdown"] = { link = "markdownH6Delimiter" }, - - ["@diff.plus"] = { fg = groups.git_add, bg = groups.git_add, blend = 20 }, - ["@diff.minus"] = { fg = groups.git_delete, bg = groups.git_delete, blend = 20 }, - ["@diff.delta"] = { bg = groups.git_change, blend = 20 }, - - ["@tag"] = { link = "Tag" }, - ["@tag.attribute"] = { fg = palette.iris }, - ["@tag.delimiter"] = { fg = palette.subtle }, - - --- Non-highlighting captures - -- ["@none"] = {}, - ["@conceal"] = { link = "Conceal" }, - ["@conceal.markdown"] = { fg = palette.subtle }, - - -- ["@spell"] = {}, - -- ["@nospell"] = {}, - - --- Semantic - ["@lsp.type.comment"] = {}, - ["@lsp.type.comment.c"] = { link = "@comment" }, - ["@lsp.type.comment.cpp"] = { link = "@comment" }, - ["@lsp.type.enum"] = { link = "@type" }, - ["@lsp.type.interface"] = { link = "@interface" }, - ["@lsp.type.keyword"] = { link = "@keyword" }, - ["@lsp.type.namespace"] = { link = "@namespace" }, - ["@lsp.type.namespace.python"] = { link = "@variable" }, - ["@lsp.type.parameter"] = { link = "@parameter" }, - ["@lsp.type.property"] = { link = "@property" }, - ["@lsp.type.variable"] = {}, -- defer to treesitter for regular variables - ["@lsp.type.variable.svelte"] = { link = "@variable" }, - ["@lsp.typemod.function.defaultLibrary"] = { link = "@function.builtin" }, - ["@lsp.typemod.operator.injected"] = { link = "@operator" }, - ["@lsp.typemod.string.injected"] = { link = "@string" }, - ["@lsp.typemod.variable.constant"] = { link = "@constant" }, - ["@lsp.typemod.variable.defaultLibrary"] = { link = "@variable.builtin" }, - ["@lsp.typemod.variable.injected"] = { link = "@variable" }, - - --- Plugins - -- romgrk/barbar.nvim - BufferCurrent = { fg = palette.text, bg = palette.overlay }, - BufferCurrentIndex = { fg = palette.text, bg = palette.overlay }, - BufferCurrentMod = { fg = palette.foam, bg = palette.overlay }, - BufferCurrentSign = { fg = palette.subtle, bg = palette.overlay }, - BufferCurrentTarget = { fg = palette.gold, bg = palette.overlay }, - BufferInactive = { fg = palette.subtle }, - BufferInactiveIndex = { fg = palette.subtle }, - BufferInactiveMod = { fg = palette.foam }, - BufferInactiveSign = { fg = palette.muted }, - BufferInactiveTarget = { fg = palette.gold }, - BufferTabpageFill = { fg = "NONE", bg = "NONE" }, - BufferVisible = { fg = palette.subtle }, - BufferVisibleIndex = { fg = palette.subtle }, - BufferVisibleMod = { fg = palette.foam }, - BufferVisibleSign = { fg = palette.muted }, - BufferVisibleTarget = { fg = palette.gold }, - - -- lewis6991/gitsigns.nvim - GitSignsAdd = { fg = groups.git_add, bg = "NONE" }, - GitSignsChange = { fg = groups.git_change, bg = "NONE" }, - GitSignsDelete = { fg = groups.git_delete, bg = "NONE" }, - SignAdd = { fg = groups.git_add, bg = "NONE" }, - SignChange = { fg = groups.git_change, bg = "NONE" }, - SignDelete = { fg = groups.git_delete, bg = "NONE" }, - - -- mvllow/modes.nvim - ModesCopy = { bg = palette.gold }, - ModesDelete = { bg = palette.love }, - ModesFormat = { bg = palette.rose }, - ModesInsert = { bg = palette.foam }, - ModesReplace = { bg = palette.pine }, - ModesVisual = { bg = palette.iris }, - - -- kyazdani42/nvim-tree.lua - NvimTreeEmptyFolderName = { fg = palette.muted }, - NvimTreeFileDeleted = { fg = groups.git_delete }, - NvimTreeFileDirty = { fg = groups.git_dirty }, - NvimTreeFileMerge = { fg = groups.git_merge }, - NvimTreeFileNew = { fg = palette.foam }, - NvimTreeFileRenamed = { fg = groups.git_rename }, - NvimTreeFileStaged = { fg = groups.git_stage }, - NvimTreeFolderIcon = { fg = palette.subtle }, - NvimTreeFolderName = { fg = palette.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 = palette.text }, - NvimTreeNormal = { link = "Normal" }, - NvimTreeOpenedFile = { fg = palette.text, bg = palette.overlay }, - NvimTreeOpenedFolderName = { link = "NvimTreeFolderName" }, - NvimTreeRootFolder = { fg = palette.foam, bold = styles.bold }, - NvimTreeSpecialFile = { link = "NvimTreeNormal" }, - NvimTreeWindowPicker = { link = "StatusLineTerm" }, - - -- nvim-neotest/neotest - NeotestAdapterName = { fg = palette.iris }, - NeotestBorder = { fg = palette.highlight_med }, - NeotestDir = { fg = palette.foam }, - NeotestExpandMarker = { fg = palette.highlight_med }, - NeotestFailed = { fg = palette.love }, - NeotestFile = { fg = palette.text }, - NeotestFocused = { fg = palette.gold, bg = palette.highlight_med }, - NeotestIndent = { fg = palette.highlight_med }, - NeotestMarked = { fg = palette.rose, bold = styles.bold }, - NeotestNamespace = { fg = palette.gold }, - NeotestPassed = { fg = palette.pine }, - NeotestRunning = { fg = palette.gold }, - NeotestWinSelect = { fg = palette.muted }, - NeotestSkipped = { fg = palette.subtle }, - NeotestTarget = { fg = palette.love }, - NeotestTest = { fg = palette.gold }, - NeotestUnknown = { fg = palette.subtle }, - NeotestWatching = { fg = palette.iris }, - - -- nvim-neo-tree/neo-tree.nvim - NeoTreeGitAdded = { fg = groups.git_add }, - NeoTreeGitConflict = { fg = groups.git_merge }, - NeoTreeGitDeleted = { fg = groups.git_delete }, - NeoTreeGitIgnored = { fg = groups.git_ignore }, - NeoTreeGitModified = { fg = groups.git_dirty }, - NeoTreeGitRenamed = { fg = groups.git_rename }, - NeoTreeGitUntracked = { fg = groups.git_untracked }, - NeoTreeTabActive = { fg = palette.text, bg = palette.overlay }, - NeoTreeTabInactive = { fg = palette.subtle }, - NeoTreeTabSeparatorActive = { link = "WinSeparator" }, - NeoTreeTabSeparatorInactive = { link = "WinSeparator" }, - NeoTreeTitleBar = { link = "StatusLineTerm" }, - - -- folke/flash.nvim - FlashLabel = { fg = palette.base, bg = palette.love }, - - -- folke/which-key.nvim - WhichKey = { fg = palette.iris }, - WhichKeyBorder = make_border(), - WhichKeyDesc = { fg = palette.gold }, - WhichKeyFloat = { bg = groups.panel }, - WhichKeyGroup = { fg = palette.foam }, - WhichKeyIcon = { fg = palette.pine }, - WhichKeyIconAzure = { fg = palette.pine }, - WhichKeyIconBlue = { fg = palette.pine }, - WhichKeyIconCyan = { fg = palette.foam }, - WhichKeyIconGreen = { fg = palette.leaf }, - WhichKeyIconGrey = { fg = palette.subtle }, - WhichKeyIconOrange = { fg = palette.rose }, - WhichKeyIconPurple = { fg = palette.iris }, - WhichKeyIconRed = { fg = palette.love }, - WhichKeyIconYellow = { fg = palette.gold }, - WhichKeyNormal = { link = "NormalFloat" }, - WhichKeySeparator = { fg = palette.subtle }, - WhichKeyTitle = { link = "FloatTitle" }, - WhichKeyValue = { fg = palette.rose }, - - -- lukas-reineke/indent-blankline.nvim - IblIndent = { fg = palette.overlay }, - IblScope = { fg = palette.foam }, - IblWhitespace = { fg = palette.overlay }, - - -- hrsh7th/nvim-cmp - CmpItemAbbr = { fg = palette.subtle }, - CmpItemAbbrDeprecated = { fg = palette.subtle, strikethrough = true }, - CmpItemAbbrMatch = { fg = palette.text, bold = styles.bold }, - CmpItemAbbrMatchFuzzy = { fg = palette.text, bold = styles.bold }, - CmpItemKind = { fg = palette.subtle }, - CmpItemKindClass = { link = "StorageClass" }, - CmpItemKindFunction = { link = "Function" }, - CmpItemKindInterface = { link = "Type" }, - CmpItemKindMethod = { link = "PreProc" }, - CmpItemKindSnippet = { link = "String" }, - CmpItemKindVariable = { link = "Identifier" }, - - -- NeogitOrg/neogit - -- https://github.com/NeogitOrg/neogit/blob/master/lua/neogit/lib/hl.lua#L109-L198 - NeogitChangeAdded = { fg = groups.git_add, bold = styles.bold, italic = styles.italic }, - NeogitChangeBothModified = { fg = groups.git_change, bold = styles.bold, italic = styles.italic }, - NeogitChangeCopied = { fg = groups.git_untracked, bold = styles.bold, italic = styles.italic }, - NeogitChangeDeleted = { fg = groups.git_delete, bold = styles.bold, italic = styles.italic }, - NeogitChangeModified = { fg = groups.git_change, bold = styles.bold, italic = styles.italic }, - NeogitChangeNewFile = { fg = groups.git_stage, bold = styles.bold, italic = styles.italic }, - NeogitChangeRenamed = { fg = groups.git_rename, bold = styles.bold, italic = styles.italic }, - NeogitChangeUpdated = { fg = groups.git_change, bold = styles.bold, italic = styles.italic }, - NeogitDiffAddHighlight = { link = "DiffAdd" }, - NeogitDiffContextHighlight = { bg = palette.surface }, - NeogitDiffDeleteHighlight = { link = "DiffDelete" }, - NeogitFilePath = { fg = palette.foam, italic = styles.italic }, - NeogitHunkHeader = { bg = groups.panel }, - NeogitHunkHeaderHighlight = { bg = groups.panel }, - - -- vimwiki/vimwiki - VimwikiHR = { fg = palette.subtle }, - VimwikiHeader1 = { link = "markdownH1" }, - VimwikiHeader2 = { link = "markdownH2" }, - VimwikiHeader3 = { link = "markdownH3" }, - VimwikiHeader4 = { link = "markdownH4" }, - VimwikiHeader5 = { link = "markdownH5" }, - VimwikiHeader6 = { link = "markdownH6" }, - VimwikiHeaderChar = { fg = palette.subtle }, - VimwikiLink = { link = "markdownUrl" }, - VimwikiList = { fg = palette.iris }, - VimwikiNoExistsLink = { fg = palette.love }, - - -- nvim-neorg/neorg - NeorgHeading1Prefix = { link = "markdownH1Delimiter" }, - NeorgHeading1Title = { link = "markdownH1" }, - NeorgHeading2Prefix = { link = "markdownH2Delimiter" }, - NeorgHeading2Title = { link = "markdownH2" }, - NeorgHeading3Prefix = { link = "markdownH3Delimiter" }, - NeorgHeading3Title = { link = "markdownH3" }, - NeorgHeading4Prefix = { link = "markdownH4Delimiter" }, - NeorgHeading4Title = { link = "markdownH4" }, - NeorgHeading5Prefix = { link = "markdownH5Delimiter" }, - NeorgHeading5Title = { link = "markdownH5" }, - NeorgHeading6Prefix = { link = "markdownH6Delimiter" }, - NeorgHeading6Title = { link = "markdownH6" }, - NeorgMarkerTitle = { fg = palette.foam, bold = styles.bold }, - - -- tami5/lspsaga.nvim (fork of glepnir/lspsaga.nvim) - DefinitionCount = { fg = palette.rose }, - DefinitionIcon = { fg = palette.rose }, - DefinitionPreviewTitle = { fg = palette.rose, bold = styles.bold }, - LspFloatWinBorder = make_border(), - LspFloatWinNormal = { bg = groups.panel }, - LspSagaAutoPreview = { fg = palette.subtle }, - LspSagaCodeActionBorder = make_border(palette.rose), - LspSagaCodeActionContent = { fg = palette.foam }, - LspSagaCodeActionTitle = { fg = palette.gold, bold = styles.bold }, - LspSagaCodeActionTruncateLine = { link = "LspSagaCodeActionBorder" }, - LspSagaDefPreviewBorder = make_border(), - LspSagaDiagnosticBorder = make_border(palette.gold), - LspSagaDiagnosticHeader = { fg = palette.foam, bold = styles.bold }, - LspSagaDiagnosticTruncateLine = { link = "LspSagaDiagnosticBorder" }, - LspSagaDocTruncateLine = { link = "LspSagaHoverBorder" }, - LspSagaFinderSelection = { fg = palette.gold }, - LspSagaHoverBorder = { link = "LspFloatWinBorder" }, - LspSagaLspFinderBorder = { link = "LspFloatWinBorder" }, - LspSagaRenameBorder = make_border(palette.pine), - LspSagaRenamePromptPrefix = { fg = palette.love }, - LspSagaShTruncateLine = { link = "LspSagaSignatureHelpBorder" }, - LspSagaSignatureHelpBorder = make_border(palette.foam), - ReferencesCount = { fg = palette.rose }, - ReferencesIcon = { fg = palette.rose }, - SagaShadow = { bg = palette.overlay }, - TargetWord = { fg = palette.iris }, - - -- ray-x/lsp_signature.nvim - LspSignatureActiveParameter = { bg = palette.overlay }, - - -- rlane/pounce.nvim - PounceAccept = { fg = palette.love, bg = palette.love, blend = 20 }, - PounceAcceptBest = { fg = palette.gold, bg = palette.gold, blend = 20 }, - PounceGap = { link = "Search" }, - PounceMatch = { link = "Search" }, - - -- ggandor/leap.nvim - LeapLabelPrimary = { link = "IncSearch" }, - LeapLabelSecondary = { link = "StatusLineTerm" }, - LeapMatch = { link = "MatchParen" }, - - -- phaazon/hop.nvim - -- smoka7/hop.nvim - HopNextKey = { fg = palette.love, bg = palette.love, blend = 20 }, - HopNextKey1 = { fg = palette.foam, bg = palette.foam, blend = 20 }, - HopNextKey2 = { fg = palette.pine, bg = palette.pine, blend = 20 }, - HopUnmatched = { fg = palette.muted }, - - -- nvim-telescope/telescope.nvim - TelescopeBorder = make_border(), - TelescopeMatching = { fg = palette.rose }, - TelescopeNormal = { link = "NormalFloat" }, - TelescopePromptNormal = { link = "TelescopeNormal" }, - TelescopePromptPrefix = { fg = palette.subtle }, - TelescopeSelection = { fg = palette.text, bg = palette.overlay }, - TelescopeSelectionCaret = { fg = palette.rose, bg = palette.overlay }, - TelescopeTitle = { fg = palette.foam, bold = styles.bold }, - - -- ibhagwan/fzf-lua - FzfLuaBorder = make_border(), - FzfLuaBufFlagAlt = { fg = palette.subtle }, - FzfLuaBufFlagCur = { fg = palette.subtle }, - FzfLuaCursorLine = { fg = palette.text, bg = palette.overlay }, - FzfLuaFilePart = { fg = palette.text }, - FzfLuaHeaderBind = { fg = palette.rose }, - FzfLuaHeaderText = { fg = palette.love }, - FzfLuaNormal = { link = "NormalFloat" }, - FzfLuaTitle = { link = "FloatTitle" }, - - -- rcarriga/nvim-notify - NotifyBackground = { link = "NormalFloat" }, - NotifyDEBUGBody = { link = "NormalFloat" }, - NotifyDEBUGBorder = make_border(), - NotifyDEBUGIcon = { link = "NotifyDEBUGTitle" }, - NotifyDEBUGTitle = { fg = palette.muted }, - NotifyERRORBody = { link = "NormalFloat" }, - NotifyERRORBorder = make_border(groups.error), - NotifyERRORIcon = { link = "NotifyERRORTitle" }, - NotifyERRORTitle = { fg = groups.error }, - NotifyINFOBody = { link = "NormalFloat" }, - NotifyINFOBorder = make_border(groups.info), - NotifyINFOIcon = { link = "NotifyINFOTitle" }, - NotifyINFOTitle = { fg = groups.info }, - NotifyTRACEBody = { link = "NormalFloat" }, - NotifyTRACEBorder = make_border(palette.iris), - NotifyTRACEIcon = { link = "NotifyTRACETitle" }, - NotifyTRACETitle = { fg = palette.iris }, - NotifyWARNBody = { link = "NormalFloat" }, - NotifyWARNBorder = make_border(groups.warn), - NotifyWARNIcon = { link = "NotifyWARNTitle" }, - NotifyWARNTitle = { fg = groups.warn }, - - -- rcarriga/nvim-dap-ui - DapUIBreakpointsCurrentLine = { fg = palette.gold, bold = styles.bold }, - DapUIBreakpointsDisabledLine = { fg = palette.muted }, - DapUIBreakpointsInfo = { link = "DapUIThread" }, - DapUIBreakpointsLine = { link = "DapUIBreakpointsPath" }, - DapUIBreakpointsPath = { fg = palette.foam }, - DapUIDecoration = { link = "DapUIBreakpointsPath" }, - DapUIFloatBorder = make_border(), - DapUIFrameName = { fg = palette.text }, - DapUILineNumber = { link = "DapUIBreakpointsPath" }, - DapUIModifiedValue = { fg = palette.foam, bold = styles.bold }, - DapUIScope = { link = "DapUIBreakpointsPath" }, - DapUISource = { fg = palette.iris }, - DapUIStoppedThread = { link = "DapUIBreakpointsPath" }, - DapUIThread = { fg = palette.gold }, - DapUIValue = { fg = palette.text }, - DapUIVariable = { fg = palette.text }, - DapUIType = { fg = palette.iris }, - DapUIWatchesEmpty = { fg = palette.love }, - DapUIWatchesError = { link = "DapUIWatchesEmpty" }, - DapUIWatchesValue = { link = "DapUIThread" }, - - -- glepnir/dashboard-nvim - DashboardCenter = { fg = palette.gold }, - DashboardFooter = { fg = palette.iris }, - DashboardHeader = { fg = palette.pine }, - DashboardShortcut = { fg = palette.love }, - - -- SmiteshP/nvim-navic - NavicIconsArray = { fg = palette.gold }, - NavicIconsBoolean = { fg = palette.rose }, - NavicIconsClass = { fg = palette.foam }, - NavicIconsConstant = { fg = palette.gold }, - NavicIconsConstructor = { fg = palette.gold }, - NavicIconsEnum = { fg = palette.gold }, - NavicIconsEnumMember = { fg = palette.foam }, - NavicIconsEvent = { fg = palette.gold }, - NavicIconsField = { fg = palette.foam }, - NavicIconsFile = { fg = palette.muted }, - NavicIconsFunction = { fg = palette.pine }, - NavicIconsInterface = { fg = palette.foam }, - NavicIconsKey = { fg = palette.iris }, - NavicIconsKeyword = { fg = palette.pine }, - NavicIconsMethod = { fg = palette.iris }, - NavicIconsModule = { fg = palette.rose }, - NavicIconsNamespace = { fg = palette.muted }, - NavicIconsNull = { fg = palette.love }, - NavicIconsNumber = { fg = palette.gold }, - NavicIconsObject = { fg = palette.gold }, - NavicIconsOperator = { fg = palette.subtle }, - NavicIconsPackage = { fg = palette.muted }, - NavicIconsProperty = { fg = palette.foam }, - NavicIconsString = { fg = palette.gold }, - NavicIconsStruct = { fg = palette.foam }, - NavicIconsTypeParameter = { fg = palette.foam }, - NavicIconsVariable = { fg = palette.text }, - NavicSeparator = { fg = palette.subtle }, - NavicText = { fg = palette.subtle }, - - -- folke/noice.nvim - NoiceCursor = { fg = palette.highlight_high, bg = palette.text }, - - -- folke/trouble.nvim - TroubleText = { fg = palette.subtle }, - TroubleCount = { fg = palette.iris, bg = palette.surface }, - TroubleNormal = { fg = palette.text, bg = groups.panel }, - - -- echasnovski/mini.nvim - MiniAnimateCursor = { reverse = true, nocombine = true }, - MiniAnimateNormalFloat = { link = "NormalFloat" }, - - MiniClueBorder = { link = "FloatBorder" }, - MiniClueDescGroup = { link = "DiagnosticFloatingWarn" }, - MiniClueDescSingle = { link = "NormalFloat" }, - MiniClueNextKey = { link = "DiagnosticFloatingHint" }, - MiniClueNextKeyWithPostkeys = { link = "DiagnosticFloatingError" }, - MiniClueSeparator = { link = "DiagnosticFloatingInfo" }, - MiniClueTitle = { bg = groups.panel, bold = styles.bold }, - - MiniCompletionActiveParameter = { underline = true }, - - MiniCursorword = { underline = true }, - MiniCursorwordCurrent = { underline = true }, - - MiniDepsChangeAdded = { fg = groups.git_add }, - MiniDepsChangeRemoved = { fg = groups.git_delete }, - MiniDepsHint = { link = "DiagnosticHint" }, - MiniDepsInfo = { link = "DiagnosticInfo" }, - MiniDepsMsgBreaking = { link = "DiagnosticWarn" }, - MiniDepsPlaceholder = { link = "Comment" }, - MiniDepsTitle = { link = "Title" }, - MiniDepsTitleError = { link = "DiffDelete" }, - MiniDepsTitleSame = { link = "DiffText" }, - MiniDepsTitleUpdate = { link = "DiffAdd" }, - - MiniDiffOverAdd = { fg = groups.git_add, bg = groups.git_add, blend = 20 }, - MiniDiffOverChange = { fg = groups.git_change, bg = groups.git_change, blend = 20 }, - MiniDiffOverContext = { bg = palette.surface }, - MiniDiffOverDelete = { fg = groups.git_delete, bg = groups.git_delete, blend = 20 }, - MiniDiffSignAdd = { fg = groups.git_add }, - MiniDiffSignChange = { fg = groups.git_change }, - MiniDiffSignDelete = { fg = groups.git_delete }, - - MiniFilesBorder = { link = "FloatBorder" }, - MiniFilesBorderModified = { link = "DiagnosticFloatingWarn" }, - MiniFilesCursorLine = { link = "CursorLine" }, - MiniFilesDirectory = { link = "Directory" }, - MiniFilesFile = { fg = palette.text }, - MiniFilesNormal = { link = "NormalFloat" }, - MiniFilesTitle = { link = "FloatTitle" }, - MiniFilesTitleFocused = { fg = palette.rose, bg = groups.panel, bold = styles.bold }, - - MiniHipatternsFixme = { fg = palette.base, bg = groups.error, bold = styles.bold }, - MiniHipatternsHack = { fg = palette.base, bg = groups.warn, bold = styles.bold }, - MiniHipatternsNote = { fg = palette.base, bg = groups.info, bold = styles.bold }, - MiniHipatternsTodo = { fg = palette.base, bg = groups.hint, bold = styles.bold }, - - MiniIconsAzure = { fg = palette.foam }, - MiniIconsBlue = { fg = palette.pine }, - MiniIconsCyan = { fg = palette.foam }, - MiniIconsGreen = { fg = palette.leaf }, - MiniIconsGrey = { fg = palette.subtle }, - MiniIconsOrange = { fg = palette.rose }, - MiniIconsPurple = { fg = palette.iris }, - MiniIconsRed = { fg = palette.love }, - MiniIconsYellow = { fg = palette.gold }, - - MiniIndentscopeSymbol = { fg = palette.muted }, - MiniIndentscopeSymbolOff = { fg = palette.gold }, - - MiniJump = { sp = palette.gold, undercurl = true }, - - MiniJump2dDim = { fg = palette.subtle }, - MiniJump2dSpot = { fg = palette.gold, bold = styles.bold, nocombine = true }, - MiniJump2dSpotAhead = { fg = palette.foam, bg = palette.surface, nocombine = true }, - MiniJump2dSpotUnique = { fg = palette.rose, bold = styles.bold, nocombine = true }, - - MiniMapNormal = { link = "NormalFloat" }, - MiniMapSymbolCount = { link = "Special" }, - MiniMapSymbolLine = { link = "Title" }, - MiniMapSymbolView = { link = "Delimiter" }, - - MiniNotifyBorder = { link = "FloatBorder" }, - MiniNotifyNormal = { link = "NormalFloat" }, - MiniNotifyTitle = { link = "FloatTitle" }, - - MiniOperatorsExchangeFrom = { link = "IncSearch" }, - - MiniPickBorder = { link = "FloatBorder" }, - MiniPickBorderBusy = { link = "DiagnosticFloatingWarn" }, - MiniPickBorderText = { bg = groups.panel }, - MiniPickIconDirectory = { link = "Directory" }, - MiniPickIconFile = { link = "MiniPickNormal" }, - MiniPickHeader = { link = "DiagnosticFloatingHint" }, - MiniPickMatchCurrent = { link = "CursorLine" }, - MiniPickMatchMarked = { link = "Visual" }, - MiniPickMatchRanges = { fg = palette.foam }, - MiniPickNormal = { link = "NormalFloat" }, - MiniPickPreviewLine = { link = "CursorLine" }, - MiniPickPreviewRegion = { link = "IncSearch" }, - MiniPickPrompt = { bg = groups.panel, bold = styles.bold }, - - MiniStarterCurrent = { nocombine = true }, - MiniStarterFooter = { fg = palette.subtle }, - MiniStarterHeader = { link = "Title" }, - MiniStarterInactive = { link = "Comment" }, - MiniStarterItem = { link = "Normal" }, - MiniStarterItemBullet = { link = "Delimiter" }, - MiniStarterItemPrefix = { link = "WarningMsg" }, - MiniStarterSection = { fg = palette.rose }, - MiniStarterQuery = { link = "MoreMsg" }, - - MiniStatuslineDevinfo = { fg = palette.subtle, bg = palette.overlay }, - MiniStatuslineFileinfo = { link = "MiniStatuslineDevinfo" }, - MiniStatuslineFilename = { fg = palette.muted, bg = palette.surface }, - MiniStatuslineInactive = { link = "MiniStatuslineFilename" }, - MiniStatuslineModeCommand = { fg = palette.base, bg = palette.love, bold = styles.bold }, - MiniStatuslineModeInsert = { fg = palette.base, bg = palette.foam, bold = styles.bold }, - MiniStatuslineModeNormal = { fg = palette.base, bg = palette.rose, bold = styles.bold }, - MiniStatuslineModeOther = { fg = palette.base, bg = palette.rose, bold = styles.bold }, - MiniStatuslineModeReplace = { fg = palette.base, bg = palette.pine, bold = styles.bold }, - MiniStatuslineModeVisual = { fg = palette.base, bg = palette.iris, bold = styles.bold }, - - MiniSurround = { link = "IncSearch" }, - - MiniTablineCurrent = { fg = palette.text, bg = palette.overlay, bold = styles.bold }, - MiniTablineFill = { link = "TabLineFill" }, - MiniTablineHidden = { fg = palette.subtle, bg = groups.panel }, - MiniTablineModifiedCurrent = { fg = palette.overlay, bg = palette.text, bold = styles.bold }, - MiniTablineModifiedHidden = { fg = groups.panel, bg = palette.subtle }, - MiniTablineModifiedVisible = { fg = groups.panel, bg = palette.text }, - MiniTablineTabpagesection = { link = "Search" }, - MiniTablineVisible = { fg = palette.text, bg = groups.panel }, - - MiniTestEmphasis = { bold = styles.bold }, - MiniTestFail = { fg = palette.love, bold = styles.bold }, - MiniTestPass = { fg = palette.foam, bold = styles.bold }, - - MiniTrailspace = { bg = palette.love }, - - -- goolord/alpha-nvim - AlphaButtons = { fg = palette.foam }, - AlphaFooter = { fg = palette.gold }, - AlphaHeader = { fg = palette.pine }, - AlphaShortcut = { fg = palette.rose }, - - -- github/copilot.vim - CopilotSuggestion = { fg = palette.muted, italic = styles.italic }, - - -- nvim-treesitter/nvim-treesitter-context - TreesitterContext = { bg = palette.overlay }, - TreesitterContextLineNumber = { fg = palette.rose, bg = palette.overlay }, - - -- RRethy/vim-illuminate - IlluminatedWordRead = { link = "LspReferenceRead" }, - IlluminatedWordText = { link = "LspReferenceText" }, - IlluminatedWordWrite = { link = "LspReferenceWrite" }, - - -- HiPhish/rainbow-delimiters.nvim - RainbowDelimiterBlue = { fg = palette.pine }, - RainbowDelimiterCyan = { fg = palette.foam }, - RainbowDelimiterGreen = { fg = palette.leaf }, - RainbowDelimiterOrange = { fg = palette.rose }, - RainbowDelimiterRed = { fg = palette.love }, - RainbowDelimiterViolet = { fg = palette.iris }, - RainbowDelimiterYellow = { fg = palette.gold }, - - -- MeanderingProgrammer/render-markdown.nvim - RenderMarkdownBullet = { fg = palette.rose }, - RenderMarkdownChecked = { fg = palette.foam }, - RenderMarkdownCode = { bg = palette.overlay }, - RenderMarkdownCodeInline = { fg = palette.text, bg = palette.overlay }, - RenderMarkdownDash = { fg = palette.muted }, - RenderMarkdownH1Bg = { bg = groups.h1, blend = 20 }, - RenderMarkdownH2Bg = { bg = groups.h2, blend = 20 }, - RenderMarkdownH3Bg = { bg = groups.h3, blend = 20 }, - RenderMarkdownH4Bg = { bg = groups.h4, blend = 20 }, - RenderMarkdownH5Bg = { bg = groups.h5, blend = 20 }, - RenderMarkdownH6Bg = { bg = groups.h6, blend = 20 }, - RenderMarkdownQuote = { fg = palette.subtle }, - RenderMarkdownTableFill = { link = "Conceal" }, - RenderMarkdownTableHead = { fg = palette.subtle }, - RenderMarkdownTableRow = { fg = palette.subtle }, - RenderMarkdownUnchecked = { fg = palette.subtle }, - - -- MagicDuck/grug-far.nvim - GrugFarHelpHeader = { fg = palette.pine }, - GrugFarHelpHeaderKey = { fg = palette.gold }, - GrugFarHelpWinActionKey = { fg = palette.gold }, - GrugFarHelpWinActionPrefix = { fg = palette.foam }, - GrugFarHelpWinActionText = { fg = palette.pine }, - GrugFarHelpWinHeader = { link = "FloatTitle" }, - GrugFarInputLabel = { fg = palette.foam }, - GrugFarInputPlaceholder = { link = "Comment" }, - GrugFarResultsActionMessage = { fg = palette.foam }, - GrugFarResultsChangeIndicator = { fg = groups.git_change }, - GrugFarResultsRemoveIndicator = { fg = groups.git_delete }, - GrugFarResultsAddIndicator = { fg = groups.git_add }, - GrugFarResultsHeader = { fg = palette.pine }, - GrugFarResultsLineNo = { fg = palette.iris }, - GrugFarResultsLineColumn = { link = "GrugFarResultsLineNo" }, - GrugFarResultsMatch = { link = "CurSearch" }, - GrugFarResultsPath = { fg = palette.foam }, - GrugFarResultsStats = { fg = palette.iris }, - - -- yetone/avante.nvim - AvanteTitle = { fg = palette.highlight_high, bg = palette.rose }, - AvanteReversedTitle = { fg = palette.rose }, - AvanteSubtitle = { fg = palette.highlight_med, bg = palette.foam }, - AvanteReversedSubtitle = { fg = palette.foam }, - AvanteThirdTitle = { fg = palette.highlight_med, bg = palette.iris }, - AvanteReversedThirdTitle = { fg = palette.iris }, - AvantePromptInput = { fg = palette.text, bg = groups.panel }, - AvantePromptInputBorder = { fg = groups.border }, - - -- Saghen/blink.cmp - BlinkCmpDoc = { bg = palette.highlight_low }, - BlinkCmpDocSeparator = { bg = palette.highlight_low }, - BlinkCmpDocBorder = { fg = palette.highlight_high }, - BlinkCmpGhostText = { fg = palette.muted }, - - BlinkCmpLabel = { fg = palette.muted }, - BlinkCmpLabelDeprecated = { fg = palette.muted, strikethrough = true }, - BlinkCmpLabelMatch = { fg = palette.text, bold = styles.bold }, - - BlinkCmpDefault = { fg = palette.highlight_med }, - BlinkCmpKindText = { fg = palette.pine }, - BlinkCmpKindMethod = { fg = palette.foam }, - BlinkCmpKindFunction = { fg = palette.foam }, - BlinkCmpKindConstructor = { fg = palette.foam }, - BlinkCmpKindField = { fg = palette.pine }, - BlinkCmpKindVariable = { fg = palette.rose }, - BlinkCmpKindClass = { fg = palette.gold }, - BlinkCmpKindInterface = { fg = palette.gold }, - BlinkCmpKindModule = { fg = palette.foam }, - BlinkCmpKindProperty = { fg = palette.foam }, - BlinkCmpKindUnit = { fg = palette.pine }, - BlinkCmpKindValue = { fg = palette.love }, - BlinkCmpKindKeyword = { fg = palette.iris }, - BlinkCmpKindSnippet = { fg = palette.rose }, - BlinkCmpKindColor = { fg = palette.love }, - BlinkCmpKindFile = { fg = palette.foam }, - BlinkCmpKindReference = { fg = palette.love }, - BlinkCmpKindFolder = { fg = palette.foam }, - BlinkCmpKindEnum = { fg = palette.foam }, - BlinkCmpKindEnumMember = { fg = palette.foam }, - BlinkCmpKindConstant = { fg = palette.gold }, - BlinkCmpKindStruct = { fg = palette.foam }, - BlinkCmpKindEvent = { fg = palette.foam }, - BlinkCmpKindOperator = { fg = palette.foam }, - BlinkCmpKindTypeParameter = { fg = palette.iris }, - BlinkCmpKindCodeium = { fg = palette.foam }, - BlinkCmpKindCopilot = { fg = palette.foam }, - BlinkCmpKindSupermaven = { fg = palette.foam }, - BlinkCmpKindTabNine = { fg = palette.foam }, - - -- folke/snacks.nvim - SnacksIndent = { fg = palette.overlay }, - SnacksIndentChunk = { fg = palette.overlay }, - SnacksIndentBlank = { fg = palette.overlay }, - SnacksIndentScope = { fg = palette.foam }, - - SnacksPickerMatch = { fg = palette.rose, bold = styles.bold }, - - -- justinmk/vim-sneak - Sneak = { fg = palette.base, bg = palette.love }, - SneakCurrent = { link = "StatusLineTerm" }, - SneakScope = { link = "IncSearch" }, - - -- sindrets/diffview.nvim - DiffviewPrimary = { fg = palette.pine }, - DiffviewSecondary = { fg = palette.foam }, - DiffviewNormal = { fg = palette.text, bg = palette.surface }, - DiffviewWinSeparator = { fg = palette.text, bg = palette.surface }, - - DiffviewFilePanelTitle = { fg = palette.foam, bold = styles.bold }, - DiffviewFilePanelCounter = { fg = palette.rose }, - DiffviewFilePanelRootPath = { fg = palette.foam, bold = styles.bold }, - DiffviewFilePanelFileName = { fg = palette.text }, - DiffviewFilePanelSelected = { fg = palette.gold }, - DiffviewFilePanelPath = { link = "Comment" }, - - DiffviewFilePanelInsertions = { fg = groups.git_add }, - DiffviewFilePanelDeletions = { fg = groups.git_delete }, - DiffviewFilePanelConflicts = { fg = groups.git_merge }, - DiffviewFolderName = { fg = palette.foam, bold = styles.bold }, - DiffviewFolderSign = { fg = palette.subtle }, - DiffviewHash = { fg = palette.rose }, - DiffviewReference = { fg = palette.foam, bold = styles.bold }, - DiffviewReflogSelector = { fg = palette.rose }, - DiffviewStatusAdded = { fg = groups.git_add }, - DiffviewStatusUntracked = { fg = groups.untracked }, - DiffviewStatusModified = { fg = groups.git_change }, - DiffviewStatusRenamed = { fg = groups.git_rename }, - DiffviewStatusCopied = { fg = groups.untracked }, - DiffviewStatusTypeChange = { fg = groups.git_change }, - DiffviewStatusUnmerged = { fg = groups.git_change }, - DiffviewStatusUnknown = { fg = groups.git_delete }, - DiffviewStatusDeleted = { fg = groups.git_delete }, - DiffviewStatusBroken = { fg = groups.git_delete }, - DiffviewStatusIgnored = { fg = groups.git_ignore }, - } - local transparency_highlights = { - DiagnosticVirtualTextError = { fg = groups.error }, - DiagnosticVirtualTextHint = { fg = groups.hint }, - DiagnosticVirtualTextInfo = { fg = groups.info }, - DiagnosticVirtualTextOk = { fg = groups.ok }, - DiagnosticVirtualTextWarn = { fg = groups.warn }, - - FloatBorder = { fg = palette.muted, bg = "NONE" }, - FloatTitle = { fg = palette.foam, bg = "NONE", bold = styles.bold }, - Folded = { fg = palette.text, bg = "NONE" }, - NormalFloat = { bg = "NONE" }, - Normal = { fg = palette.text, bg = "NONE" }, - NormalNC = { fg = palette.text, bg = config.options.dim_inactive_windows and palette._nc or "NONE" }, - Pmenu = { fg = palette.subtle, bg = "NONE" }, - PmenuKind = { fg = palette.foam, bg = "NONE" }, - SignColumn = { fg = palette.text, bg = "NONE" }, - StatusLine = { fg = palette.subtle, bg = "NONE" }, - StatusLineNC = { fg = palette.muted, bg = "NONE" }, - TabLine = { bg = "NONE", fg = palette.subtle }, - TabLineFill = { bg = "NONE" }, - TabLineSel = { fg = palette.text, bg = "NONE", bold = styles.bold }, - - -- ["@markup.raw"] = { bg = "none" }, - ["@markup.raw.markdown_inline"] = { fg = palette.gold }, - -- ["@markup.raw.block"] = { bg = "none" }, - - TelescopeNormal = { fg = palette.subtle, bg = "NONE" }, - TelescopePromptNormal = { fg = palette.text, bg = "NONE" }, - TelescopeSelection = { fg = palette.text, bg = "NONE", bold = styles.bold }, - TelescopeSelectionCaret = { fg = palette.rose }, - - TroubleNormal = { bg = "NONE" }, - - WhichKeyFloat = { bg = "NONE" }, - WhichKeyNormal = { bg = "NONE" }, - - IblIndent = { fg = palette.overlay, bg = "NONE" }, - IblScope = { fg = palette.foam, bg = "NONE" }, - IblWhitespace = { fg = palette.overlay, bg = "NONE" }, - - TreesitterContext = { bg = "NONE" }, - TreesitterContextLineNumber = { fg = palette.rose, bg = "NONE" }, - - MiniFilesTitleFocused = { fg = palette.rose, bg = "NONE", bold = styles.bold }, - - MiniPickPrompt = { bg = "NONE", bold = styles.bold }, - MiniPickBorderText = { bg = "NONE" }, - } - - if config.options.enable.legacy_highlights then - for group, highlight in pairs(legacy_highlights) do - highlights[group] = highlight - end - end - for group, highlight in pairs(default_highlights) do - highlights[group] = highlight - end - if styles.transparency then - for group, highlight in pairs(transparency_highlights) do - highlights[group] = highlight - end - end - - -- Reconcile highlights with config - if config.options.highlight_groups ~= nil and next(config.options.highlight_groups) ~= nil then - for group, highlight in pairs(config.options.highlight_groups) do - local existing = highlights[group] or {} - -- Traverse link due to - -- "If link is used in combination with other attributes; only the link will take effect" - -- see: https://neovim.io/doc/user/api.html#nvim_set_hl() - while existing.link ~= nil do - existing = highlights[existing.link] or {} - end - local parsed = vim.tbl_extend("force", {}, highlight) - - if highlight.fg ~= nil then - parsed.fg = utilities.parse_color(highlight.fg) or highlight.fg - end - if highlight.bg ~= nil then - parsed.bg = utilities.parse_color(highlight.bg) or highlight.bg - end - if highlight.sp ~= nil then - parsed.sp = utilities.parse_color(highlight.sp) or highlight.sp - end - - if (highlight.inherit == nil or highlight.inherit) and existing ~= nil then - parsed.inherit = nil - highlights[group] = vim.tbl_extend("force", existing, parsed) - else - parsed.inherit = nil - highlights[group] = parsed - end - end - end - - for group, highlight in pairs(highlights) do - if config.options.before_highlight ~= nil then - config.options.before_highlight(group, highlight, palette) - end - - if highlight.blend ~= nil and (highlight.blend >= 0 and highlight.blend <= 100) and highlight.bg ~= nil then - highlight.bg = utilities.blend(highlight.bg, highlight.blend_on or palette.base, highlight.blend / 100) - end - - highlight.blend = nil - highlight.blend_on = nil - - if highlight._nvim_blend ~= nil then - highlight.blend = highlight._nvim_blend - end - - vim.api.nvim_set_hl(0, group, highlight) - end - - --- Terminal - if config.options.enable.terminal then - vim.g.terminal_color_0 = palette.overlay -- black - vim.g.terminal_color_8 = palette.subtle -- bright black - vim.g.terminal_color_1 = palette.love -- red - vim.g.terminal_color_9 = palette.love -- bright red - vim.g.terminal_color_2 = palette.pine -- green - vim.g.terminal_color_10 = palette.pine -- bright green - vim.g.terminal_color_3 = palette.gold -- yellow - vim.g.terminal_color_11 = palette.gold -- bright yellow - vim.g.terminal_color_4 = palette.foam -- blue - vim.g.terminal_color_12 = palette.foam -- bright blue - vim.g.terminal_color_5 = palette.iris -- magenta - vim.g.terminal_color_13 = palette.iris -- bright magenta - vim.g.terminal_color_6 = palette.rose -- cyan - vim.g.terminal_color_14 = palette.rose -- bright cyan - vim.g.terminal_color_7 = palette.text -- white - vim.g.terminal_color_15 = palette.text -- bright white - - -- Support StatusLineTerm & StatusLineTermNC from vim - vim.cmd([[ - augroup rose-pine - autocmd! - autocmd TermOpen * if &buftype=='terminal' - \|setlocal winhighlight=StatusLine:StatusLineTerm,StatusLineNC:StatusLineTermNC - \|else|setlocal winhighlight=|endif - autocmd ColorSchemePre * autocmd! rose-pine - augroup END - ]]) - end -end - ----@param variant Variant | nil -function M.colorscheme(variant) - config.extend_options({ variant = variant }) - 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" + vim.g.colors_name = 'rose-pine' - if variant == "dawn" then - vim.o.background = "light" - elseif variant == "main" or variant == "moon" then - vim.o.background = "dark" - end - - set_highlights() + require('rose-pine.theme')._load(config.options) end ----@param options Options -function M.setup(options) - config.extend_options(options or {}) -end +M.setup = config.setup return M diff --git a/lua/rose-pine/config.lua b/lua/rose-pine/config.lua index bbc9967..156bb7e 100644 --- a/lua/rose-pine/config.lua +++ b/lua/rose-pine/config.lua @@ -1,176 +1,104 @@ ----@alias Variant "main" | "moon" | "dawn" ----@alias Palette { base: string, surface: string, overlay: string, muted: string, subtle: string, text: string, love: string, gold: string, rose: string, pine: string, foam: string, iris: string } ----@alias PaletteColor "base" | "surface" | "overlay" | "muted" | "subtle" | "text" | "love" | "gold" | "rose" | "pine" | "foam" | "iris" | "highlight_low" | "highlight_med" | "highlight_high" ----@alias Highlight { link: string, inherit: boolean } | { fg: string, bg: string, sp: string, bold: boolean, italic: boolean, undercurl: boolean, underline: boolean, underdouble: boolean, underdotted: boolean, underdashed: boolean, strikethrough: boolean, inherit: boolean } +local M = {} -local config = {} +---@class Groups +---@field background string +---@field background_nc string +---@field panel string +---@field panel_nc string +---@field border string +---@field comment string +---@field link string +---@field punctuation string +---@field error string +---@field hint string +---@field info string +---@field warn string +---@field git_add string +---@field git_change string +---@field git_delete string +---@field git_dirty string +---@field git_ignore string +---@field git_merge string +---@field git_rename string +---@field git_stage string +---@field git_text string +---@field headings Headings|string ----@class Options -config.options = { - ---Set the desired variant: "auto" will follow the vim background, - ---defaulting to `dark_variant` or "main" for dark and "dawn" for light. - ---@type "auto" | Variant - variant = "auto", +---@class Headings +---@field h1 string +---@field h2 string +---@field h3 string +---@field h4 string +---@field h5 string +---@field h6 string - ---Set the desired dark variant when `options.variant` is set to "auto". - ---@type Variant - dark_variant = "main", - - ---Differentiate between active and inactive windows and panels. - dim_inactive_windows = false, - - ---Extend background behind borders. Appearance differs based on which - ---border characters you are using. - extend_background_behind_borders = true, - - enable = { - legacy_highlights = true, - migrations = true, - terminal = true, - }, - - styles = { - bold = true, - italic = true, - transparency = false, - }, - - ---@type table> - palette = {}, - - ---@type table - groups = { - border = "muted", - link = "iris", - panel = "surface", - - error = "love", - hint = "iris", - info = "foam", - ok = "leaf", - warn = "gold", - note = "pine", - todo = "rose", - - git_add = "foam", - git_change = "rose", - git_delete = "love", - git_dirty = "rose", - git_ignore = "muted", - git_merge = "iris", - git_rename = "pine", - git_stage = "iris", - git_text = "rose", - git_untracked = "subtle", - - ---@type string | PaletteColor - h1 = "iris", - h2 = "foam", - h3 = "rose", - h4 = "gold", - h5 = "pine", - h6 = "leaf", - - ---@deprecated Replaced by `options.highlight_groups["Normal"]` - -- background = "base", - ---@deprecated Replaced by `options.highlight_groups["Comment"]` - -- comment = "subtle", - ---@deprecated Replaced by `options.highlight_groups["@punctuation"]` - -- punctuation = "muted", - ---@deprecated Expects a table with values h1...h6 - -- headings = "text", - }, - - ---@type table +---@class Config +---@field variant 'auto'|'main'|'moon'|'dawn' +---@field dark_variant 'main'|'moon'|'dawn' +---@field bold_vert_split boolean +---@field dim_nc_background boolean +---@field disable_background boolean +---@field disable_float_background boolean +---@field disable_italics boolean +---@field groups Groups +---@field highlight_groups table +local defaults = { + variant = 'auto', + dark_variant = 'main', + bold_vert_split = false, + dim_nc_background = false, + disable_background = false, + disable_float_background = false, + disable_italics = false, highlight_groups = {}, - ---Called before each highlight group, before setting the highlight. - ---@param group string - ---@param highlight Highlight - ---@param palette Palette - ---@diagnostic disable-next-line: unused-local - before_highlight = function(group, highlight, palette) end, - - ---@deprecated Replaced by `options.dim_inactive_windows` - -- dim_nc_background = false, - ---@deprecated Replaced by `options.enable.transparency` - -- disable_background = false, - ---@deprecated Replaced by `options.highlight_groups["NormalFloat"]` - -- disable_float_background = false, - ---@deprecated Replaced by `options.styles.italic` - -- disable_italics = false, - ---@deprecated Replaced by `options.highlight_groups` - -- bold_vert_split = false + groups = { + background = 'base', + background_nc = '_experimental_nc', + panel = 'surface', + panel_nc = 'base', + border = 'highlight_med', + comment = 'muted', + link = 'iris', + punctuation = 'muted', + error = 'love', + hint = 'iris', + info = 'foam', + warn = 'gold', + git_add = 'foam', + git_change = 'rose', + git_delete = 'love', + git_dirty = 'rose', + git_ignore = 'muted', + git_merge = 'iris', + git_rename = 'pine', + git_stage = 'iris', + git_text = 'rose', + headings = { + h1 = 'iris', + h2 = 'foam', + h3 = 'rose', + h4 = 'gold', + h5 = 'pine', + h6 = 'foam', + }, + }, } -local function migrate(options) - if options.bold_vert_split then - local border = options.groups.border or "muted" - options.highlight_groups["VertSplit"] = { fg = border, bg = border } - options.highlight_groups["WinSeparator"] = { fg = border, bg = border } - end +---@type Config +M.options = {} - if options.disable_background then - options.highlight_groups["Normal"] = { bg = "NONE" } - end - - if options.disable_float_background then - options.highlight_groups["NormalFloat"] = { bg = "NONE" } - end - - options.dim_inactive_windows = options.dim_nc_background or options.dim_inactive_windows - - if options.groups.background ~= nil then - options.highlight_groups["Normal"] = { bg = options.groups.background } - end - - if options.groups.comment ~= nil then - options.highlight_groups["Comment"] = { fg = options.groups.comment } - end - - if options.groups.punctuation ~= nil then - options.highlight_groups["@punctuation"] = { fg = options.groups.punctuation } - end - - options.styles.transparency = (options.disable_background and options.disable_float_background) - or options.styles.transparency - - -- These never actually existed, but may be set intuitively by the user - -- because of `disable_italics` existing. - options.styles.bold = not (options.disable_bold or options.disable_bolds) and options.styles.bold or false - - -- Similar to bold options, `disable_italic` never existed but could be a - -- common typo of the actual `disable_italics`. - options.styles.italic = not (options.disable_italic or options.disable_italics) and options.styles.italic or false - - -- Set h1 through h6 to the same color if only one is specified - if type(options.groups.headings) == "string" then - options.groups.h1 = options.groups.headings - options.groups.h2 = options.groups.headings - options.groups.h3 = options.groups.headings - options.groups.h4 = options.groups.headings - options.groups.h5 = options.groups.headings - options.groups.h6 = options.groups.headings - elseif options.groups.headings == "table" then - options.groups.h1 = options.groups.headings.h1 or options.groups.h1 - options.groups.h2 = options.groups.headings.h2 or options.groups.h2 - options.groups.h3 = options.groups.headings.h3 or options.groups.h3 - options.groups.h4 = options.groups.headings.h4 or options.groups.h4 - options.groups.h5 = options.groups.headings.h5 or options.groups.h5 - options.groups.h6 = options.groups.headings.h6 or options.groups.h6 - end - options.groups.headings = nil - - return options +---@param options Config|nil +function M.setup(options) + M.options = vim.tbl_deep_extend('force', {}, defaults, options or {}) end ----@param options Options | nil -function config.extend_options(options) - config.options = vim.tbl_deep_extend("force", config.options, options or {}) - - if config.options.enable.migrations then - config.options = migrate(config.options) - end +---@param options Config|nil +function M.extend(options) + M.options = + vim.tbl_deep_extend('force', {}, M.options or defaults, options or {}) end -return config +M.setup() + +return M diff --git a/lua/rose-pine/palette.lua b/lua/rose-pine/palette.lua index cfefd65..42eb9bc 100644 --- a/lua/rose-pine/palette.lua +++ b/lua/rose-pine/palette.lua @@ -1,78 +1,80 @@ -local options = require("rose-pine.config").options +local options = require('rose-pine.config').options + local variants = { main = { - _nc = "#16141f", - base = "#191724", - surface = "#1f1d2e", - overlay = "#26233a", - muted = "#6e6a86", - subtle = "#908caa", - text = "#e0def4", - love = "#eb6f92", - gold = "#f6c177", - rose = "#ebbcba", - pine = "#31748f", - foam = "#9ccfd8", - iris = "#c4a7e7", - leaf = "#95b1ac", - highlight_low = "#21202e", - highlight_med = "#403d52", - highlight_high = "#524f67", - none = "NONE", + ---@deprecated for backwards compatibility + _experimental_nc = '#16141f', + nc = '#16141f', + base = '#191724', + surface = '#1f1d2e', + overlay = '#26233a', + muted = '#6e6a86', + subtle = '#908caa', + text = '#e0def4', + love = '#eb6f92', + gold = '#f6c177', + rose = '#ebbcba', + pine = '#31748f', + foam = '#9ccfd8', + iris = '#c4a7e7', + highlight_low = '#21202e', + highlight_med = '#403d52', + highlight_high = '#524f67', + none = 'NONE', }, moon = { - _nc = "#1f1d30", - base = "#232136", - surface = "#2a273f", - overlay = "#393552", - muted = "#6e6a86", - subtle = "#908caa", - text = "#e0def4", - love = "#eb6f92", - gold = "#f6c177", - rose = "#ea9a97", - pine = "#3e8fb0", - foam = "#9ccfd8", - iris = "#c4a7e7", - leaf = "#95b1ac", - highlight_low = "#2a283e", - highlight_med = "#44415a", - highlight_high = "#56526e", - none = "NONE", + ---@deprecated for backwards compatibility + _experimental_nc = '#1f1d30', + nc = '#1f1d30', + base = '#232136', + surface = '#2a273f', + overlay = '#393552', + muted = '#6e6a86', + subtle = '#908caa', + text = '#e0def4', + love = '#eb6f92', + gold = '#f6c177', + rose = '#ea9a97', + pine = '#3e8fb0', + foam = '#9ccfd8', + iris = '#c4a7e7', + highlight_low = '#2a283e', + highlight_med = '#44415a', + highlight_high = '#56526e', + none = 'NONE', }, dawn = { - _nc = "#f8f0e7", - base = "#faf4ed", - surface = "#fffaf3", - overlay = "#f2e9e1", - muted = "#9893a5", - subtle = "#797593", - text = "#464261", - love = "#b4637a", - gold = "#ea9d34", - rose = "#d7827e", - pine = "#286983", - foam = "#56949f", - iris = "#907aa9", - leaf = "#6d8f89", - highlight_low = "#f4ede8", - highlight_med = "#dfdad9", - highlight_high = "#cecacd", - none = "NONE", + ---@deprecated for backwards compatibility + _experimental_nc = '#f8f0e7', + nc = '#f8f0e7', + base = '#faf4ed', + surface = '#fffaf3', + overlay = '#f2e9e1', + muted = '#9893a5', + subtle = '#797593', + text = '#575279', + love = '#b4637a', + gold = '#ea9d34', + rose = '#d7827e', + pine = '#286983', + foam = '#56949f', + iris = '#907aa9', + highlight_low = '#f4ede8', + highlight_med = '#dfdad9', + highlight_high = '#cecacd', + none = 'NONE', }, } -if options.palette ~= nil and next(options.palette) then - -- handle variant specific overrides - for variant_name, override_palette in pairs(options.palette) do - if variants[variant_name] then - variants[variant_name] = vim.tbl_extend("force", variants[variant_name], override_palette or {}) - end - end +if options.variant == 'main' then + return variants.main +end +if options.variant == 'moon' then + return variants.moon +end +if options.variant == 'dawn' then + return variants.dawn end -if variants[options.variant] ~= nil then - return variants[options.variant] -end - -return vim.o.background == "light" and variants.dawn or variants[options.dark_variant or "main"] +return vim.o.background == 'light' and variants.dawn + or variants[options.dark_variant or 'main'] diff --git a/lua/rose-pine/plugins/bufferline.lua b/lua/rose-pine/plugins/bufferline.lua index 7a96026..db722cf 100644 --- a/lua/rose-pine/plugins/bufferline.lua +++ b/lua/rose-pine/plugins/bufferline.lua @@ -2,43 +2,43 @@ --- https://github.com/akinsho/bufferline.nvim --- --- @usage ---- local highlights = require("rose-pine.plugins.bufferline") ---- require("bufferline").setup({ highlights = highlights }) +--- 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 = { - -- fg = "", - -- bg = "", + -- fg = '', + -- bg = '', -- }, -- background = { - -- fg = "", - -- bg = "", + -- fg = '', + -- bg = '', -- }, -- tab = { - -- fg = "", - -- bg = "", + -- fg = '', + -- bg = '', + -- }, + -- tab_selected = { + -- fg = '', + -- bg = '', -- }, - tab_selected = { - fg = p.text, - bg = p.overlay, - }, -- tab_close = { - -- fg = "", - -- bg = "", + -- fg = '', + -- bg = '', -- }, -- close_button = { - -- fg = "", - -- bg = "", + -- fg = '', + -- bg = '', -- }, -- close_button_visible = { - -- fg = "", - -- bg = "", + -- fg = '', + -- bg = '', -- }, -- close_button_selected = { - -- fg = "", - -- bg = "", + -- fg = '', + -- bg = '', -- }, buffer_visible = { fg = p.subtle, @@ -51,172 +51,172 @@ return { italic = true, }, -- diagnostic = { - -- fg = "", - -- bg = "", + -- fg = '', + -- bg = '', -- }, -- diagnostic_visible = { - -- fg = "", - -- bg = "", + -- fg = '', + -- bg = '', -- }, -- diagnostic_selected = { - -- fg = "", - -- bg = "", + -- fg = '', + -- bg = '', -- bold = true, -- italic = true, -- }, -- info = { - -- fg = "", - -- sp = "", - -- bg = "", + -- fg = '', + -- sp = '', + -- bg = '', -- }, -- info_visible = { - -- fg = "", - -- bg = "", + -- fg = '', + -- bg = '', -- }, -- info_selected = { - -- fg = "", - -- bg = "", + -- fg = '', + -- bg = '', -- bold = true, -- italic = true, - -- sp = "", + -- sp = '', -- }, -- info_diagnostic = { - -- fg = "", - -- sp = "", - -- bg = "", + -- fg = '', + -- sp = '', + -- bg = '', -- }, -- info_diagnostic_visible = { - -- fg = "", - -- bg = "", + -- fg = '', + -- bg = '', -- }, -- info_diagnostic_selected = { - -- fg = "", - -- bg = "", + -- fg = '', + -- bg = '', -- bold = true, -- italic = true, - -- sp = "", + -- sp = '', -- }, -- warning = { - -- fg = "", - -- sp = "", - -- bg = "", + -- fg = '', + -- sp = '', + -- bg = '', -- }, -- warning_visible = { - -- fg = "", - -- bg = "", + -- fg = '', + -- bg = '', -- }, -- warning_selected = { - -- fg = "", - -- bg = "", + -- fg = '', + -- bg = '', -- bold = true, -- italic = true, - -- sp = "", + -- sp = '', -- }, -- warning_diagnostic = { - -- fg = "", - -- sp = "", - -- bg = "", + -- fg = '', + -- sp = '', + -- bg = '', -- }, -- warning_diagnostic_visible = { - -- fg = "", - -- bg = "", + -- fg = '', + -- bg = '', -- }, -- warning_diagnostic_selected = { - -- fg = "", - -- bg = "", + -- fg = '', + -- bg = '', -- bold = true, -- italic = true, -- sp = warning_diagnostic_fg, -- }, -- error = { - -- fg = "", - -- bg = "", - -- sp = "", + -- fg = '', + -- bg = '', + -- sp = '', -- }, -- error_visible = { - -- fg = "", - -- bg = "", + -- fg = '', + -- bg = '', -- }, -- error_selected = { - -- fg = "", - -- bg = "", + -- fg = '', + -- bg = '', -- bold = true, -- italic = true, - -- sp = "", + -- sp = '', -- }, -- error_diagnostic = { - -- fg = "", - -- bg = "", - -- sp = "", + -- fg = '', + -- bg = '', + -- sp = '', -- }, -- error_diagnostic_visible = { - -- fg = "", - -- bg = "", + -- fg = '', + -- bg = '', -- }, -- error_diagnostic_selected = { - -- fg = "", - -- bg = "", + -- fg = '', + -- bg = '', -- bold = true, -- italic = true, - -- sp = "", + -- sp = '', -- }, -- modified = { - -- fg = "", - -- bg = "", + -- fg = '', + -- bg = '', -- }, -- modified_visible = { - -- fg = "", - -- bg = "", + -- fg = '', + -- bg = '', -- }, -- modified_selected = { - -- fg = "", - -- bg = "", + -- fg = '', + -- bg = '', -- }, -- duplicate_selected = { - -- fg = "", + -- fg = '', -- italic = true, - -- bg = "", + -- bg = '', -- }, -- duplicate_visible = { - -- fg = "", + -- fg = '', -- italic = true, - -- bg = "", + -- bg = '', -- }, -- duplicate = { - -- fg = "", + -- fg = '', -- italic = true, - -- bg = "", + -- bg = '', -- }, -- separator_selected = { - -- fg = "", - -- bg = "", + -- fg = '', + -- bg = '', -- }, -- separator_visible = { - -- fg = "", - -- bg = "", + -- fg = '', + -- bg = '', -- }, -- separator = { - -- fg = "", - -- bg = "", + -- fg = '', + -- bg = '', -- }, -- indicator_selected = { - -- fg = "", - -- bg = "", + -- fg = '', + -- bg = '', -- }, -- pick_selected = { - -- fg = "", - -- bg = "", + -- fg = '', + -- bg = '', -- italic = true, -- }, -- pick_visible = { - -- fg = "", - -- bg = "", + -- fg = '', + -- bg = '', -- bold = true, -- italic = true, -- }, -- pick = { - -- fg = "", - -- bg = "", + -- fg = '', + -- bg = '', -- bold = true, -- italic = true, -- }, diff --git a/lua/rose-pine/plugins/galaxyline.lua b/lua/rose-pine/plugins/galaxyline.lua index 05d9b28..348559a 100644 --- a/lua/rose-pine/plugins/galaxyline.lua +++ b/lua/rose-pine/plugins/galaxyline.lua @@ -2,9 +2,9 @@ --- https://github.com/NTBBloodbath/galaxyline.nvim --- --- @usage ---- local highlights = require("rose-pine.plugins.galaxyline") +--- local highlights = require('rose-pine.plugins.galaxyline') -local p = require("rose-pine.palette") +local p = require('rose-pine.palette') return { bg = p.surface, diff --git a/lua/rose-pine/plugins/markid.lua b/lua/rose-pine/plugins/markid.lua index 3d6d8f9..9279adb 100644 --- a/lua/rose-pine/plugins/markid.lua +++ b/lua/rose-pine/plugins/markid.lua @@ -2,9 +2,9 @@ --- https://github.com/David-Kunz/markid --- --- @usage ---- local highlights = require("rose-pine.plugins.markid") +--- 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 } diff --git a/lua/rose-pine/plugins/obsidian.lua b/lua/rose-pine/plugins/obsidian.lua deleted file mode 100644 index 43cc3b3..0000000 --- a/lua/rose-pine/plugins/obsidian.lua +++ /dev/null @@ -1,14 +0,0 @@ ---- Rosé Pine for Obsidian(epwalsh) ---- https://github.com/epwalsh/obsidian.nvim ---- ---- @usage ---- local highlights = require("rose-pine.plugins.obsidian") ---- require("obsidian").setup({ ui = {hl_groups = highlights} }) - -local p = require("rose-pine.palette") - -return { - ObsidianBullet = { fg = p.muted }, - ObsidianRefText = { underline = true, fg = p.iris }, - ObsidianDone = { bold = true, fg = p.foam } -} diff --git a/lua/rose-pine/plugins/toggleterm.lua b/lua/rose-pine/plugins/toggleterm.lua index 7f808eb..38924f9 100644 --- a/lua/rose-pine/plugins/toggleterm.lua +++ b/lua/rose-pine/plugins/toggleterm.lua @@ -2,14 +2,14 @@ --- https://github.com/akinsho/toggleterm.nvim --- --- @usage ---- local highlights = require("rose-pine.plugins.toggleterm") ---- require("toggleterm").setup({ highlights = highlights }) +--- 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 new file mode 100644 index 0000000..b342bb1 --- /dev/null +++ b/lua/rose-pine/theme.lua @@ -0,0 +1,574 @@ +local M = {} + +---@param options Config +function M._load(options) + local h = require('rose-pine.util').highlight + local p = require('rose-pine.palette') + + 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 + + h('ColorColumn', { bg = p.overlay }) + h('Conceal', { bg = p.none }) + h('CurSearch', { link = 'IncSearch' }) + h('Cursor', { fg = p.text, bg = p.highlight_high }) + h('CursorColumn', { bg = p.highlight_low }) + -- CursorIM = {}, + h('CursorLine', { bg = p.highlight_low }) + h('CursorLineNr', { fg = p.text }) + h('DarkenedPanel', { bg = maybe.surface }) + h('DarkenedStatusline', { bg = maybe.surface }) + h('DiffAdd', { bg = groups.git_add, blend = 20 }) + + h('DiffChange', { bg = p.overlay }) + h('DiffDelete', { bg = groups.git_delete, blend = 20 }) + h('DiffText', { bg = groups.git_text, blend = 20 }) + h('diffAdded', { link = 'DiffAdd' }) + h('diffChanged', { link = 'DiffChange' }) + h('diffRemoved', { link = 'DiffDelete' }) + h('Directory', { fg = p.foam, bg = p.none }) + -- EndOfBuffer = {}, + h('ErrorMsg', { fg = p.love, bold = true }) + h('FloatBorder', { fg = groups.border, bg = maybe.surface }) + h('FloatTitle', { fg = p.muted }) + h('FoldColumn', { fg = p.muted }) + h('Folded', { fg = p.text, bg = maybe.surface }) + h('IncSearch', { fg = groups.background, bg = p.rose }) + h('LineNr', { fg = p.muted }) + h('MatchParen', { fg = p.text, bg = p.highlight_med }) + h('ModeMsg', { fg = p.subtle }) + h('MoreMsg', { fg = p.iris }) + h('NonText', { fg = p.muted }) + h('Normal', { fg = p.text, bg = maybe.base }) + h('NormalFloat', { fg = p.text, bg = maybe.surface }) + h('NormalNC', { fg = p.text, bg = maybe.dim_nc_background }) + h('NvimInternalError', { fg = '#ffffff', bg = p.love }) + h('Pmenu', { fg = p.subtle, bg = maybe.surface }) + h('PmenuSbar', { bg = p.highlight_low }) + h('PmenuSel', { fg = p.text, bg = p.overlay }) + h('PmenuThumb', { bg = p.highlight_med }) + h('Question', { fg = p.gold }) + -- QuickFixLine = {}, + -- RedrawDebugNormal = {} + h('RedrawDebugClear', { fg = '#ffffff', bg = p.gold }) + h('RedrawDebugComposed', { fg = '#ffffff', bg = p.pine }) + h('RedrawDebugRecompose', { fg = '#ffffff', bg = p.love }) + h('Search', { bg = p.highlight_med }) + h('SpecialKey', { fg = p.foam }) + h('SpellBad', { sp = p.subtle, undercurl = true }) + h('SpellCap', { sp = p.subtle, undercurl = true }) + h('SpellLocal', { sp = p.subtle, undercurl = true }) + h('SpellRare', { sp = p.subtle, undercurl = true }) + h('SignColumn', { + fg = p.text, + bg = (options.dim_nc_background and p.none) or maybe.base, + }) + h('StatusLine', { fg = p.subtle, bg = groups.panel }) + h('StatusLineNC', { fg = p.muted, bg = groups.panel_nc }) + h('StatusLineTerm', { link = 'StatusLine' }) + h('StatusLineTermNC', { link = 'StatusLineNC' }) + h('TabLine', { fg = p.subtle, bg = groups.panel }) + h('TabLineFill', { bg = groups.panel }) + h('TabLineSel', { fg = p.text, bg = p.overlay }) + h('Title', { fg = p.text }) + h('VertSplit', { fg = groups.border, bg = maybe.bold_vert_split }) + h('Visual', { bg = p.highlight_med }) + -- VisualNOS = {}, + h('WarningMsg', { fg = p.gold }) + -- Whitespace = {}, + h('WildMenu', { link = 'IncSearch' }) + + h('Boolean', { fg = p.rose }) + h('Character', { fg = p.gold }) + h('Comment', { fg = groups.comment, italic = maybe.italic }) + h('Conditional', { fg = p.pine }) + h('Constant', { fg = p.gold }) + h('Debug', { fg = p.rose }) + h('Define', { fg = p.iris }) + h('Delimiter', { fg = p.subtle }) + h('Error', { fg = p.love }) + h('Exception', { fg = p.pine }) + h('Float', { fg = p.gold }) + h('Function', { fg = p.rose }) + h('Identifier', { fg = p.rose }) + -- Ignore = {}, + h('Include', { fg = p.iris }) + h('Keyword', { fg = p.pine }) + h('Label', { fg = p.foam }) + h('Macro', { fg = p.iris }) + h('Number', { fg = p.gold }) + h('Operator', { fg = p.subtle }) + h('PreCondit', { fg = p.iris }) + h('PreProc', { fg = p.iris }) + h('Repeat', { fg = p.pine }) + h('Special', { fg = p.rose }) + h('SpecialChar', { fg = p.rose }) + h('SpecialComment', { fg = p.iris }) + h('Statement', { fg = p.pine }) + h('StorageClass', { fg = p.foam }) + h('String', { fg = p.gold }) + h('Structure', { fg = p.foam }) + h('Tag', { fg = p.rose }) + h('Todo', { fg = p.iris }) + h('Type', { fg = p.foam }) + h('Typedef', { link = 'Type' }) + h('Underlined', { underline = true }) + + h('htmlArg', { fg = p.iris }) + h('htmlBold', { bold = true }) + h('htmlEndTag', { fg = p.subtle }) + h('htmlH1', { fg = groups.headings.h1, bold = true }) + h('htmlH2', { fg = groups.headings.h2, bold = true }) + h('htmlH3', { fg = groups.headings.h3, bold = true }) + h('htmlH4', { fg = groups.headings.h4, bold = true }) + h('htmlH5', { fg = groups.headings.h5, bold = true }) + h('htmlItalic', { italic = maybe.italic }) + h('htmlLink', { fg = groups.link }) + h('htmlTag', { fg = p.subtle }) + h('htmlTagN', { fg = p.text }) + h('htmlTagName', { fg = p.foam }) + + h('markdownDelimiter', { fg = p.subtle }) + h('markdownH1', { fg = groups.headings.h1, bold = true }) + h('markdownH1Delimiter', { link = 'markdownH1' }) + h('markdownH2', { fg = groups.headings.h2, bold = true }) + h('markdownH2Delimiter', { link = 'markdownH2' }) + h('markdownH3', { fg = groups.headings.h3, bold = true }) + h('markdownH3Delimiter', { link = 'markdownH3' }) + h('markdownH4', { fg = groups.headings.h4, bold = true }) + h('markdownH4Delimiter', { link = 'markdownH4' }) + h('markdownH5', { fg = groups.headings.h5, bold = true }) + h('markdownH5Delimiter', { link = 'markdownH5' }) + h('markdownH6', { fg = groups.headings.h6, bold = true }) + h('markdownH6Delimiter', { link = 'markdownH6' }) + h( + 'markdownLinkText', + { fg = groups.link, sp = groups.link, underline = true } + ) + h('markdownUrl', { link = 'markdownLinkText' }) + + h('mkdCode', { fg = p.foam, italic = maybe.italic }) + h('mkdCodeDelimiter', { fg = p.rose }) + h('mkdCodeEnd', { fg = p.foam }) + h('mkdCodeStart', { fg = p.foam }) + h('mkdFootnotes', { fg = p.foam }) + h('mkdID', { fg = p.foam, underline = true }) + h('mkdInlineURL', { fg = groups.link, underline = true }) + h('mkdLink', { link = 'mkdInlineURL' }) + h('mkdLinkDef', { link = 'mkdInlineURL' }) + h('mkdListItemLine', { fg = p.text }) + h('mkdRule', { fg = p.subtle }) + h('mkdURL', { link = 'mkdInlineURL' }) + + h('DiagnosticError', { fg = groups.error }) + h('DiagnosticHint', { fg = groups.hint }) + h('DiagnosticInfo', { fg = groups.info }) + h('DiagnosticWarn', { fg = groups.warn }) + h('DiagnosticDefaultError', { fg = groups.error }) + h('DiagnosticDefaultHint', { fg = groups.hint }) + h('DiagnosticDefaultInfo', { fg = groups.info }) + h('DiagnosticDefaultWarn', { fg = groups.warn }) + h('DiagnosticFloatingError', { fg = groups.error }) + h('DiagnosticFloatingHint', { fg = groups.hint }) + h('DiagnosticFloatingInfo', { fg = groups.info }) + h('DiagnosticFloatingWarn', { fg = groups.warn }) + h('DiagnosticSignError', { fg = groups.error }) + h('DiagnosticSignHint', { fg = groups.hint }) + h('DiagnosticSignInfo', { fg = groups.info }) + h('DiagnosticSignWarn', { fg = groups.warn }) + h('DiagnosticStatusLineError', { fg = groups.error, bg = groups.panel }) + h('DiagnosticStatusLineHint', { fg = groups.hint, bg = groups.panel }) + h('DiagnosticStatusLineInfo', { fg = groups.info, bg = groups.panel }) + h('DiagnosticStatusLineWarn', { fg = groups.warn, bg = groups.panel }) + h('DiagnosticUnderlineError', { sp = groups.error, undercurl = true }) + h('DiagnosticUnderlineHint', { sp = groups.hint, undercurl = true }) + h('DiagnosticUnderlineInfo', { sp = groups.info, undercurl = true }) + h('DiagnosticUnderlineWarn', { sp = groups.warn, undercurl = true }) + h('DiagnosticVirtualTextError', { fg = groups.error }) + h('DiagnosticVirtualTextHint', { fg = groups.hint }) + h('DiagnosticVirtualTextInfo', { fg = groups.info }) + h('DiagnosticVirtualTextWarn', { fg = groups.warn }) + + -- healthcheck + h('healthError', { fg = groups.error }) + h('healthSuccess', { fg = groups.info }) + h('healthWarning', { fg = groups.warn }) + + -- Treesitter + h('@boolean', { link = 'Boolean' }) + h('@character', { link = 'Character' }) + h('@character.special', { link = '@character' }) + h('@class', { fg = p.foam }) + h('@comment', { link = 'Comment' }) + h('@conditional', { link = 'Conditional' }) + h('@constant', { link = 'Constant' }) + h('@constant.builtin', { fg = p.love }) + h('@constant.macro', { link = '@constant' }) + h('@constructor', { fg = p.foam }) + h('@field', { fg = p.foam }) + h('@function', { link = 'Function' }) + h('@function.builtin', { fg = p.love }) + h('@function.macro', { link = '@function' }) + h('@include', { link = 'Include' }) + h('@interface', { fg = p.foam }) + h('@keyword', { link = 'Keyword' }) + h('@keyword.operator', { fg = p.subtle }) + h('@label', { link = 'Label' }) + h('@macro', { link = 'Macro' }) + h('@method', { fg = p.iris }) + h('@number', { link = 'Number' }) + h('@operator', { link = 'Operator' }) + h('@parameter', { fg = p.iris, italic = maybe.italic }) + h('@preproc', { link = 'PreProc' }) + h('@property', { fg = p.foam, italic = maybe.italic }) + h('@punctuation', { fg = groups.punctuation }) + h('@punctuation.bracket', { link = '@punctuation' }) + h('@punctuation.delimiter', { link = '@punctuation' }) + h('@punctuation.special', { link = '@punctuation' }) + h('@regexp', { link = 'String' }) + h('@repeat', { link = 'Repeat' }) + h('@storageclass', { link = 'StorageClass' }) + h('@string', { link = 'String' }) + h('@string.escape', { fg = p.pine }) + h('@string.special', { link = '@string' }) + h('@symbol', { link = 'Identifier' }) + h('@tag', { link = 'Tag' }) + h('@tag.attribute', { fg = p.iris }) + h('@tag.delimiter', { fg = p.subtle }) + h('@text', { fg = p.text }) + h('@text.strong', { bold = true }) + h('@text.emphasis', { italic = true }) + h('@text.underline', { underline = true }) + h('@text.strike', { strikethrough = true }) + h('@text.math', { link = 'Special' }) + h('@text.environment', { link = 'Macro' }) + h('@text.environment.name', { link = 'Type' }) + h('@text.title', { link = 'Title' }) + h('@text.uri', { fg = groups.link }) + h('@text.note', { link = 'SpecialComment' }) + h('@text.warning', { fg = groups.warn }) + h('@text.danger', { fg = groups.error }) + h('@todo', { link = 'Todo' }) + h('@type', { link = 'Type' }) + h('@variable', { fg = p.text, italic = maybe.italic }) + h('@variable.builtin', { fg = p.love }) + h('@namespace', { link = '@include' }) + + -- LSP Semantic Token Groups + h('@lsp.type.enum', { link = '@type' }) + h('@lsp.type.keyword', { link = '@keyword' }) + h('@lsp.type.interface', { link = '@interface' }) + h('@lsp.type.namespace', { link = '@namespace' }) + h('@lsp.type.parameter', { link = '@parameter' }) + h('@lsp.type.property', { link = '@property' }) + h('@lsp.type.variable', {}) -- use treesitter styles for regular variables + h('@lsp.typemod.function.defaultLibrary', { link = 'Special' }) + h('@lsp.typemod.variable.defaultLibrary', { link = '@variable.builtin' }) + + -- vim.lsp.buf.document_highlight() + h('LspReferenceText', { bg = p.highlight_med }) + h('LspReferenceRead', { bg = p.highlight_med }) + h('LspReferenceWrite', { bg = p.highlight_med }) + + -- lsp-highlight-codelens + h('LspCodeLens', { fg = p.subtle }) -- virtual text of code len + h('LspCodeLensSeparator', { fg = p.highlight_high }) -- separator between two or more code len + + -- romgrk/barbar.nvim + h('BufferCurrent', { fg = p.text, bg = p.overlay }) + h('BufferCurrentIndex', { fg = p.text, bg = p.overlay }) + h('BufferCurrentMod', { fg = p.foam, bg = p.overlay }) + h('BufferCurrentSign', { fg = p.subtle, bg = p.overlay }) + h('BufferCurrentTarget', { fg = p.gold, bg = p.overlay }) + h('BufferInactive', { fg = p.subtle }) + h('BufferInactiveIndex', { fg = p.subtle }) + h('BufferInactiveMod', { fg = p.foam }) + h('BufferInactiveSign', { fg = p.muted }) + h('BufferInactiveTarget', { fg = p.gold }) + h('BufferTabpageFill', { fg = groups.background, bg = groups.background }) + h('BufferVisible', { fg = p.subtle }) + h('BufferVisibleIndex', { fg = p.subtle }) + h('BufferVisibleMod', { fg = p.foam }) + h('BufferVisibleSign', { fg = p.muted }) + h('BufferVisibleTarget', { fg = p.gold }) + + -- lewis6991/gitsigns.nvim + h('GitSignsAdd', { fg = groups.git_add }) + h('GitSignsChange', { fg = groups.git_change }) + h('GitSignsDelete', { fg = groups.git_delete }) + h('SignAdd', { link = 'GitSignsAdd' }) + h('SignChange', { link = 'GitSignsChange' }) + h('SignDelete', { link = 'GitSignsDelete' }) + + -- mvllow/modes.nvim + h('ModesCopy', { bg = p.gold }) + h('ModesDelete', { bg = p.love }) + h('ModesInsert', { bg = p.foam }) + h('ModesVisual', { bg = p.iris }) + + -- kyazdani42/nvim-tree.lua + h('NvimTreeEmptyFolderName', { fg = p.muted }) + h('NvimTreeFileDeleted', { fg = p.love }) + h('NvimTreeFileDirty', { fg = p.rose }) + h('NvimTreeFileMerge', { fg = p.iris }) + h('NvimTreeFileNew', { fg = p.foam }) + h('NvimTreeFileRenamed', { fg = p.pine }) + h('NvimTreeFileStaged', { fg = p.iris }) + h('NvimTreeFolderIcon', { fg = p.subtle }) + h('NvimTreeFolderName', { fg = p.foam }) + h('NvimTreeGitDeleted', { fg = groups.git_delete }) + h('NvimTreeGitDirty', { fg = groups.git_dirty }) + h('NvimTreeGitIgnored', { fg = groups.git_ignore }) + h('NvimTreeGitMerge', { fg = groups.git_merge }) + h('NvimTreeGitNew', { fg = groups.git_add }) + h('NvimTreeGitRenamed', { fg = groups.git_rename }) + h('NvimTreeGitStaged', { fg = groups.git_stage }) + h('NvimTreeImageFile', { fg = p.text }) + h('NvimTreeNormal', { fg = p.text }) + h('NvimTreeOpenedFile', { fg = p.text, bg = p.highlight_med }) + h('NvimTreeOpenedFolderName', { link = 'NvimTreeFolderName' }) + h('NvimTreeRootFolder', { fg = p.iris }) + h('NvimTreeSpecialFile', { link = 'NvimTreeNormal' }) + h('NvimTreeWindowPicker', { fg = p.love, bg = p.love, blend = 10 }) + + -- nvim-neo-tree/neo-tree.nvim + h('NeoTreeTitleBar', { fg = p.surface, bg = p.pine }) + + -- folke/which-key.nvim + h('WhichKey', { fg = p.iris }) + h('WhichKeyGroup', { fg = p.foam }) + h('WhichKeySeparator', { fg = p.subtle }) + h('WhichKeyDesc', { fg = p.gold }) + h('WhichKeyFloat', { bg = maybe.surface }) + h('WhichKeyValue', { fg = p.rose }) + + -- luka-reineke/indent-blankline.nvim + h('IndentBlanklineChar', { fg = p.muted }) + h('IndentBlanklineSpaceChar', { fg = p.muted }) + h('IndentBlanklineSpaceCharBlankline', { fg = p.muted }) + + -- hrsh7th/nvim-cmp + h('CmpItemAbbr', { fg = p.subtle }) + h('CmpItemAbbrDeprecated', { fg = p.subtle, strikethrough = true }) + h('CmpItemAbbrMatch', { fg = p.text, bold = true }) + h('CmpItemAbbrMatchFuzzy', { fg = p.text, bold = true }) + h('CmpItemKind', { fg = p.subtle }) + h('CmpItemKindClass', { fg = p.pine }) + h('CmpItemKindFunction', { fg = p.rose }) + h('CmpItemKindInterface', { fg = p.foam }) + h('CmpItemKindMethod', { fg = p.iris }) + h('CmpItemKindSnippet', { fg = p.gold }) + h('CmpItemKindVariable', { fg = p.text }) + + -- TimUntersberger/neogit + h('NeogitDiffAddHighlight', { fg = p.foam, bg = p.highlight_med }) + h('NeogitDiffContextHighlight', { bg = p.highlight_low }) + h('NeogitDiffDeleteHighlight', { fg = p.love, bg = p.highlight_med }) + h('NeogitHunkHeader', { bg = p.highlight_low }) + h('NeogitHunkHeaderHighlight', { bg = p.highlight_low }) + + -- vimwiki/vimwiki + h('VimwikiHR', { fg = p.subtle }) + h('VimwikiHeader1', { fg = groups.headings.h1, bold = true }) + h('VimwikiHeader2', { fg = groups.headings.h2, bold = true }) + h('VimwikiHeader3', { fg = groups.headings.h3, bold = true }) + h('VimwikiHeader4', { fg = groups.headings.h4, bold = true }) + h('VimwikiHeader5', { fg = groups.headings.h5, bold = true }) + h('VimwikiHeader6', { fg = groups.headings.h6, bold = true }) + h('VimwikiHeaderChar', { fg = p.pine }) + h('VimwikiLink', { fg = groups.link, underline = true }) + h('VimwikiList', { fg = p.iris }) + h('VimwikiNoExistsLink', { fg = p.love }) + + -- nvim-neorg/neorg + h('NeorgHeading1Prefix', { fg = groups.headings.h1, bold = true }) + h('NeorgHeading1Title', { link = 'NeorgHeading1Prefix' }) + h('NeorgHeading2Prefix', { fg = groups.headings.h2, bold = true }) + h('NeorgHeading2Title', { link = 'NeorgHeading2Prefix' }) + h('NeorgHeading3Prefix', { fg = groups.headings.h3, bold = true }) + h('NeorgHeading3Title', { link = 'NeorgHeading3Prefix' }) + h('NeorgHeading4Prefix', { fg = groups.headings.h4, bold = true }) + h('NeorgHeading4Title', { link = 'NeorgHeading4Prefix' }) + h('NeorgHeading5Prefix', { fg = groups.headings.h5, bold = true }) + h('NeorgHeading5Title', { link = 'NeorgHeading5Prefix' }) + h('NeorgHeading6Prefix', { fg = groups.headings.h6, bold = true }) + h('NeorgHeading6Title', { link = 'NeorgHeading6Prefix' }) + h('NeorgMarkerTitle', { fg = p.text, bold = true }) + + -- tami5/lspsaga.nvim (fork of glepnir/lspsaga.nvim) + h('DefinitionCount', { fg = p.rose }) + h('DefinitionIcon', { fg = p.rose }) + h('DefintionPreviewTitle', { fg = p.rose, bold = true }) + h('LspFloatWinBorder', { fg = groups.border }) + h('LspFloatWinNormal', { bg = maybe.surface }) + h('LspSagaAutoPreview', { fg = p.subtle }) + h('LspSagaCodeActionBorder', { fg = groups.border }) + h('LspSagaCodeActionContent', { fg = p.foam }) + h('LspSagaCodeActionTitle', { fg = p.gold, bold = true }) + h('LspSagaCodeActionTruncateLine', { link = 'LspSagaCodeActionBorder' }) + h('LspSagaDefPreviewBorder', { fg = groups.border }) + h('LspSagaDiagnosticBorder', { fg = groups.border }) + h('LspSagaDiagnosticHeader', { fg = p.gold, bold = true }) + h('LspSagaDiagnosticTruncateLine', { link = 'LspSagaDiagnosticBorder' }) + h('LspSagaDocTruncateLine', { link = 'LspSagaHoverBorder' }) + h('LspSagaFinderSelection', { fg = p.gold }) + h('LspSagaHoverBorder', { fg = groups.border }) + h('LspSagaLspFinderBorder', { fg = groups.border }) + h('LspSagaRenameBorder', { fg = p.pine }) + h('LspSagaRenamePromptPrefix', { fg = p.love }) + h('LspSagaShTruncateLine', { link = 'LspSagaSignatureHelpBorder' }) + h('LspSagaSignatureHelpBorder', { fg = p.pine }) + h('ReferencesCount', { fg = p.rose }) + h('ReferencesIcon', { fg = p.rose }) + h('SagaShadow', { bg = p.overlay }) + h('TargetWord', { fg = p.iris }) + + -- ray-x/lsp_signature.nvim + h('LspSignatureActiveParameter', { bg = p.overlay }) + + -- rlane/pounce.nvim + h('PounceAccept', { fg = p.love, bg = p.highlight_high }) + h('PounceAcceptBest', { fg = p.base, bg = p.gold }) + h('PounceGap', { link = 'Search' }) + h('PounceMatch', { link = 'Search' }) + + local float_background = options.dim_nc_background + and (options.disable_float_background and groups.panel_nc or groups.panel) + or maybe.surface + + -- ggandor/leap.nvim + h('LeapMatch', { link = 'MatchParen' }) + h('LeapLabelPrimary', { link = 'IncSearch' }) + h('LeapLabelSecondary', { fg = p.base, bg = p.pine }) + + -- nvim-telescope/telescope.nvim + h('TelescopeBorder', { fg = groups.border, bg = float_background }) + h('TelescopeMatching', { fg = p.rose }) + h('TelescopeNormal', { fg = p.subtle, bg = float_background }) + h('TelescopePromptNormal', { fg = p.text, bg = float_background }) + h('TelescopePromptPrefix', { fg = p.subtle }) + h('TelescopeSelection', { fg = p.text, bg = p.overlay }) + h('TelescopeSelectionCaret', { fg = p.rose, bg = p.overlay }) + h('TelescopeTitle', { fg = p.subtle }) + + -- rcarriga/nvim-notify + h('NotifyINFOBorder', { fg = p.foam }) + h('NotifyINFOTitle', { link = 'NotifyINFOBorder' }) + h('NotifyINFOIcon', { link = 'NotifyINFOBorder' }) + h('NotifyWARNBorder', { fg = p.gold }) + h('NotifyWARNTitle', { link = 'NotifyWARNBorder' }) + h('NotifyWARNIcon', { link = 'NotifyWARNBorder' }) + h('NotifyDEBUGBorder', { fg = p.muted }) + h('NotifyDEBUGTitle', { link = 'NotifyDEBUGBorder' }) + h('NotifyDEBUGIcon', { link = 'NotifyDEBUGBorder' }) + h('NotifyTRACEBorder', { fg = p.iris }) + h('NotifyTRACETitle', { link = 'NotifyTRACEBorder' }) + h('NotifyTRACEIcon', { link = 'NotifyTRACEBorder' }) + h('NotifyERRORBorder', { fg = p.love }) + h('NotifyERRORTitle', { link = 'NotifyERRORBorder' }) + h('NotifyERRORIcon', { link = 'NotifyERRORBorder' }) + + -- rcarriga/nvim-dap-ui + h('DapUIVariable', { link = 'Normal' }) + h('DapUIValue', { link = 'Normal' }) + h('DapUIFrameName', { link = 'Normal' }) + h('DapUIThread', { fg = p.gold }) + h('DapUIWatchesValue', { link = 'DapUIThread' }) + h('DapUIBreakpointsInfo', { link = 'DapUIThread' }) + h('DapUIBreakpointsCurrentLine', { fg = p.gold, bold = true }) + h('DapUIWatchesEmpty', { fg = p.love }) + h('DapUIWatchesError', { link = 'DapUIWatchesEmpty' }) + h('DapUIBreakpointsDisabledLine', { fg = p.muted }) + h('DapUISource', { fg = p.iris }) + h('DapUIBreakpointsPath', { fg = p.foam }) + h('DapUIScope', { link = 'DapUIBreakpointsPath' }) + h('DapUILineNumber', { link = 'DapUIBreakpointsPath' }) + h('DapUIBreakpointsLine', { link = 'DapUIBreakpointsPath' }) + h('DapUIFloatBorder', { link = 'DapUIBreakpointsPath' }) + h('DapUIStoppedThread', { link = 'DapUIBreakpointsPath' }) + h('DapUIDecoration', { link = 'DapUIBreakpointsPath' }) + h('DapUIModifiedValue', { fg = p.foam, bold = true }) + + -- glepnir/dashboard-nvim + h('DashboardShortcut', { fg = p.love }) + h('DashboardHeader', { fg = p.pine }) + h('DashboardCenter', { fg = p.gold }) + h('DashboardFooter', { fg = p.iris }) + + -- SmiteshP/nvim-navic + h('NavicIconsFile', { fg = p.base }) + h('NavicIconsModule', { fg = p.rose }) + h('NavicIconsNamespace', { fg = p.base }) + h('NavicIconsPackage', { fg = p.base }) + h('NavicIconsClass', { fg = p.foam }) + h('NavicIconsMethod', { fg = p.iris }) + h('NavicIconsProperty', { fg = p.foam }) + h('NavicIconsField', { fg = p.foam }) + h('NavicIconsConstructor', { fg = p.gold }) + h('NavicIconsEnum', { fg = p.gold }) + h('NavicIconsInterface', { fg = p.foam }) + h('NavicIconsFunction', { fg = p.pine }) + h('NavicIconsVariable', { fg = p.text }) + h('NavicIconsConstant', { fg = p.gold }) + h('NavicIconsString', { fg = p.gold }) + h('NavicIconsNumber', { fg = p.gold }) + h('NavicIconsBoolean', { fg = p.rose }) + h('NavicIconsArray', { fg = p.gold }) + h('NavicIconsObject', { fg = p.gold }) + h('NavicIconsKey', { fg = p.iris }) + h('NavicIconsKeyword', { fg = p.pine }) + h('NavicIconsNull', { fg = p.love }) + h('NavicIconsEnumMember', { fg = p.foam }) + h('NavicIconsStruct', { fg = p.foam }) + h('NavicIconsEvent', { fg = p.gold }) + h('NavicIconsOperator', { fg = p.subtle }) + h('NavicIconsTypeParameter', { fg = p.foam }) + h('NavicText', { fg = p.subtle }) + h('NavicSeparator', { fg = p.subtle }) + + -- folke/noice.nvim + h('NoiceCursor', { fg = p.highlight_high, bg = p.text }) + + -- echasnovski/mini.indentscope + h('MiniIndentscopeSymbol', { fg = p.highlight_med }) + h('MiniIndentscopeSymbolOff', { fg = p.highlight_med }) + + -- goolord/alpha-nvim + h('AlphaHeader', { fg = p.pine }) + h('AlphaButtons', { fg = p.foam }) + h('AlphaShortcut', { fg = p.rose }) + h('AlphaFooter', { fg = p.gold }) + + 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.pine -- green + vim.g.terminal_color_10 = p.pine -- 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 + + -- Set user highlights + for group, color in pairs(options.highlight_groups) do + h(group, color) + end +end + +return M diff --git a/lua/rose-pine/util.lua b/lua/rose-pine/util.lua new file mode 100644 index 0000000..f8b84f9 --- /dev/null +++ b/lua/rose-pine/util.lua @@ -0,0 +1,71 @@ +local util = {} + +local function byte(value, offset) + return bit.band(bit.rshift(value, offset), 0xFF) +end + +local function rgb(color) + color = vim.api.nvim_get_color_by_name(color) + + if color == -1 then + color = vim.opt.background:get() == 'dark' and 000 or 255255255 + end + + return { byte(color, 16), byte(color, 8), byte(color, 0) } +end + +local function parse_color(color) + if color == nil then + return print('invalid color') + end + + color = color:lower() + + if not color:find('#') and color ~= 'none' then + color = require('rose-pine.palette')[color] + or vim.api.nvim_get_color_by_name(color) + end + + return color +end + +---@param fg string foreground color +---@param bg string background color +---@param alpha number number between 0 (background) and 1 (foreground) +util.blend = function(fg, bg, alpha) + local fg_rgb = rgb(parse_color(fg)) + local bg_rgb = rgb(parse_color(bg)) + + 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 +util.highlight = function(group, color) + 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 '' + + 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 + + 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/lua/rose-pine/utilities.lua b/lua/rose-pine/utilities.lua deleted file mode 100644 index 32a8575..0000000 --- a/lua/rose-pine/utilities.lua +++ /dev/null @@ -1,65 +0,0 @@ -local utilities = {} - ----@param color string -local function color_to_rgb(color) - local function byte(value, offset) - return bit.band(bit.rshift(value, offset), 0xFF) - end - - local new_color = vim.api.nvim_get_color_by_name(color) - if new_color == -1 then - new_color = vim.opt.background:get() == "dark" and 000 or 255255255 - end - - return { byte(new_color, 16), byte(new_color, 8), byte(new_color, 0) } -end - -local color_cache = {} - ----@param color string Palette key or hex value -function utilities.parse_color(color) - if color_cache[color] then - return color_cache[color] - end - - if color == nil then - print("Invalid color: " .. color) - return nil - end - - color = color:lower() - - if not color:find("#") and color ~= "NONE" then - color = require("rose-pine.palette")[color] or vim.api.nvim_get_color_by_name(color) - end - - color_cache[color] = color - return color -end - -local blend_cache = {} - ----@param fg string Foreground color ----@param bg string Background color ----@param alpha number Between 0 (background) and 1 (foreground) -function utilities.blend(fg, bg, alpha) - local cache_key = fg .. bg .. alpha - if blend_cache[cache_key] then - return blend_cache[cache_key] - end - - local fg_rgb = color_to_rgb(fg) - local bg_rgb = color_to_rgb(bg) - - 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 - - local result = string.format("#%02X%02X%02X", blend_channel(1), blend_channel(2), blend_channel(3)) - - blend_cache[cache_key] = result - return result -end - -return utilities diff --git a/readme.md b/readme.md index 6ef48bc..b1a4c84 100644 --- a/readme.md +++ b/readme.md @@ -11,36 +11,27 @@

-## Getting started +## Usage -Install `rose-pine/neovim` using your favourite package manager: - -### [pam.nvim](https://github.com/mvllow/pam.nvim) +> With [lazy.nvim](https://github.com/folke/lazy.nvim) ```lua -{ source = "rose-pine/neovim", as = "rose-pine" } +require("lazy").setup({ + { 'rose-pine/neovim', name = 'rose-pine' } +}) + +vim.cmd('colorscheme rose-pine') ``` -### [lazy.nvim](https://lazy.folke.io/installation) - -**Structured Setup** +> With [packer.nvim](https://github.com/wbthomason/packer.nvim) ```lua --- lua/plugins/rose-pine.lua -return { - "rose-pine/neovim", - name = "rose-pine", - config = function() - vim.cmd("colorscheme rose-pine") - end -} +use({ 'rose-pine/neovim', as = 'rose-pine' }) + +vim.cmd('colorscheme rose-pine') ``` -**Single file** - -```lua -{ "rose-pine/neovim", name = "rose-pine" } -``` +_Supported plugins are listed in the [wiki](https://github.com/rose-pine/neovim/wiki#supported-plugins)_ ## Gallery @@ -58,104 +49,69 @@ return { ## Options -> [!IMPORTANT] -> Configure options _before_ setting colorscheme. +> Options should be set **before** colorscheme -Rosé Pine has three variants: main, moon, and dawn. By default, `vim.o.background` is followed, using dawn when light and `dark_variant` when dark. - -Colour values accept named colours from the [Rosé Pine palette](https://rosepinetheme.com/palette/ingredients/), e.g. "foam", or valid hex, e.g. "#fa8072". +Variant respects `vim.o.background`, using dawn when light and `dark_variant` when dark ```lua -require("rose-pine").setup({ - variant = "auto", -- auto, main, moon, or dawn - dark_variant = "main", -- main, moon, or dawn - dim_inactive_windows = false, - extend_background_behind_borders = true, +require('rose-pine').setup({ + --- @usage 'auto'|'main'|'moon'|'dawn' + variant = 'auto', + --- @usage 'main'|'moon'|'dawn' + dark_variant = 'main', + bold_vert_split = false, + dim_nc_background = false, + disable_background = false, + disable_float_background = false, + disable_italics = false, - enable = { - terminal = true, - legacy_highlights = true, -- Improve compatibility for previous versions of Neovim - migrations = true, -- Handle deprecated options automatically - }, + --- @usage string hex value or named color from rosepinetheme.com/palette + groups = { + background = 'base', + background_nc = '_experimental_nc', + panel = 'surface', + panel_nc = 'base', + border = 'highlight_med', + comment = 'muted', + link = 'iris', + punctuation = 'subtle', - styles = { - bold = true, - italic = true, - transparency = false, - }, + error = 'love', + hint = 'iris', + info = 'foam', + warn = 'gold', - groups = { - border = "muted", - link = "iris", - panel = "surface", + headings = { + h1 = 'iris', + h2 = 'foam', + h3 = 'rose', + h4 = 'gold', + h5 = 'pine', + h6 = 'foam', + } + -- or set all headings at once + -- headings = 'subtle' + }, - error = "love", - hint = "iris", - info = "foam", - note = "pine", - todo = "rose", - warn = "gold", + -- Change specific vim highlight groups + -- https://github.com/rose-pine/neovim/wiki/Recipes + highlight_groups = { + ColorColumn = { bg = 'rose' }, - git_add = "foam", - git_change = "rose", - git_delete = "love", - git_dirty = "rose", - git_ignore = "muted", - git_merge = "iris", - git_rename = "pine", - git_stage = "iris", - git_text = "rose", - git_untracked = "subtle", - - h1 = "iris", - h2 = "foam", - h3 = "rose", - h4 = "gold", - h5 = "pine", - h6 = "foam", - }, - - palette = { - -- Override the builtin palette per variant - -- moon = { - -- base = '#18191a', - -- overlay = '#363738', - -- }, - }, - - -- NOTE: Highlight groups are extended (merged) by default. Disable this - -- per group via `inherit = false` - highlight_groups = { - -- Comment = { fg = "foam" }, - -- StatusLine = { fg = "love", bg = "love", blend = 15 }, - -- VertSplit = { fg = "muted", bg = "muted" }, - -- Visual = { fg = "base", bg = "text", inherit = false }, - }, - - before_highlight = function(group, highlight, palette) - -- Disable all undercurls - -- if highlight.undercurl then - -- highlight.undercurl = false - -- end - -- - -- Change palette colour - -- if highlight.fg == palette.pine then - -- highlight.fg = palette.foam - -- end - end, + -- Blend colours against the "base" background + CursorLine = { bg = 'foam', blend = 10 }, + StatusLine = { fg = 'love', bg = 'love', blend = 10 }, + } }) -vim.cmd("colorscheme rose-pine") --- vim.cmd("colorscheme rose-pine-main") --- vim.cmd("colorscheme rose-pine-moon") --- vim.cmd("colorscheme rose-pine-dawn") +-- Set colorscheme after options +vim.cmd('colorscheme rose-pine') ``` -> [!NOTE] -> Visit the [wiki](https://github.com/rose-pine/neovim/wiki) for [plugin configurations](https://github.com/rose-pine/neovim/wiki/Plugin-configurations) and [recipes](https://github.com/rose-pine/neovim/wiki/Recipes). - ## Contributing -We welcome and appreciate contributions of any kind. Create an issue or start a discussion for any proposed changes. Pull requests are encouraged for supporting additional plugins or [treesitter improvements](https://github.com/nvim-treesitter/nvim-treesitter/blob/master/CONTRIBUTING.md#highlights). +We welcome and appreciate any help in creating a lovely experience for all. -Feel free to update the [wiki](https://github.com/rose-pine/neovim/wiki/) with any [recipes](https://github.com/rose-pine/neovim/wiki/Recipes). +- Get highlight groups under cursor via `:Inspect` in Neovim 0.9 or [nvim-treesitter/playground](https://github.com/nvim-treesitter/playground#show-treesitter-and-syntax-highlight-groups-under-the-cursor) +- [Adding new highlight groups](https://github.com/rose-pine/neovim/issues/6#issuecomment-962466323) +- [Palette reference by name](https://rosepinetheme.com/palette)