Merge canary (#114)

* feat!: use new highlight api

* feat: support custom highlight blending

Example:

```
{
	highlight_groups = {
		StatusLine = { bg = 'love', blend = 10 }
	}
}
```

* refactor: move config into separate file

* wip: update semantic tokens

* ci: add issue templates

Thanks to https://github.com/folke/lazy.nvim for the inspiration!

* ci: fix template formatting

* chore: update editorconfig

* fix: decouple more backgrounds from floats

* change `@tag.attribute` to iris

* add cursor highlights

Closes #121

* match link underline colour

* improve `dim_nc_background` behaviour

ref #123

* feat: expose each variant as individual theme

ref #98

* feat: update tokens

ref #107

* feat: distinguish between `CmpItemKind`'s
This commit is contained in:
not 2023-02-22 13:25:36 -06:00 committed by GitHub
commit 4eac261d57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 634 additions and 616 deletions

View file

@ -65,8 +65,6 @@ body:
local plugins = { local plugins = {
"rose-pine/neovim", "rose-pine/neovim",
name = "rose-pine", name = "rose-pine",
lazy = false,
priority = 1000,
config = function() config = function()
-- Add relevant Rosé Pine config below -- Add relevant Rosé Pine config below
require("rose-pine").setup({}) require("rose-pine").setup({})

View file

@ -0,0 +1 @@
require('rose-pine').colorscheme({ variant = 'dawn' })

View file

@ -0,0 +1 @@
require('rose-pine').colorscheme({ variant = 'main' })

View file

@ -0,0 +1 @@
require('rose-pine').colorscheme({ variant = 'moon' })

View file

@ -1,70 +1,12 @@
local util = require('rose-pine.util') local config = require('rose-pine.config')
local M = {} local M = {}
local config = { ---@param options Config|nil
bold_vert_split = false, function M.colorscheme(options)
dark_variant = 'main', if options then
dim_nc_background = false, config.extend(options)
disable_background = false,
disable_float_background = false,
disable_italics = false,
groups = {
background = 'base',
panel = 'surface',
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',
},
},
highlight_groups = {},
}
function M.setup(opts)
opts = opts or {}
vim.g.rose_pine_variant = opts.dark_variant or 'main'
if opts.groups and type(opts.groups.headings) == 'string' then
opts.groups.headings = {
h1 = opts.groups.headings,
h2 = opts.groups.headings,
h3 = opts.groups.headings,
h4 = opts.groups.headings,
h5 = opts.groups.headings,
h6 = opts.groups.headings,
}
end end
config.user_variant = opts.dark_variant or nil
config = vim.tbl_deep_extend('force', config, opts)
end
function M.colorscheme()
if vim.g.colors_name then if vim.g.colors_name then
vim.cmd('hi clear') vim.cmd('hi clear')
end end
@ -72,20 +14,9 @@ function M.colorscheme()
vim.opt.termguicolors = true vim.opt.termguicolors = true
vim.g.colors_name = 'rose-pine' vim.g.colors_name = 'rose-pine'
local theme = require('rose-pine.theme').get(config) require('rose-pine.theme')._load(config.options)
-- Set theme highlights
for group, color in pairs(theme) do
-- Skip highlight group if user overrides
if config.highlight_groups[group] == nil then
util.highlight(group, color)
end
end
-- Set user highlights
for group, color in pairs(config.highlight_groups) do
util.highlight(group, color)
end
end end
M.setup = config.setup
return M return M

100
lua/rose-pine/config.lua Normal file
View file

@ -0,0 +1,100 @@
local M = {}
---@class Groups
---@field background string
---@field panel 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 Headings
---@field h1 string
---@field h2 string
---@field h3 string
---@field h4 string
---@field h5 string
---@field h6 string
---@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<string, any>
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 = {},
groups = {
background = 'base',
panel = 'surface',
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',
},
},
}
---@type Config
M.options = {}
---@param options Config|nil
function M.setup(options)
M.options = vim.tbl_deep_extend('force', {}, defaults, options or {})
end
---@param options Config|nil
function M.extend(options)
M.options =
vim.tbl_deep_extend('force', {}, M.options or defaults, options or {})
end
M.setup()
return M

View file

@ -1,5 +1,8 @@
local options = require('rose-pine.config').options
local variants = { local variants = {
main = { main = {
nc = '#16141f',
base = '#191724', base = '#191724',
surface = '#1f1d2e', surface = '#1f1d2e',
overlay = '#26233a', overlay = '#26233a',
@ -18,6 +21,7 @@ local variants = {
none = 'NONE', none = 'NONE',
}, },
moon = { moon = {
nc = '#1f1d30',
base = '#232136', base = '#232136',
surface = '#2a273f', surface = '#2a273f',
overlay = '#393552', overlay = '#393552',
@ -36,6 +40,7 @@ local variants = {
none = 'NONE', none = 'NONE',
}, },
dawn = { dawn = {
nc = '#f8f0e7',
base = '#faf4ed', base = '#faf4ed',
surface = '#fffaf3', surface = '#fffaf3',
overlay = '#f2e9e1', overlay = '#f2e9e1',
@ -55,12 +60,15 @@ local variants = {
}, },
} }
local palette = {} if options.variant == 'main' then
return variants.main
if vim.o.background == 'light' then end
palette = variants.dawn if options.variant == 'moon' then
else return variants.moon
palette = variants[(vim.g.rose_pine_variant == 'moon' and 'moon') or 'main'] end
if options.variant == 'dawn' then
return variants.dawn
end end
return palette return vim.o.background == 'light' and variants.dawn
or variants[options.dark_variant or 'main']

View file

@ -1,523 +1,488 @@
local blend = require('rose-pine.util').blend
local M = {} local M = {}
function M.get(config) ---@param options Config
function M._load(options)
local h = require('rose-pine.util').highlight
local p = require('rose-pine.palette') local p = require('rose-pine.palette')
local theme = {} local groups = options.groups or {}
local groups = config.groups or {} local maybe = {
local styles = { base = (options.disable_background and p.none) or p.base,
italic = (config.disable_italics and p.none) or 'italic', surface = (options.disable_float_background and p.none) or p.surface,
vert_split = (config.bold_vert_split and groups.border) or p.none, italic = not options.disable_italics,
background = (config.disable_background and p.none)
or groups.background,
float_background = (config.disable_float_background and p.none)
or groups.panel,
} }
styles.nc_background = (config.dim_nc_background and groups.panel) maybe.bold_vert_split = (options.bold_vert_split and groups.border)
or styles.background or p.none
maybe.dim_nc_background = (options.dim_nc_background and p.nc)
theme = { h('ColorColumn', { bg = p.overlay })
ColorColumn = { bg = p.overlay }, h('Conceal', { bg = p.none })
Conceal = { bg = p.none }, h('CurSearch', { link = 'IncSearch' })
CurSearch = { link = 'IncSearch' }, h('Cursor', { fg = p.text, bg = p.highlight_high })
-- Cursor = {}, h('CursorColumn', { bg = p.highlight_low })
CursorColumn = { bg = p.highlight_low }, -- CursorIM = {},
-- CursorIM = {}, h('CursorLine', { bg = p.highlight_low })
CursorLine = { bg = p.highlight_low }, h('CursorLineNr', { fg = p.text })
CursorLineNr = { fg = p.text }, h('DarkenedPanel', { bg = maybe.surface })
DarkenedPanel = { bg = groups.panel }, h('DarkenedStatusline', { bg = maybe.surface })
DarkenedStatusline = { bg = groups.panel }, h('DiffAdd', { bg = groups.git_add, blend = 20 })
DiffAdd = { bg = blend(groups.git_add, groups.background, 0.2) },
DiffChange = { bg = p.overlay },
DiffDelete = { bg = blend(groups.git_delete, groups.background, 0.2) },
DiffText = { bg = blend(groups.git_text, groups.background, 0.2) },
diffAdded = { link = 'DiffAdd' },
diffChanged = { link = 'DiffChange' },
diffRemoved = { link = 'DiffDelete' },
Directory = { fg = p.foam, bg = p.none },
-- EndOfBuffer = {},
ErrorMsg = { fg = p.love, style = 'bold' },
FloatBorder = { fg = groups.border },
FloatTitle = { fg = p.muted },
FoldColumn = { fg = p.muted },
Folded = { fg = p.text, bg = groups.panel },
IncSearch = { fg = p.base, bg = p.rose },
LineNr = { fg = p.muted },
MatchParen = { fg = p.text, bg = p.highlight_med },
ModeMsg = { fg = p.subtle },
MoreMsg = { fg = p.iris },
NonText = { fg = p.muted },
Normal = { fg = p.text, bg = styles.background },
NormalFloat = { fg = p.text, bg = styles.float_background },
NormalNC = { fg = p.text, bg = styles.nc_background },
NvimInternalError = { fg = '#ffffff', bg = p.love },
Pmenu = { fg = p.subtle, bg = styles.float_background },
PmenuSbar = { bg = p.highlight_low },
PmenuSel = { fg = p.text, bg = p.overlay },
PmenuThumb = { bg = p.highlight_med },
Question = { fg = p.gold },
-- QuickFixLine = {},
-- RedrawDebugNormal = {}
RedrawDebugClear = { fg = '#ffffff', bg = p.gold },
RedrawDebugComposed = { fg = '#ffffff', bg = p.pine },
RedrawDebugRecompose = { fg = '#ffffff', bg = p.love },
Search = { bg = p.highlight_med },
SpecialKey = { fg = p.foam },
SpellBad = { sp = p.subtle, style = 'undercurl' },
SpellCap = { sp = p.subtle, style = 'undercurl' },
SpellLocal = { sp = p.subtle, style = 'undercurl' },
SpellRare = { sp = p.subtle, style = 'undercurl' },
SignColumn = { fg = p.text, bg = styles.background },
StatusLine = { fg = p.subtle, bg = p.surface },
StatusLineNC = { fg = p.muted, bg = styles.background },
StatusLineTerm = { link = 'StatusLine' },
StatusLineTermNC = { link = 'StatusLineNC' },
TabLine = { fg = p.subtle, bg = styles.float_background },
TabLineFill = { bg = styles.float_background },
TabLineSel = { fg = p.text, bg = p.overlay },
Title = { fg = p.text },
VertSplit = { fg = groups.border, bg = styles.vert_split },
Visual = { bg = p.highlight_med },
-- VisualNOS = {},
WarningMsg = { fg = p.gold },
-- Whitespace = {},
WildMenu = { link = 'IncSearch' },
Boolean = { fg = p.rose }, h('DiffChange', { bg = p.overlay })
Character = { fg = p.gold }, h('DiffDelete', { bg = groups.git_delete, blend = 20 })
Comment = { fg = groups.comment, style = styles.italic }, h('DiffText', { bg = groups.git_text, blend = 20 })
Conditional = { fg = p.pine }, h('diffAdded', { link = 'DiffAdd' })
Constant = { fg = p.gold }, h('diffChanged', { link = 'DiffChange' })
Debug = { fg = p.rose }, h('diffRemoved', { link = 'DiffDelete' })
Define = { fg = p.iris }, h('Directory', { fg = p.foam, bg = p.none })
Delimiter = { fg = p.subtle }, -- EndOfBuffer = {},
Error = { fg = p.love }, h('ErrorMsg', { fg = p.love, bold = true })
Exception = { fg = p.pine }, h('FloatBorder', { fg = groups.border })
Float = { fg = p.gold }, h('FloatTitle', { fg = p.muted })
Function = { fg = p.rose }, h('FoldColumn', { fg = p.muted })
Identifier = { fg = p.rose }, h('Folded', { fg = p.text, bg = maybe.surface })
-- Ignore = {}, h('IncSearch', { fg = p.base, bg = p.rose })
Include = { fg = p.iris }, h('LineNr', { fg = p.muted })
Keyword = { fg = p.pine }, h('MatchParen', { fg = p.text, bg = p.highlight_med })
Label = { fg = p.foam }, h('ModeMsg', { fg = p.subtle })
Macro = { fg = p.iris }, h('MoreMsg', { fg = p.iris })
Number = { fg = p.gold }, h('NonText', { fg = p.muted })
Operator = { fg = p.subtle }, h('Normal', { fg = p.text, bg = maybe.base })
PreCondit = { fg = p.iris }, h('NormalFloat', { fg = p.text, bg = maybe.surface })
PreProc = { fg = p.iris }, h('NormalNC', { fg = p.text, bg = maybe.dim_nc_background })
Repeat = { fg = p.pine }, h('NvimInternalError', { fg = '#ffffff', bg = p.love })
Special = { fg = p.rose }, h('Pmenu', { fg = p.subtle, bg = p.surface })
SpecialChar = { fg = p.rose }, h('PmenuSbar', { bg = p.highlight_low })
SpecialComment = { fg = p.iris }, h('PmenuSel', { fg = p.text, bg = p.overlay })
Statement = { fg = p.pine }, h('PmenuThumb', { bg = p.highlight_med })
StorageClass = { fg = p.foam }, h('Question', { fg = p.gold })
String = { fg = p.gold }, -- QuickFixLine = {},
Structure = { fg = p.foam }, -- RedrawDebugNormal = {}
Tag = { fg = p.rose }, h('RedrawDebugClear', { fg = '#ffffff', bg = p.gold })
Todo = { fg = p.iris }, h('RedrawDebugComposed', { fg = '#ffffff', bg = p.pine })
Type = { fg = p.foam }, h('RedrawDebugRecompose', { fg = '#ffffff', bg = p.love })
Typedef = { fg = p.foam }, h('Search', { bg = p.highlight_med })
Underlined = { style = 'underline' }, 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 = p.surface })
h('StatusLineNC', { fg = p.muted, bg = maybe.base })
h('StatusLineTerm', { link = 'StatusLine' })
h('StatusLineTermNC', { link = 'StatusLineNC' })
h('TabLine', { fg = p.subtle, bg = p.surface })
h('TabLineFill', { bg = p.surface })
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' })
htmlArg = { fg = p.iris }, h('Boolean', { fg = p.rose })
htmlBold = { style = 'bold' }, h('Character', { fg = p.gold })
htmlEndTag = { fg = p.subtle }, h('Comment', { fg = groups.comment, italic = maybe.italic })
htmlH1 = { fg = groups.headings.h1, style = 'bold' }, h('Conditional', { fg = p.pine })
htmlH2 = { fg = groups.headings.h2, style = 'bold' }, h('Constant', { fg = p.gold })
htmlH3 = { fg = groups.headings.h3, style = 'bold' }, h('Debug', { fg = p.rose })
htmlH4 = { fg = groups.headings.h4, style = 'bold' }, h('Define', { fg = p.iris })
htmlH5 = { fg = groups.headings.h5, style = 'bold' }, h('Delimiter', { fg = p.subtle })
htmlItalic = { style = styles.italic }, h('Error', { fg = p.love })
htmlLink = { fg = groups.link }, h('Exception', { fg = p.pine })
htmlTag = { fg = p.subtle }, h('Float', { fg = p.gold })
htmlTagN = { fg = p.text }, h('Function', { fg = p.rose })
htmlTagName = { fg = p.foam }, 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 })
markdownDelimiter = { fg = p.subtle }, h('htmlArg', { fg = p.iris })
markdownH1 = { fg = groups.headings.h1, style = 'bold' }, h('htmlBold', { bold = true })
markdownH1Delimiter = { link = 'markdownH1' }, h('htmlEndTag', { fg = p.subtle })
markdownH2 = { fg = groups.headings.h2, style = 'bold' }, h('htmlH1', { fg = groups.headings.h1, bold = true })
markdownH2Delimiter = { link = 'markdownH2' }, h('htmlH2', { fg = groups.headings.h2, bold = true })
markdownH3 = { fg = groups.headings.h3, style = 'bold' }, h('htmlH3', { fg = groups.headings.h3, bold = true })
markdownH3Delimiter = { link = 'markdownH3' }, h('htmlH4', { fg = groups.headings.h4, bold = true })
markdownH4 = { fg = groups.headings.h4, style = 'bold' }, h('htmlH5', { fg = groups.headings.h5, bold = true })
markdownH4Delimiter = { link = 'markdownH4' }, h('htmlItalic', { italic = maybe.italic })
markdownH5 = { fg = groups.headings.h5, style = 'bold' }, h('htmlLink', { fg = groups.link })
markdownH5Delimiter = { link = 'markdownH5' }, h('htmlTag', { fg = p.subtle })
markdownH6 = { fg = groups.headings.h6, style = 'bold' }, h('htmlTagN', { fg = p.text })
markdownH6Delimiter = { link = 'markdownH6' }, h('htmlTagName', { fg = p.foam })
markdownLinkText = { fg = groups.link, style = 'underline' },
markdownUrl = { link = 'markdownLinkText' },
mkdCode = { fg = p.foam, style = styles.italic }, h('markdownDelimiter', { fg = p.subtle })
mkdCodeDelimiter = { fg = p.rose }, h('markdownH1', { fg = groups.headings.h1, bold = true })
mkdCodeEnd = { fg = p.foam }, h('markdownH1Delimiter', { link = 'markdownH1' })
mkdCodeStart = { fg = p.foam }, h('markdownH2', { fg = groups.headings.h2, bold = true })
mkdFootnotes = { fg = p.foam }, h('markdownH2Delimiter', { link = 'markdownH2' })
mkdID = { fg = p.foam, style = 'underline' }, h('markdownH3', { fg = groups.headings.h3, bold = true })
mkdInlineURL = { fg = groups.link, style = 'underline' }, h('markdownH3Delimiter', { link = 'markdownH3' })
mkdLink = { link = 'mkdInlineURL' }, h('markdownH4', { fg = groups.headings.h4, bold = true })
mkdLinkDef = { link = 'mkdInlineURL' }, h('markdownH4Delimiter', { link = 'markdownH4' })
mkdListItemLine = { fg = p.text }, h('markdownH5', { fg = groups.headings.h5, bold = true })
mkdRule = { fg = p.subtle }, h('markdownH5Delimiter', { link = 'markdownH5' })
mkdURL = { link = 'mkdInlineURL' }, 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' })
DiagnosticError = { fg = groups.error }, h('mkdCode', { fg = p.foam, italic = maybe.italic })
DiagnosticHint = { fg = groups.hint }, h('mkdCodeDelimiter', { fg = p.rose })
DiagnosticInfo = { fg = groups.info }, h('mkdCodeEnd', { fg = p.foam })
DiagnosticWarn = { fg = groups.warn }, h('mkdCodeStart', { fg = p.foam })
DiagnosticDefaultError = { fg = groups.error }, h('mkdFootnotes', { fg = p.foam })
DiagnosticDefaultHint = { fg = groups.hint }, h('mkdID', { fg = p.foam, underline = true })
DiagnosticDefaultInfo = { fg = groups.info }, h('mkdInlineURL', { fg = groups.link, underline = true })
DiagnosticDefaultWarn = { fg = groups.warn }, h('mkdLink', { link = 'mkdInlineURL' })
DiagnosticFloatingError = { fg = groups.error }, h('mkdLinkDef', { link = 'mkdInlineURL' })
DiagnosticFloatingHint = { fg = groups.hint }, h('mkdListItemLine', { fg = p.text })
DiagnosticFloatingInfo = { fg = groups.info }, h('mkdRule', { fg = p.subtle })
DiagnosticFloatingWarn = { fg = groups.warn }, h('mkdURL', { link = 'mkdInlineURL' })
DiagnosticSignError = { fg = groups.error },
DiagnosticSignHint = { fg = groups.hint },
DiagnosticSignInfo = { fg = groups.info },
DiagnosticSignWarn = { fg = groups.warn },
DiagnosticStatusLineError = { fg = groups.error, bg = groups.panel },
DiagnosticStatusLineHint = { fg = groups.hint, bg = groups.panel },
DiagnosticStatusLineInfo = { fg = groups.info, bg = groups.panel },
DiagnosticStatusLineWarn = { fg = groups.warn, bg = groups.panel },
DiagnosticUnderlineError = { sp = groups.error, style = 'undercurl' },
DiagnosticUnderlineHint = { sp = groups.hint, style = 'undercurl' },
DiagnosticUnderlineInfo = { sp = groups.info, style = 'undercurl' },
DiagnosticUnderlineWarn = { sp = groups.warn, style = 'undercurl' },
DiagnosticVirtualTextError = { fg = groups.error },
DiagnosticVirtualTextHint = { fg = groups.hint },
DiagnosticVirtualTextInfo = { fg = groups.info },
DiagnosticVirtualTextWarn = { fg = groups.warn },
-- healthcheck h('DiagnosticError', { fg = groups.error })
healthError = { fg = groups.error }, h('DiagnosticHint', { fg = groups.hint })
healthSuccess = { fg = groups.info }, h('DiagnosticInfo', { fg = groups.info })
healthWarning = { fg = groups.warn }, 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 = p.surface })
h('DiagnosticStatusLineHint', { fg = groups.hint, bg = p.surface })
h('DiagnosticStatusLineInfo', { fg = groups.info, bg = p.surface })
h('DiagnosticStatusLineWarn', { fg = groups.warn, bg = p.surface })
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 })
-- TSAttribute = {}, -- healthcheck
TSBoolean = { link = 'Boolean' }, h('healthError', { fg = groups.error })
TSCharacter = { link = 'Character' }, h('healthSuccess', { fg = groups.info })
TSComment = { link = 'Comment' }, h('healthWarning', { fg = groups.warn })
TSConditional = { link = 'Conditional' },
TSConstBuiltin = { fg = p.love },
-- TSConstMacro = {},
TSConstant = { fg = p.foam },
TSConstructor = { fg = p.foam },
-- TSEmphasis = {},
-- TSError = {},
-- TSException = {},
TSField = { fg = p.foam },
-- TSFloat = {},
TSFuncBuiltin = { fg = p.love },
-- TSFuncMacro = {},
TSFunction = { fg = p.rose },
TSInclude = { fg = p.pine },
TSKeyword = { fg = p.pine },
-- TSKeywordFunction = {},
TSKeywordOperator = { fg = p.subtle },
TSLabel = { fg = p.foam },
-- TSLiteral = {},
-- TSMethod = {},
-- TSNamespace = {},
-- TSNone = {},
TSNumber = { link = 'Number' },
TSOperator = { fg = p.subtle },
TSParameter = { fg = p.iris, style = styles.italic },
-- TSParameterReference = {},
TSProperty = { fg = p.iris, style = styles.italic },
TSPunctBracket = { fg = groups.punctuation },
TSPunctDelimiter = { fg = groups.punctuation },
TSPunctSpecial = { fg = groups.punctuation },
-- TSRepeat = {},
-- TSStrike = {},
TSString = { link = 'String' },
TSStringEscape = { fg = p.pine },
-- TSStringRegex = {},
TSStringSpecial = { link = 'TSString' },
-- TSSymbol = {},
TSTag = { fg = p.foam },
TSTagDelimiter = { fg = p.subtle },
TSText = { fg = p.text },
TSTitle = { fg = groups.headings.h1, style = 'bold' },
TSType = { link = 'Type' },
-- TSTypeBuiltin = {},
TSURI = { fg = groups.link },
-- TSUnderline = {},
TSVariable = { fg = p.text, style = styles.italic },
TSVariableBuiltin = { fg = p.love },
-- Treesitter -- Treesitter
['@annotation'] = { link = 'PreProc' }, h('@boolean', { link = 'Boolean' })
['@attribute'] = { link = 'PreProc' }, h('@character', { link = 'Character' })
['@boolean'] = { link = 'Boolean' }, h('@character.special', { link = '@character' })
['@character'] = { link = 'Character' }, h('@class', { fg = p.foam })
['@comment'] = { link = 'Comment' }, h('@comment', { link = 'Comment' })
['@conditional'] = { link = 'Conditional' }, h('@conditional', { link = 'Conditional' })
['@constant'] = { fg = p.foam }, h('@constant', { link = 'Constant' })
['@constant.builtin'] = { fg = p.love }, h('@constant.builtin', { fg = p.love })
['@constructor'] = { fg = p.foam }, h('@constant.macro', { link = '@constant' })
['@field'] = { fg = p.foam }, h('@constructor', { fg = p.foam })
['@function'] = { fg = p.rose }, h('@field', { fg = p.foam })
['@function.builtin'] = { fg = p.love }, h('@function', { link = 'Function' })
['@include'] = { fg = p.pine }, h('@function.builtin', { fg = p.love })
['@keyword'] = { fg = p.pine }, h('@function.macro', { link = '@function' })
['@keyword.operator'] = { fg = p.subtle }, h('@include', { link = 'Include' })
['@label'] = { fg = p.foam }, h('@interface', { fg = p.foam })
['@namespace'] = { link = 'Include' }, h('@keyword', { link = 'Keyword' })
['@number'] = { link = 'Number' }, h('@keyword.operator', { fg = p.subtle })
['@operator'] = { fg = p.subtle }, h('@label', { link = 'Label' })
['@parameter'] = { fg = p.iris, style = styles.italic }, h('@macro', { link = 'Macro' })
['@property'] = { fg = p.iris, style = styles.italic }, h('@method', { fg = p.iris })
['@punctuation.bracket'] = { fg = groups.punctuation }, h('@number', { link = 'Number' })
['@punctuation.delimiter'] = { fg = groups.punctuation }, h('@operator', { link = 'Operator' })
['@punctuation.special'] = { fg = groups.punctuation }, h('@parameter', { fg = p.iris, italic = maybe.italic })
['@string'] = { link = 'String' }, h('@preproc', { link = 'PreProc' })
['@string.escape'] = { fg = p.pine }, h('@property', { fg = p.foam, italic = maybe.italic })
['@string.special'] = { link = '@string' }, h('@punctuation', { fg = groups.punctuation })
['@symbol'] = { link = 'Identifier' }, h('@punctuation.bracket', { link = '@punctuation' })
['@tag'] = { fg = p.foam }, h('@punctuation.delimiter', { link = '@punctuation' })
['@tag.attribute'] = { link = '@property' }, h('@punctuation.special', { link = '@punctuation' })
['@tag.delimiter'] = { fg = p.subtle }, h('@regexp', { link = 'String' })
['@text'] = { fg = p.text }, h('@repeat', { link = 'Repeat' })
['@text.strong'] = { bold = true }, h('@storageclass', { link = 'StorageClass' })
['@text.emphasis'] = { italic = true }, h('@string', { link = 'String' })
['@text.underline'] = { underline = true }, h('@string.escape', { fg = p.pine })
['@text.strike'] = { strikethrough = true }, h('@string.special', { link = '@string' })
['@text.math'] = { link = 'Special' }, h('@symbol', { link = 'Identifier' })
['@text.environment'] = { link = 'Macro' }, h('@tag', { link = 'Tag' })
['@text.environment.name'] = { link = 'Type' }, h('@tag.attribute', { fg = p.iris })
['@text.title'] = { fg = groups.headings.h1, style = 'bold' }, h('@tag.delimiter', { fg = p.subtle })
['@text.uri'] = { fg = groups.link }, h('@text', { fg = p.text })
['@text.note'] = { link = 'SpecialComment' }, h('@text.strong', { bold = true })
['@text.warning'] = { link = 'Todo' }, h('@text.emphasis', { italic = true })
['@text.danger'] = { link = 'WarningMsg' }, h('@text.underline', { underline = true })
['@todo'] = { link = 'Todo' }, h('@text.strike', { strikethrough = true })
['@type'] = { link = 'Type' }, h('@text.math', { link = 'Special' })
['@variable'] = { fg = p.text, style = styles.italic }, h('@text.environment', { link = 'Macro' })
['@variable.builtin'] = { fg = p.love }, 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 })
-- vim.lsp.buf.document_highlight() -- vim.lsp.buf.document_highlight()
LspReferenceText = { bg = p.highlight_med }, h('LspReferenceText', { bg = p.highlight_med })
LspReferenceRead = { bg = p.highlight_med }, h('LspReferenceRead', { bg = p.highlight_med })
LspReferenceWrite = { bg = p.highlight_med }, h('LspReferenceWrite', { bg = p.highlight_med })
-- lsp-highlight-codelens -- lsp-highlight-codelens
LspCodeLens = { fg = p.subtle }, -- virtual text of code lens h('LspCodeLens', { fg = p.subtle }) -- virtual text of code len
LspCodeLensSeparator = { fg = p.highlight_high }, -- separator between two or more code lens h('LspCodeLensSeparator', { fg = p.highlight_high }) -- separator between two or more code len
-- romgrk/barbar.nvim -- romgrk/barbar.nvim
BufferCurrent = { fg = p.text, bg = p.overlay }, h('BufferCurrent', { fg = p.text, bg = p.overlay })
BufferCurrentIndex = { fg = p.text, bg = p.overlay }, h('BufferCurrentIndex', { fg = p.text, bg = p.overlay })
BufferCurrentMod = { fg = p.foam, bg = p.overlay }, h('BufferCurrentMod', { fg = p.foam, bg = p.overlay })
BufferCurrentSign = { fg = p.subtle, bg = p.overlay }, h('BufferCurrentSign', { fg = p.subtle, bg = p.overlay })
BufferCurrentTarget = { fg = p.gold, bg = p.overlay }, h('BufferCurrentTarget', { fg = p.gold, bg = p.overlay })
BufferInactive = { fg = p.subtle }, h('BufferInactive', { fg = p.subtle })
BufferInactiveIndex = { fg = p.subtle }, h('BufferInactiveIndex', { fg = p.subtle })
BufferInactiveMod = { fg = p.foam }, h('BufferInactiveMod', { fg = p.foam })
BufferInactiveSign = { fg = p.muted }, h('BufferInactiveSign', { fg = p.muted })
BufferInactiveTarget = { fg = p.gold }, h('BufferInactiveTarget', { fg = p.gold })
BufferTabpageFill = { fg = groups.background, bg = groups.background }, h('BufferTabpageFill', { fg = p.base, bg = p.base })
BufferVisible = { fg = p.subtle }, h('BufferVisible', { fg = p.subtle })
BufferVisibleIndex = { fg = p.subtle }, h('BufferVisibleIndex', { fg = p.subtle })
BufferVisibleMod = { fg = p.foam }, h('BufferVisibleMod', { fg = p.foam })
BufferVisibleSign = { fg = p.muted }, h('BufferVisibleSign', { fg = p.muted })
BufferVisibleTarget = { fg = p.gold }, h('BufferVisibleTarget', { fg = p.gold })
-- lewis6991/gitsigns.nvim -- lewis6991/gitsigns.nvim
GitSignsAdd = { fg = groups.git_add }, h('GitSignsAdd', { fg = groups.git_add })
GitSignsChange = { fg = groups.git_change }, h('GitSignsChange', { fg = groups.git_change })
GitSignsDelete = { fg = groups.git_delete }, h('GitSignsDelete', { fg = groups.git_delete })
SignAdd = { link = 'GitSignsAdd' }, h('SignAdd', { link = 'GitSignsAdd' })
SignChange = { link = 'GitSignsChange' }, h('SignChange', { link = 'GitSignsChange' })
SignDelete = { link = 'GitSignsDelete' }, h('SignDelete', { link = 'GitSignsDelete' })
-- mvllow/modes.nvim -- mvllow/modes.nvim
ModesCopy = { bg = p.gold }, h('ModesCopy', { bg = p.gold })
ModesDelete = { bg = p.love }, h('ModesDelete', { bg = p.love })
ModesInsert = { bg = p.foam }, h('ModesInsert', { bg = p.foam })
ModesVisual = { bg = p.iris }, h('ModesVisual', { bg = p.iris })
-- kyazdani42/nvim-tree.lua -- kyazdani42/nvim-tree.lua
NvimTreeEmptyFolderName = { fg = p.muted }, h('NvimTreeEmptyFolderName', { fg = p.muted })
NvimTreeFileDeleted = { fg = p.love }, h('NvimTreeFileDeleted', { fg = p.love })
NvimTreeFileDirty = { fg = p.rose }, h('NvimTreeFileDirty', { fg = p.rose })
NvimTreeFileMerge = { fg = p.iris }, h('NvimTreeFileMerge', { fg = p.iris })
NvimTreeFileNew = { fg = p.foam }, h('NvimTreeFileNew', { fg = p.foam })
NvimTreeFileRenamed = { fg = p.pine }, h('NvimTreeFileRenamed', { fg = p.pine })
NvimTreeFileStaged = { fg = p.iris }, h('NvimTreeFileStaged', { fg = p.iris })
NvimTreeFolderIcon = { fg = p.subtle }, h('NvimTreeFolderIcon', { fg = p.subtle })
NvimTreeFolderName = { fg = p.foam }, h('NvimTreeFolderName', { fg = p.foam })
NvimTreeGitDeleted = { fg = groups.git_delete }, h('NvimTreeGitDeleted', { fg = groups.git_delete })
NvimTreeGitDirty = { fg = groups.git_dirty }, h('NvimTreeGitDirty', { fg = groups.git_dirty })
NvimTreeGitIgnored = { fg = groups.git_ignore }, h('NvimTreeGitIgnored', { fg = groups.git_ignore })
NvimTreeGitMerge = { fg = groups.git_merge }, h('NvimTreeGitMerge', { fg = groups.git_merge })
NvimTreeGitNew = { fg = groups.git_add }, h('NvimTreeGitNew', { fg = groups.git_add })
NvimTreeGitRenamed = { fg = groups.git_rename }, h('NvimTreeGitRenamed', { fg = groups.git_rename })
NvimTreeGitStaged = { fg = groups.git_stage }, h('NvimTreeGitStaged', { fg = groups.git_stage })
NvimTreeImageFile = { fg = p.text }, h('NvimTreeImageFile', { fg = p.text })
NvimTreeNormal = { fg = p.text }, h('NvimTreeNormal', { fg = p.text })
NvimTreeOpenedFile = { fg = p.text, bg = p.highlight_med }, h('NvimTreeOpenedFile', { fg = p.text, bg = p.highlight_med })
NvimTreeOpenedFolderName = { link = 'NvimTreeFolderName' }, h('NvimTreeOpenedFolderName', { link = 'NvimTreeFolderName' })
NvimTreeRootFolder = { fg = p.iris }, h('NvimTreeRootFolder', { fg = p.iris })
NvimTreeSpecialFile = { link = 'NvimTreeNormal' }, h('NvimTreeSpecialFile', { link = 'NvimTreeNormal' })
NvimTreeWindowPicker = { fg = groups.background, bg = p.iris }, h('NvimTreeWindowPicker', { fg = p.love, bg = p.love, blend = 10 })
-- folke/which-key.nvim -- folke/which-key.nvim
WhichKey = { fg = p.iris }, h('WhichKey', { fg = p.iris })
WhichKeyGroup = { fg = p.foam }, h('WhichKeyGroup', { fg = p.foam })
WhichKeySeparator = { fg = p.subtle }, h('WhichKeySeparator', { fg = p.subtle })
WhichKeyDesc = { fg = p.gold }, h('WhichKeyDesc', { fg = p.gold })
WhichKeyFloat = { bg = groups.panel }, h('WhichKeyFloat', { bg = maybe.surface })
WhichKeyValue = { fg = p.rose }, h('WhichKeyValue', { fg = p.rose })
-- luka-reineke/indent-blankline.nvim -- luka-reineke/indent-blankline.nvim
IndentBlanklineChar = { fg = p.muted }, h('IndentBlanklineChar', { fg = p.muted })
IndentBlanklineSpaceChar = { fg = p.muted }, h('IndentBlanklineSpaceChar', { fg = p.muted })
IndentBlanklineSpaceCharBlankline = { fg = p.muted }, h('IndentBlanklineSpaceCharBlankline', { fg = p.muted })
-- hrsh7th/nvim-cmp -- hrsh7th/nvim-cmp
CmpItemAbbr = { fg = p.subtle }, h('CmpItemAbbr', { fg = p.subtle })
CmpItemAbbrDeprecated = { fg = p.subtle, style = 'strikethrough' }, h('CmpItemAbbrDeprecated', { fg = p.subtle, strikethrough = true })
CmpItemAbbrMatch = { fg = p.text, style = 'bold' }, h('CmpItemAbbrMatch', { fg = p.text, bold = true })
CmpItemAbbrMatchFuzzy = { fg = p.text, style = 'bold' }, h('CmpItemAbbrMatchFuzzy', { fg = p.text, bold = true })
CmpItemKind = { fg = p.iris }, h('CmpItemKind', { fg = p.subtle })
CmpItemKindClass = { fg = p.gold }, h('CmpItemKindClass', { fg = p.pine })
CmpItemKindFunction = { fg = p.iris }, h('CmpItemKindFunction', { fg = p.rose })
CmpItemKindInterface = { fg = p.gold }, h('CmpItemKindInterface', { fg = p.foam })
CmpItemKindMethod = { fg = p.iris }, h('CmpItemKindMethod', { fg = p.iris })
CmpItemKindSnippet = { fg = p.iris }, h('CmpItemKindSnippet', { fg = p.gold })
CmpItemKindVariable = { fg = p.foam }, h('CmpItemKindVariable', { fg = p.text })
-- TimUntersberger/neogit -- TimUntersberger/neogit
NeogitDiffAddHighlight = { fg = p.foam, bg = p.highlight_med }, h('NeogitDiffAddHighlight', { fg = p.foam, bg = p.highlight_med })
NeogitDiffContextHighlight = { bg = p.highlight_low }, h('NeogitDiffContextHighlight', { bg = p.highlight_low })
NeogitDiffDeleteHighlight = { fg = p.love, bg = p.highlight_med }, h('NeogitDiffDeleteHighlight', { fg = p.love, bg = p.highlight_med })
NeogitHunkHeader = { bg = p.highlight_low }, h('NeogitHunkHeader', { bg = p.highlight_low })
NeogitHunkHeaderHighlight = { bg = p.highlight_low }, h('NeogitHunkHeaderHighlight', { bg = p.highlight_low })
-- vimwiki/vimwiki -- vimwiki/vimwiki
VimwikiHR = { fg = p.subtle }, h('VimwikiHR', { fg = p.subtle })
VimwikiHeader1 = { fg = groups.headings.h1, style = 'bold' }, h('VimwikiHeader1', { fg = groups.headings.h1, bold = true })
VimwikiHeader2 = { fg = groups.headings.h2, style = 'bold' }, h('VimwikiHeader2', { fg = groups.headings.h2, bold = true })
VimwikiHeader3 = { fg = groups.headings.h3, style = 'bold' }, h('VimwikiHeader3', { fg = groups.headings.h3, bold = true })
VimwikiHeader4 = { fg = groups.headings.h4, style = 'bold' }, h('VimwikiHeader4', { fg = groups.headings.h4, bold = true })
VimwikiHeader5 = { fg = groups.headings.h5, style = 'bold' }, h('VimwikiHeader5', { fg = groups.headings.h5, bold = true })
VimwikiHeader6 = { fg = groups.headings.h6, style = 'bold' }, h('VimwikiHeader6', { fg = groups.headings.h6, bold = true })
VimwikiHeaderChar = { fg = p.pine }, h('VimwikiHeaderChar', { fg = p.pine })
VimwikiLink = { fg = groups.link, style = 'underline' }, h('VimwikiLink', { fg = groups.link, underline = true })
VimwikiList = { fg = p.iris }, h('VimwikiList', { fg = p.iris })
VimwikiNoExistsLink = { fg = p.love }, h('VimwikiNoExistsLink', { fg = p.love })
-- nvim-neorg/neorg -- nvim-neorg/neorg
NeorgHeading1Prefix = { fg = groups.headings.h1, style = 'bold' }, h('NeorgHeading1Prefix', { fg = groups.headings.h1, bold = true })
NeorgHeading1Title = { link = 'NeorgHeading1Prefix' }, h('NeorgHeading1Title', { link = 'NeorgHeading1Prefix' })
NeorgHeading2Prefix = { fg = groups.headings.h2, style = 'bold' }, h('NeorgHeading2Prefix', { fg = groups.headings.h2, bold = true })
NeorgHeading2Title = { link = 'NeorgHeading2Prefix' }, h('NeorgHeading2Title', { link = 'NeorgHeading2Prefix' })
NeorgHeading3Prefix = { fg = groups.headings.h3, style = 'bold' }, h('NeorgHeading3Prefix', { fg = groups.headings.h3, bold = true })
NeorgHeading3Title = { link = 'NeorgHeading3Prefix' }, h('NeorgHeading3Title', { link = 'NeorgHeading3Prefix' })
NeorgHeading4Prefix = { fg = groups.headings.h4, style = 'bold' }, h('NeorgHeading4Prefix', { fg = groups.headings.h4, bold = true })
NeorgHeading4Title = { link = 'NeorgHeading4Prefix' }, h('NeorgHeading4Title', { link = 'NeorgHeading4Prefix' })
NeorgHeading5Prefix = { fg = groups.headings.h5, style = 'bold' }, h('NeorgHeading5Prefix', { fg = groups.headings.h5, bold = true })
NeorgHeading5Title = { link = 'NeorgHeading5Prefix' }, h('NeorgHeading5Title', { link = 'NeorgHeading5Prefix' })
NeorgHeading6Prefix = { fg = groups.headings.h6, style = 'bold' }, h('NeorgHeading6Prefix', { fg = groups.headings.h6, bold = true })
NeorgHeading6Title = { link = 'NeorgHeading6Prefix' }, h('NeorgHeading6Title', { link = 'NeorgHeading6Prefix' })
NeorgMarkerTitle = { fg = p.text, style = 'bold' }, h('NeorgMarkerTitle', { fg = p.text, bold = true })
-- tami5/lspsaga.nvim (fork of glepnir/lspsaga.nvim) -- tami5/lspsaga.nvim (fork of glepnir/lspsaga.nvim)
DefinitionCount = { fg = p.rose }, h('DefinitionCount', { fg = p.rose })
DefinitionIcon = { fg = p.rose }, h('DefinitionIcon', { fg = p.rose })
DefintionPreviewTitle = { fg = p.rose, style = 'bold' }, h('DefintionPreviewTitle', { fg = p.rose, bold = true })
LspFloatWinBorder = { fg = groups.border }, h('LspFloatWinBorder', { fg = groups.border })
LspFloatWinNormal = { bg = groups.background }, h('LspFloatWinNormal', { bg = maybe.surface })
LspSagaAutoPreview = { fg = p.subtle }, h('LspSagaAutoPreview', { fg = p.subtle })
LspSagaCodeActionBorder = { fg = groups.border }, h('LspSagaCodeActionBorder', { fg = groups.border })
LspSagaCodeActionContent = { fg = p.foam }, h('LspSagaCodeActionContent', { fg = p.foam })
LspSagaCodeActionTitle = { fg = p.gold, style = 'bold' }, h('LspSagaCodeActionTitle', { fg = p.gold, bold = true })
LspSagaCodeActionTruncateLine = { link = 'LspSagaCodeActionBorder' }, h('LspSagaCodeActionTruncateLine', { link = 'LspSagaCodeActionBorder' })
LspSagaDefPreviewBorder = { fg = groups.border }, h('LspSagaDefPreviewBorder', { fg = groups.border })
LspSagaDiagnosticBorder = { fg = groups.border }, h('LspSagaDiagnosticBorder', { fg = groups.border })
LspSagaDiagnosticHeader = { fg = p.gold, style = 'bold' }, h('LspSagaDiagnosticHeader', { fg = p.gold, bold = true })
LspSagaDiagnosticTruncateLine = { link = 'LspSagaDiagnosticBorder' }, h('LspSagaDiagnosticTruncateLine', { link = 'LspSagaDiagnosticBorder' })
LspSagaDocTruncateLine = { link = 'LspSagaHoverBorder' }, h('LspSagaDocTruncateLine', { link = 'LspSagaHoverBorder' })
LspSagaFinderSelection = { fg = p.gold }, h('LspSagaFinderSelection', { fg = p.gold })
LspSagaHoverBorder = { fg = groups.border }, h('LspSagaHoverBorder', { fg = groups.border })
LspSagaLspFinderBorder = { fg = groups.border }, h('LspSagaLspFinderBorder', { fg = groups.border })
LspSagaRenameBorder = { fg = p.pine }, h('LspSagaRenameBorder', { fg = p.pine })
LspSagaRenamePromptPrefix = { fg = p.love }, h('LspSagaRenamePromptPrefix', { fg = p.love })
LspSagaShTruncateLine = { link = 'LspSagaSignatureHelpBorder' }, h('LspSagaShTruncateLine', { link = 'LspSagaSignatureHelpBorder' })
LspSagaSignatureHelpBorder = { fg = p.pine }, h('LspSagaSignatureHelpBorder', { fg = p.pine })
ReferencesCount = { fg = p.rose }, h('ReferencesCount', { fg = p.rose })
ReferencesIcon = { fg = p.rose }, h('ReferencesIcon', { fg = p.rose })
SagaShadow = { bg = p.overlay }, h('SagaShadow', { bg = p.overlay })
TargetWord = { fg = p.iris }, h('TargetWord', { fg = p.iris })
-- ray-x/lsp_signature.nvim -- ray-x/lsp_signature.nvim
LspSignatureActiveParameter = { bg = p.overlay }, h('LspSignatureActiveParameter', { bg = p.overlay })
-- rlane/pounce.nvim -- rlane/pounce.nvim
PounceAccept = { fg = p.love, bg = p.highlight_high }, h('PounceAccept', { fg = p.love, bg = p.highlight_high })
PounceAcceptBest = { fg = p.base, bg = p.gold }, h('PounceAcceptBest', { fg = p.base, bg = p.gold })
PounceGap = { link = 'Search' }, h('PounceGap', { link = 'Search' })
PounceMatch = { link = 'Search' }, h('PounceMatch', { link = 'Search' })
-- nvim-telescope/telescope.nvim -- nvim-telescope/telescope.nvim
TelescopeBorder = { fg = groups.border, bg = styles.float_background }, h('TelescopeBorder', { fg = groups.border, bg = maybe.surface })
TelescopeMatching = { fg = p.rose }, h('TelescopeMatching', { fg = p.rose })
TelescopeNormal = { fg = p.subtle, bg = styles.float_background }, h('TelescopeNormal', { fg = p.subtle, bg = maybe.surface })
TelescopePromptNormal = { fg = p.text, bg = styles.float_background }, h('TelescopePromptNormal', {
TelescopePromptPrefix = { fg = p.subtle }, fg = p.text,
TelescopeSelection = { fg = p.text, bg = p.overlay }, bg = (
TelescopeSelectionCaret = { fg = p.rose, bg = p.overlay }, options.dim_nc_background
TelescopeTitle = { fg = p.subtle }, and (options.disable_float_background and p.nc or p.surface)
) or maybe.surface,
})
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 -- rcarriga/nvim-notify
NotifyINFOBorder = { fg = p.foam }, h('NotifyINFOBorder', { fg = p.foam })
NotifyINFOTitle = { link = 'NotifyINFOBorder' }, h('NotifyINFOTitle', { link = 'NotifyINFOBorder' })
NotifyINFOIcon = { link = 'NotifyINFOBorder' }, h('NotifyINFOIcon', { link = 'NotifyINFOBorder' })
NotifyWARNBorder = { fg = p.gold }, h('NotifyWARNBorder', { fg = p.gold })
NotifyWARNTitle = { link = 'NotifyWARNBorder' }, h('NotifyWARNTitle', { link = 'NotifyWARNBorder' })
NotifyWARNIcon = { link = 'NotifyWARNBorder' }, h('NotifyWARNIcon', { link = 'NotifyWARNBorder' })
NotifyDEBUGBorder = { fg = p.muted }, h('NotifyDEBUGBorder', { fg = p.muted })
NotifyDEBUGTitle = { link = 'NotifyDEBUGBorder' }, h('NotifyDEBUGTitle', { link = 'NotifyDEBUGBorder' })
NotifyDEBUGIcon = { link = 'NotifyDEBUGBorder' }, h('NotifyDEBUGIcon', { link = 'NotifyDEBUGBorder' })
NotifyTRACEBorder = { fg = p.iris }, h('NotifyTRACEBorder', { fg = p.iris })
NotifyTRACETitle = { link = 'NotifyTRACEBorder' }, h('NotifyTRACETitle', { link = 'NotifyTRACEBorder' })
NotifyTRACEIcon = { link = 'NotifyTRACEBorder' }, h('NotifyTRACEIcon', { link = 'NotifyTRACEBorder' })
NotifyERRORBorder = { fg = p.love }, h('NotifyERRORBorder', { fg = p.love })
NotifyERRORTitle = { link = 'NotifyERRORBorder' }, h('NotifyERRORTitle', { link = 'NotifyERRORBorder' })
NotifyERRORIcon = { link = 'NotifyERRORBorder' }, h('NotifyERRORIcon', { link = 'NotifyERRORBorder' })
-- rcarriga/nvim-dap-ui -- rcarriga/nvim-dap-ui
DapUIVariable = { link = 'Normal' }, h('DapUIVariable', { link = 'Normal' })
DapUIValue = { link = 'Normal' }, h('DapUIValue', { link = 'Normal' })
DapUIFrameName = { link = 'Normal' }, h('DapUIFrameName', { link = 'Normal' })
DapUIThread = { fg = p.gold }, h('DapUIThread', { fg = p.gold })
DapUIWatchesValue = { link = 'DapUIThread' }, h('DapUIWatchesValue', { link = 'DapUIThread' })
DapUIBreakpointsInfo = { link = 'DapUIThread' }, h('DapUIBreakpointsInfo', { link = 'DapUIThread' })
DapUIBreakpointsCurrentLine = { fg = p.gold, style = 'bold' }, h('DapUIBreakpointsCurrentLine', { fg = p.gold, bold = true })
DapUIWatchesEmpty = { fg = p.love }, h('DapUIWatchesEmpty', { fg = p.love })
DapUIWatchesError = { link = 'DapUIWatchesEmpty' }, h('DapUIWatchesError', { link = 'DapUIWatchesEmpty' })
DapUIBreakpointsDisabledLine = { fg = p.muted }, h('DapUIBreakpointsDisabledLine', { fg = p.muted })
DapUISource = { fg = p.iris }, h('DapUISource', { fg = p.iris })
DapUIBreakpointsPath = { fg = p.foam }, h('DapUIBreakpointsPath', { fg = p.foam })
DapUIScope = { link = 'DapUIBreakpointsPath' }, h('DapUIScope', { link = 'DapUIBreakpointsPath' })
DapUILineNumber = { link = 'DapUIBreakpointsPath' }, h('DapUILineNumber', { link = 'DapUIBreakpointsPath' })
DapUIBreakpointsLine = { link = 'DapUIBreakpointsPath' }, h('DapUIBreakpointsLine', { link = 'DapUIBreakpointsPath' })
DapUIFloatBorder = { link = 'DapUIBreakpointsPath' }, h('DapUIFloatBorder', { link = 'DapUIBreakpointsPath' })
DapUIStoppedThread = { link = 'DapUIBreakpointsPath' }, h('DapUIStoppedThread', { link = 'DapUIBreakpointsPath' })
DapUIDecoration = { link = 'DapUIBreakpointsPath' }, h('DapUIDecoration', { link = 'DapUIBreakpointsPath' })
DapUIModifiedValue = { fg = p.foam, style = 'bold' }, h('DapUIModifiedValue', { fg = p.foam, bold = true })
-- glepnir/dashboard-nvim -- glepnir/dashboard-nvim
DashboardShortcut = { fg = p.love }, h('DashboardShortcut', { fg = p.love })
DashboardHeader = { fg = p.pine }, h('DashboardHeader', { fg = p.pine })
DashboardCenter = { fg = p.gold }, h('DashboardCenter', { fg = p.gold })
DashboardFooter = { fg = p.iris }, h('DashboardFooter', { fg = p.iris })
}
vim.g.terminal_color_0 = p.overlay -- black vim.g.terminal_color_0 = p.overlay -- black
vim.g.terminal_color_8 = p.subtle -- bright black vim.g.terminal_color_8 = p.subtle -- bright black
@ -536,7 +501,10 @@ function M.get(config)
vim.g.terminal_color_7 = p.text -- white vim.g.terminal_color_7 = p.text -- white
vim.g.terminal_color_15 = p.text -- bright white vim.g.terminal_color_15 = p.text -- bright white
return theme -- Set user highlights
for group, color in pairs(options.highlight_groups) do
h(group, color)
end
end end
return M return M

View file

@ -33,11 +33,11 @@ end
---@param bg string background color ---@param bg string background color
---@param alpha number number between 0 (background) and 1 (foreground) ---@param alpha number number between 0 (background) and 1 (foreground)
util.blend = function(fg, bg, alpha) util.blend = function(fg, bg, alpha)
fg = rgb(parse_color(fg)) local fg_rgb = rgb(parse_color(fg))
bg = rgb(parse_color(bg)) local bg_rgb = rgb(parse_color(bg))
local function blend_channel(i) local function blend_channel(i)
local ret = (alpha * fg[i] + ((1 - alpha) * bg[i])) local ret = (alpha * fg_rgb[i] + ((1 - alpha) * bg_rgb[i]))
return math.floor(math.min(math.max(0, ret), 255) + 0.5) return math.floor(math.min(math.max(0, ret), 255) + 0.5)
end end
@ -50,18 +50,22 @@ util.blend = function(fg, bg, alpha)
end end
---@param group string ---@param group string
---@param color table<string, string> ---@param color table<string, any>
util.highlight = function(group, color) util.highlight = function(group, color)
local style = color.style and 'gui=' .. color.style or 'gui=NONE' local fg = color.fg and parse_color(color.fg) or 'none'
local fg = color.fg and 'guifg=' .. parse_color(color.fg) or 'guifg=NONE' local bg = color.bg and parse_color(color.bg) or 'none'
local bg = color.bg and 'guibg=' .. parse_color(color.bg) or 'guibg=NONE' local sp = color.sp and parse_color(color.sp) or ''
local sp = color.sp and 'guisp=' .. parse_color(color.sp) or ''
vim.cmd(string.format('highlight %s %s %s %s %s', group, style, fg, bg, sp)) if
color.blend ~= nil
if color.link then and (color.blend >= 0 or color.blend <= 100)
vim.cmd(string.format('highlight! link %s %s', group, color.link)) and bg ~= nil
then
bg = util.blend(bg, parse_color('base') or '', color.blend / 100)
end end
color = vim.tbl_extend('force', color, { fg = fg, bg = bg, sp = sp })
vim.api.nvim_set_hl(0, group, color)
end end
return util return util

View file

@ -65,7 +65,9 @@ Variant respects `vim.o.background`, using dawn when light and `dark_variant` wh
```lua ```lua
require('rose-pine').setup({ require('rose-pine').setup({
--- @usage 'main' | 'moon' --- @usage 'auto'|'main'|'moon'|'dawn'
variant = 'auto',
--- @usage 'main'|'moon'|'dawn'
dark_variant = 'main', dark_variant = 'main',
bold_vert_split = false, bold_vert_split = false,
dim_nc_background = false, dim_nc_background = false,
@ -101,7 +103,11 @@ require('rose-pine').setup({
-- Change specific vim highlight groups -- Change specific vim highlight groups
highlight_groups = { highlight_groups = {
ColorColumn = { bg = 'rose' } ColorColumn = { bg = 'rose' },
-- Blend colours against the "base" background
CursorLine = { bg = 'foam', blend = 10 },
StatusLine = { fg = 'love', bg = 'love', blend = 10 },
} }
}) })