breaking: move to lua config (#64)

Co-authored-by: fvrests <fvrests@icloud.com>
This commit is contained in:
not 2022-02-13 16:06:19 -06:00 committed by mvllow
commit 317a7c8473
8 changed files with 648 additions and 683 deletions

View file

@ -1,6 +1,3 @@
lua package.loaded['rose-pine'] = nil
lua package.loaded['rose-pine.config'] = nil
lua package.loaded['rose-pine.palette'] = nil
lua package.loaded['rose-pine.theme'] = nil
lua require('rose-pine').colorscheme()

View file

@ -1,23 +0,0 @@
local p = require('rose-pine.palette')
-- TODO: Someone who uses bufferline.nvim is free to PR with this addition
-- `:h bufferline-highlights`
--
-- The intended use would be (or any better solution):
--
-- ```
-- local highlights = require('rose-pine.bufferline')
-- require('bufferline').setup({
-- highlights = highlights
-- })
-- ```
return {
fill = {
guifg = p.text,
guibg = p.base,
},
background = {
guifg = p.text,
guibg = p.base,
},
}

View file

@ -1,74 +0,0 @@
local palette = require('rose-pine.palette')
local function opt(key, default)
key = 'rose_pine_' .. key
if vim.g[key] == nil then
return default
end
if vim.g[key] == 0 or vim.g[key] == false then
return false
end
return vim.g[key]
end
local config = {
variant = opt('variant', 'main'),
bold_vertical_split_line = opt('bold_vertical_split_line', false),
disable_italics = opt('disable_italics', false),
disable_background = opt('disable_background', false),
disable_float_background = opt('disable_float_background', false),
inactive_background = opt('inactive_background', false),
colors = {
border = palette.highlight_med,
comment = palette.muted,
link = palette.iris,
punctuation = palette.subtle,
error = palette.love,
hint = palette.iris,
info = palette.foam,
warn = palette.gold,
git_add = palette.foam,
git_change = palette.rose,
git_delete = palette.love,
git_dirty = palette.rose,
git_ignore = palette.muted,
git_merge = palette.iris,
git_rename = palette.pine,
git_stage = palette.iris,
git_text = palette.rose,
---@type string|table<string, string>
headings = {
h1 = palette.iris,
h2 = palette.foam,
h3 = palette.rose,
h4 = palette.gold,
h5 = palette.pine,
h6 = palette.foam,
},
},
}
local colors = vim.g.rose_pine_colors or {}
if type(colors.headings) == 'string' then
colors.headings = {
h1 = colors.headings,
h2 = colors.headings,
h3 = colors.headings,
h4 = colors.headings,
h5 = colors.headings,
h6 = colors.headings,
}
end
config.colors = vim.tbl_deep_extend('force', config.colors, colors)
return config

View file

@ -3,17 +3,17 @@ if not present then
return
end
local palette = require('rose-pine.palette')
local p = require('rose-pine.palette')
galaxyline_colors['rose-pine'] = {
bg = palette.overlay,
fg = palette.text,
fg_alt = palette.subtle,
blue = palette.foam,
cyan = palette.foam,
green = palette.muted,
magenta = palette.iris,
orange = palette.rose,
red = palette.love,
yellow = palette.gold,
bg = p.overlay,
fg = p.text,
fg_alt = p.subtle,
blue = p.foam,
cyan = p.foam,
green = p.muted,
magenta = p.iris,
orange = p.rose,
red = p.love,
yellow = p.gold,
}

View file

@ -1,4 +1,156 @@
local M = {}
local show_init_messages = true
local function check_for_deprecated_opts()
local alerts = {}
local should_alert = false
-- Deprecated options
if vim.g.rose_pine_bold_vertical_split_line ~= nil then
should_alert = true
table.insert(alerts, 'vim.g.rose_pine_bold_vertical_split_line renamed to bold_vert_split')
end
if vim.g.rose_pine_inactive_background ~= nil then
should_alert = true
table.insert(alerts, 'vim.g.rose_pine_inactive_background renamed to dim_nc_background')
end
if vim.g.rose_pine_disable_background ~= nil then
should_alert = true
table.insert(alerts, 'vim.g.rose_pine_disable_background renamed to disable_background')
end
if vim.g.rose_pine_disable_float_background ~= nil then
should_alert = true
table.insert(
alerts,
'vim.g.rose_pine_disable_float_background renamed to disable_float_background'
)
end
if vim.g.rose_pine_disable_italics ~= nil then
should_alert = true
table.insert(alerts, 'vim.g.rose_pine_disable_italics renamed to disable_italics')
end
if vim.g.rose_pine_colors ~= nil then
should_alert = true
table.insert(alerts, 'vim.g.rose_pine_colors renamed to groups')
end
if should_alert then
local prefix = ' '
print('Rosé Pine https://github.com/rose-pine/neovim')
print(prefix .. 'vim.g.rose_pine_<option> moved to lua setup:')
print(prefix .. " require('rose-pine').setup({ ... })")
for _, message in ipairs(alerts) do
print(prefix .. message)
end
should_alert = false
end
end
---@class RosePineConfig
---@field bold_vert_split boolean
---@field dark_variant 'main'|'moon'
---@field dim_nc_background boolean
---@field disable_background boolean
---@field disable_float_background boolean
---@field disable_italics boolean
---@field groups RosePineGroups
---@class RosePineGroups
---@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 RosePineGit
---@field headings string|RosePineHeadings
---@class RosePineGit
---@field add string
---@field change string
---@field delete string
---@field dirty string
---@field ignore string
---@field merge string
---@field rename string
---@field stage string
---@field text string
---@class RosePineHeadings
---@field h1 string
---@field h2 string
---@field h3 string
---@field h4 string
---@field h5 string
---@field h6 string
---@type RosePineConfig
local config = {
bold_vert_split = false,
dark_variant = 'main',
dim_nc_background = false,
disable_background = false,
disable_float_background = false,
disable_italics = false,
groups = {
border = 'highlight_med',
comment = 'muted',
link = 'iris',
punctuation = 'subtle',
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',
},
},
}
---@param opts RosePineConfig
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
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
@ -8,20 +160,29 @@ function M.colorscheme()
vim.opt.termguicolors = true
vim.g.colors_name = 'rose-pine'
-- Match terminal theme if no variant is set
if vim.g.rose_pine_variant == nil and vim.o.background == 'light' then
vim.g.rose_pine_variant = 'dawn'
elseif vim.g.rose_pine_variant == 'dawn' then
vim.o.background = 'light'
if show_init_messages then
check_for_deprecated_opts()
show_init_messages = false
end
---@param color string
local function get_palette_color(color)
local p = require('rose-pine.palette')
if color and not color:find('#') then
return p[color:lower()]
end
return color:lower()
end
---@param group string
---@param color table<string, string>
local function highlight(group, color)
local style = color.style and 'gui=' .. color.style or 'gui=NONE'
local fg = color.fg and 'guifg=' .. color.fg or 'guifg=NONE'
local bg = color.bg and 'guibg=' .. color.bg or 'guibg=NONE'
local sp = color.sp and 'guisp=' .. color.sp or ''
local fg = color.fg and 'guifg=' .. get_palette_color(color.fg) or 'guifg=NONE'
local bg = color.bg and 'guibg=' .. get_palette_color(color.bg) or 'guibg=NONE'
local sp = color.sp and 'guisp=' .. get_palette_color(color.sp) or ''
local hl = 'highlight ' .. group .. ' ' .. style .. ' ' .. fg .. ' ' .. bg .. ' ' .. sp
@ -31,33 +192,12 @@ function M.colorscheme()
end
end
for group, colors in pairs(require('rose-pine.theme')) do
highlight(group, colors)
local theme = require('rose-pine.theme').get(config)
for group, color in pairs(theme) do
highlight(group, color)
end
require('rose-pine.galaxyline.theme')
end
function M.set(variant)
vim.g.rose_pine_variant = variant
vim.cmd('colorscheme rose-pine')
end
function M.toggle(variants)
variants = variants or { 'main', 'moon', 'dawn' }
local index = {}
for k, v in pairs(variants) do
index[v] = k
end
if vim.g.rose_pine_current_variant == nil then
vim.g.rose_pine_current_variant = index[vim.g.rose_pine_variant] or 0
end
vim.g.rose_pine_current_variant = (vim.g.rose_pine_current_variant % #variants) + 1
M.set(variants[vim.g.rose_pine_current_variant])
end
return M

View file

@ -55,12 +55,12 @@ local variants = {
},
}
local palette = variants.main
local palette = {}
if string.match(vim.g.rose_pine_variant or '', 'moon') then
palette = variants.moon
elseif string.match(vim.g.rose_pine_variant or '', 'dawn') then
if vim.o.background == 'light' then
palette = variants.dawn
else
palette = variants[(vim.g.rose_pine_variant == 'moon' and 'moon') or 'main']
end
vim.tbl_deep_extend('force', palette, { none = 'NONE' })

View file

@ -1,477 +1,427 @@
local palette = require('rose-pine.palette')
local config = require('rose-pine.config')
local util = require('rose-pine.util')
local blend = require('rose-pine.util').blend
local group = config.colors
local M = {}
local maybe_italic = 'italic'
if config.disable_italics == true then
maybe_italic = nil
function M.get(config)
local p = require('rose-pine.palette')
local theme = {}
local groups = config.groups or {}
local styles = {
italic = (config.disable_italics and 'NONE') or 'italic',
vert_split = (config.bold_vert_split and p.surface) or p.none,
background = (config.disable_background and p.none) or p.base,
float_background = (config.disable_float_background and p.none) or p.surface,
nc_background = (config.dim_nc_background and p.surface) or p.base,
}
theme = {
ColorColumn = { bg = p.highlight_high },
Conceal = { bg = p.none },
-- Cursor = {},
CursorColumn = { bg = p.highlight_low },
-- CursorIM = {},
CursorLine = { bg = p.highlight_low },
CursorLineNr = { fg = p.text },
DarkenedPanel = { bg = p.surface },
DarkenedStatusline = { bg = p.surface },
DiffAdd = { bg = blend(groups.git_add, p.base, 0.5) },
DiffChange = { bg = p.overlay },
DiffDelete = { bg = blend(groups.git_delete, p.base, 0.5) },
DiffText = { bg = blend(groups.git_text, p.base, 0.5) },
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 },
FoldColumn = { fg = p.muted },
Folded = { fg = p.text, bg = p.surface },
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.love, 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 = p.base },
StatusLineTerm = { link = 'StatusLine' },
StatusLineTermNC = { link = 'StatusLineNC' },
TabLine = { fg = p.subtle, bg = p.surface },
TabLineFill = { bg = p.surface },
TabLineSel = { fg = p.text, bg = p.overlay },
Title = { fg = p.text },
VertSplit = { fg = p.overlay, bg = styles.vert_split },
Visual = { bg = p.highlight_med },
-- VisualNOS = {},
WarningMsg = { fg = p.gold },
-- Whitespace = {},
-- WildMenu = {},
Boolean = { fg = p.rose },
Character = { fg = p.gold },
Comment = { fg = groups.comment, style = styles.italic },
Conditional = { fg = p.pine },
Constant = { fg = p.gold },
Debug = { fg = p.rose },
Define = { fg = p.iris },
Delimiter = { fg = p.subtle },
Error = { fg = p.love },
Exception = { fg = p.pine },
Float = { fg = p.gold },
Function = { fg = p.rose },
Identifier = { fg = p.rose },
-- Ignore = {},
Include = { fg = p.iris },
Keyword = { fg = p.pine },
Label = { fg = p.foam },
Macro = { fg = p.iris },
Number = { fg = p.gold },
Operator = { fg = p.subtle },
PreCondit = { fg = p.iris },
PreProc = { fg = p.iris },
Repeat = { fg = p.pine },
Special = { fg = p.rose },
SpecialChar = { fg = p.rose },
SpecialComment = { fg = p.iris },
Statement = { fg = p.pine },
StorageClass = { fg = p.foam },
String = { fg = p.gold },
Structure = { fg = p.foam },
Tag = { fg = p.rose },
Todo = { fg = p.iris },
Type = { fg = p.foam },
Typedef = { fg = p.foam },
Underlined = { style = 'underline' },
htmlArg = { fg = p.iris },
htmlBold = { style = 'bold' },
htmlEndTag = { fg = p.subtle },
htmlH1 = { fg = groups.headings.h1, style = 'bold' },
htmlH2 = { fg = groups.headings.h2, style = 'bold' },
htmlH3 = { fg = groups.headings.h3, style = 'bold' },
htmlH4 = { fg = groups.headings.h4, style = 'bold' },
htmlH5 = { fg = groups.headings.h5, style = 'bold' },
htmlItalic = { style = styles.italic },
htmlLink = { fg = groups.link },
htmlTag = { fg = p.subtle },
htmlTagN = { fg = p.text },
htmlTagName = { fg = p.foam },
markdownDelimiter = { fg = p.subtle },
markdownH1 = { fg = groups.headings.h1, style = 'bold' },
markdownH1Delimiter = { link = 'markdownH1' },
markdownH2 = { fg = groups.headings.h2, style = 'bold' },
markdownH2Delimiter = { link = 'markdownH2' },
markdownH3 = { fg = groups.headings.h3, style = 'bold' },
markdownH3Delimiter = { link = 'markdownH3' },
markdownH4 = { fg = groups.headings.h4, style = 'bold' },
markdownH4Delimiter = { link = 'markdownH4' },
markdownH5 = { fg = groups.headings.h5, style = 'bold' },
markdownH5Delimiter = { link = 'markdownH5' },
markdownH6 = { fg = groups.headings.h6, style = 'bold' },
markdownH6Delimiter = { link = 'markdownH6' },
markdownLinkText = { fg = groups.link, style = 'underline' },
markdownUrl = { link = 'markdownLinkText' },
mkdCode = { fg = p.foam, style = styles.italic },
mkdCodeDelimiter = { fg = p.rose },
mkdCodeEnd = { fg = p.foam },
mkdCodeStart = { fg = p.foam },
mkdFootnotes = { fg = p.foam },
mkdID = { fg = p.foam, style = 'underline' },
mkdInlineURL = { fg = groups.link, style = 'underline' },
mkdLink = { link = 'mkdInlineURL' },
mkdLinkDef = { link = 'mkdInlineURL' },
mkdListItemLine = { fg = p.text },
mkdRule = { fg = p.subtle },
mkdURL = { link = 'mkdInlineURL' },
DiagnosticError = { fg = groups.error },
DiagnosticHint = { fg = groups.hint },
DiagnosticInfo = { fg = groups.info },
DiagnosticWarn = { fg = groups.warn },
DiagnosticDefaultError = { fg = groups.error },
DiagnosticDefaultHint = { fg = groups.hint },
DiagnosticDefaultInfo = { fg = groups.info },
DiagnosticDefaultWarn = { fg = groups.warn },
DiagnosticFloatingError = { fg = groups.error },
DiagnosticFloatingHint = { fg = groups.hint },
DiagnosticFloatingInfo = { fg = groups.info },
DiagnosticFloatingWarn = { fg = groups.warn },
DiagnosticSignError = { fg = groups.error },
DiagnosticSignHint = { fg = groups.hint },
DiagnosticSignInfo = { fg = groups.info },
DiagnosticSignWarn = { fg = groups.warn },
DiagnosticStatusLineError = { fg = groups.error, bg = p.surface },
DiagnosticStatusLineHint = { fg = groups.hint, bg = p.surface },
DiagnosticStatusLineInfo = { fg = groups.info, bg = p.surface },
DiagnosticStatusLineWarn = { fg = groups.warn, bg = p.surface },
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 },
-- TSAttribute = {},
TSBoolean = { link = 'Boolean' },
TSCharacter = { link = 'Character' },
TSComment = { link = 'Comment' },
TSConditional = { link = 'Conditional' },
TSConstBuiltin = { fg = p.love },
-- TSConstMacro = {},
TSConstant = { fg = p.foam },
TSConstructor = { fg = p.foam },
-- TSEmphasis = {},
-- TSError = {},
-- TSException = {},
TSField = { fg = p.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 },
-- romgrk/barbar.nvim
BufferCurrent = { fg = p.text, bg = p.overlay },
BufferCurrentIndex = { fg = p.text, bg = p.overlay },
BufferCurrentMod = { fg = p.foam, bg = p.overlay },
BufferCurrentSign = { fg = p.subtle, bg = p.overlay },
BufferCurrentTarget = { fg = p.gold, bg = p.overlay },
BufferInactive = { fg = p.subtle },
BufferInactiveIndex = { fg = p.subtle },
BufferInactiveMod = { fg = p.foam },
BufferInactiveSign = { fg = p.muted },
BufferInactiveTarget = { fg = p.gold },
BufferTabpageFill = { fg = p.base, bg = p.base },
BufferVisible = { fg = p.subtle },
BufferVisibleIndex = { fg = p.subtle },
BufferVisibleMod = { fg = p.foam },
BufferVisibleSign = { fg = p.muted },
BufferVisibleTarget = { fg = p.gold },
-- lewis6991/gitsigns.nvim
GitSignsAdd = { fg = groups.git_add },
GitSignsChange = { fg = groups.git_change },
GitSignsDelete = { fg = groups.git_delete },
SignAdd = { link = 'GitSignsAdd' },
SignChange = { link = 'GitSignsChange' },
SignDelete = { link = 'GitSignsDelete' },
-- mvllow/modes.nvim
ModesCopy = { bg = p.gold },
ModesDelete = { bg = p.love },
ModesInsert = { bg = p.foam },
ModesVisual = { bg = p.iris },
-- kyazdani42/nvim-tree.lua
NvimTreeEmptyFolderName = { fg = p.muted },
NvimTreeFileDeleted = { fg = p.love },
NvimTreeFileDirty = { fg = p.rose },
NvimTreeFileMerge = { fg = p.iris },
NvimTreeFileNew = { fg = p.foam },
NvimTreeFileRenamed = { fg = p.pine },
NvimTreeFileStaged = { fg = p.iris },
NvimTreeFolderIcon = { fg = p.subtle },
NvimTreeFolderName = { fg = p.foam },
NvimTreeGitDeleted = { fg = groups.git_delete },
NvimTreeGitDirty = { fg = groups.git_dirty },
NvimTreeGitIgnored = { fg = groups.git_ignore },
NvimTreeGitMerge = { fg = groups.git_merge },
NvimTreeGitNew = { fg = groups.git_add },
NvimTreeGitRenamed = { fg = groups.git_rename },
NvimTreeGitStaged = { fg = groups.git_stage },
NvimTreeImageFile = { fg = p.text },
NvimTreeNormal = { fg = p.text },
NvimTreeOpenedFile = { fg = p.text, bg = p.highlight_med },
NvimTreeOpenedFolderName = { fg = p.foam },
NvimTreeRootFolder = { fg = p.iris },
NvimTreeSpecialFile = { link = 'NvimTreeNormal' },
NvimTreeWindowPicker = { fg = p.base, bg = p.iris },
-- folke/which-key.nvim
WhichKey = { fg = p.iris },
WhichKeyGroup = { fg = p.foam },
WhichKeySeparator = { fg = p.subtle },
WhichKeyDesc = { fg = p.gold },
WhichKeyFloat = { bg = p.surface },
WhichKeyValue = { fg = p.rose },
-- luka-reineke/indent-blankline.nvim
IndentBlanklineChar = { fg = p.muted },
-- hrsh7th/nvim-cmp
CmpItemAbbr = { fg = p.subtle },
CmpItemAbbrDeprecated = { fg = p.subtle, style = 'strikethrough' },
CmpItemAbbrMatch = { fg = p.text, style = 'bold' },
CmpItemAbbrMatchFuzzy = { fg = p.text, style = 'bold' },
CmpItemKind = { fg = p.iris },
CmpItemKindClass = { fg = p.gold },
CmpItemKindFunction = { fg = p.iris },
CmpItemKindInterface = { fg = p.gold },
CmpItemKindMethod = { fg = p.iris },
CmpItemKindSnippet = { fg = p.iris },
CmpItemKindVariable = { fg = p.foam },
-- TimUntersberger/neogit
NeogitDiffAddHighlight = { fg = p.foam, bg = p.highlight_med },
NeogitDiffContextHighlight = { bg = p.highlight_low },
NeogitDiffDeleteHighlight = { fg = p.love, bg = p.highlight_med },
NeogitHunkHeader = { bg = p.highlight_low },
NeogitHunkHeaderHighlight = { bg = p.highlight_low },
-- vimwiki/vimwiki
VimwikiHR = { fg = p.subtle },
VimwikiHeader1 = { fg = groups.headings.h1, style = 'bold' },
VimwikiHeader2 = { fg = groups.headings.h2, style = 'bold' },
VimwikiHeader3 = { fg = groups.headings.h3, style = 'bold' },
VimwikiHeader4 = { fg = groups.headings.h4, style = 'bold' },
VimwikiHeader5 = { fg = groups.headings.h5, style = 'bold' },
VimwikiHeader6 = { fg = groups.headings.h6, style = 'bold' },
VimwikiHeaderChar = { fg = p.pine },
VimwikiLink = { fg = groups.link, style = 'underline' },
VimwikiList = { fg = p.iris },
VimwikiNoExistsLink = { fg = p.love },
-- nvim-neorg/neorg
NeorgHeading1Prefix = { fg = groups.headings.h1, style = 'bold' },
NeorgHeading1Title = { link = 'NeorgHeading1Prefix' },
NeorgHeading2Prefix = { fg = groups.headings.h2, style = 'bold' },
NeorgHeading2Title = { link = 'NeorgHeading2Prefix' },
NeorgHeading3Prefix = { fg = groups.headings.h3, style = 'bold' },
NeorgHeading3Title = { link = 'NeorgHeading3Prefix' },
NeorgHeading4Prefix = { fg = groups.headings.h4, style = 'bold' },
NeorgHeading4Title = { link = 'NeorgHeading4Prefix' },
NeorgHeading5Prefix = { fg = groups.headings.h5, style = 'bold' },
NeorgHeading5Title = { link = 'NeorgHeading5Prefix' },
NeorgHeading6Prefix = { fg = groups.headings.h6, style = 'bold' },
NeorgHeading6Title = { link = 'NeorgHeading6Prefix' },
NeorgMarkerTitle = { fg = p.text, style = 'bold' },
-- tami5/lspsaga.nvim (fork of glepnir/lspsaga.nvim)
DefinitionCount = { fg = p.rose },
DefinitionIcon = { fg = p.rose },
DefintionPreviewTitle = { fg = p.rose, style = 'bold' },
LspFloatWinBorder = { fg = groups.border },
LspFloatWinNormal = { bg = p.base },
LspSagaAutoPreview = { fg = p.subtle },
LspSagaCodeActionBorder = { fg = groups.border },
LspSagaCodeActionContent = { fg = p.foam },
LspSagaCodeActionTitle = { fg = p.gold, style = 'bold' },
LspSagaCodeActionTruncateLine = { link = 'LspSagaCodeActionBorder' },
LspSagaDefPreviewBorder = { fg = groups.border },
LspSagaDiagnosticBorder = { fg = groups.border },
LspSagaDiagnosticHeader = { fg = p.gold, style = 'bold' },
LspSagaDiagnosticTruncateLine = { link = 'LspSagaDiagnosticBorder' },
LspSagaDocTruncateLine = { link = 'LspSagaHoverBorder' },
LspSagaFinderSelection = { fg = p.gold },
LspSagaHoverBorder = { fg = groups.border },
LspSagaLspFinderBorder = { fg = groups.border },
LspSagaRenameBorder = { fg = p.pine },
LspSagaRenamePromptPrefix = { fg = p.love },
LspSagaShTruncateLine = { link = 'LspSagaSignatureHelpBorder' },
LspSagaSignatureHelpBorder = { fg = p.pine },
ReferencesCount = { fg = p.rose },
ReferencesIcon = { fg = p.rose },
SagaShadow = { bg = p.overlay },
TargetWord = { fg = p.iris },
-- ray-x/lsp_signature.nvim
LspSignatureActiveParameter = { bg = p.overlay },
-- rlane/pounce.nvim
PounceAccept = { fg = p.love, bg = p.highlight_high },
PounceAcceptBest = { fg = p.base, bg = p.gold },
PounceGap = { link = 'Search' },
PounceMatch = { link = 'Search' },
-- nvim-telescope/telescope.nvim
TelescopeBorder = { fg = groups.border },
TelescopeMatching = { fg = p.rose },
TelescopeNormal = { fg = p.subtle },
TelescopePromptNormal = { fg = p.text },
TelescopePromptPrefix = { fg = p.subtle },
TelescopeSelection = { fg = p.text, bg = p.overlay },
TelescopeSelectionCaret = { fg = p.rose, bg = p.overlay },
TelescopeTitle = { fg = p.subtle },
}
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
return theme
end
local background = palette.base
if config.disable_background then
background = palette.none
end
local float_background = palette.surface
if config.disable_float_background then
float_background = palette.none
end
local inactive_background = palette.none
if config.inactive_background then
inactive_background = util.blend('#000000', palette.base, palette.opacity)
end
local vert_split_background = palette.none
if config.bold_vertical_split_line then
vert_split_background = palette.overlay
end
local theme = {
ColorColumn = { bg = palette.highlight_high },
Conceal = { bg = palette.none },
-- Cursor = {},
CursorColumn = { bg = palette.highlight_low },
-- CursorIM = {},
CursorLine = { bg = palette.highlight_low },
CursorLineNr = { fg = palette.text },
DarkenedPanel = { bg = palette.surface },
DarkenedStatusline = { bg = palette.surface },
DiffAdd = { bg = util.blend(group.git_add, palette.base, 0.5) },
DiffChange = { bg = palette.overlay },
DiffDelete = { bg = util.blend(group.git_delete, palette.base, 0.5) },
DiffText = { bg = util.blend(group.git_text, palette.base, 0.5) },
diffAdded = { link = 'DiffAdd' },
diffChanged = { link = 'DiffChange' },
diffRemoved = { link = 'DiffDelete' },
Directory = { fg = palette.foam, bg = palette.none },
-- EndOfBuffer = {},
ErrorMsg = { fg = palette.love, style = 'bold' },
FloatBorder = { fg = group.border },
FoldColumn = { fg = palette.muted },
Folded = { fg = palette.text, bg = palette.surface },
IncSearch = { fg = palette.base, bg = palette.rose },
LineNr = { fg = palette.muted },
MatchParen = { fg = palette.text, bg = palette.highlight_med },
ModeMsg = { fg = palette.subtle },
MoreMsg = { fg = palette.iris },
NonText = { fg = palette.muted },
Normal = { fg = palette.text, bg = background },
NormalFloat = { fg = palette.text, bg = float_background },
NormalNC = { fg = palette.text, bg = inactive_background },
NvimInternalError = { fg = '#ffffff', bg = palette.love },
Pmenu = { fg = palette.subtle, bg = float_background },
PmenuSbar = { bg = palette.highlight_low },
PmenuSel = { fg = palette.text, bg = palette.overlay },
PmenuThumb = { bg = palette.highlight_med },
Question = { fg = palette.gold },
-- QuickFixLine = {},
-- RedrawDebugNormal = {}
RedrawDebugClear = { fg = '#ffffff', bg = palette.gold },
RedrawDebugComposed = { fg = '#ffffff', bg = palette.pine },
RedrawDebugRecompose = { fg = '#ffffff', bg = palette.love },
Search = { bg = palette.highlight_med },
SpecialKey = { fg = palette.foam },
SpellBad = { sp = palette.love, style = 'undercurl' },
SpellCap = { sp = palette.subtle, style = 'undercurl' },
SpellLocal = { sp = palette.subtle, style = 'undercurl' },
SpellRare = { sp = palette.subtle, style = 'undercurl' },
SignColumn = { fg = palette.text, bg = background },
StatusLine = { fg = palette.subtle, bg = palette.surface },
StatusLineNC = { fg = palette.muted, bg = palette.base },
StatusLineTerm = { link = 'StatusLine' },
StatusLineTermNC = { link = 'StatusLineNC' },
TabLine = { fg = palette.subtle, bg = palette.surface },
TabLineFill = { bg = palette.surface },
TabLineSel = { fg = palette.text, bg = palette.overlay },
Title = { fg = palette.text },
VertSplit = { fg = palette.overlay, bg = vert_split_background },
Visual = { bg = palette.highlight_med },
-- VisualNOS = {},
WarningMsg = { fg = palette.gold },
-- Whitespace = {},
-- WildMenu = {},
Boolean = { fg = palette.rose },
Character = { fg = palette.gold },
Comment = { fg = group.comment, style = maybe_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.rose },
-- Ignore = {},
Include = { fg = palette.iris },
Keyword = { fg = palette.pine },
Label = { fg = palette.foam },
Macro = { fg = palette.iris },
Number = { fg = palette.gold },
Operator = { fg = palette.subtle },
PreCondit = { fg = palette.iris },
PreProc = { fg = palette.iris },
Repeat = { fg = palette.pine },
Special = { fg = palette.rose },
SpecialChar = { fg = palette.rose },
SpecialComment = { fg = palette.iris },
Statement = { fg = palette.pine },
StorageClass = { fg = palette.foam },
String = { fg = palette.gold },
Structure = { fg = palette.foam },
Tag = { fg = palette.rose },
Todo = { fg = palette.iris },
Type = { fg = palette.foam },
Typedef = { fg = palette.foam },
Underlined = { style = 'underline' },
htmlArg = { fg = palette.iris },
htmlBold = { style = 'bold' },
htmlEndTag = { fg = palette.subtle },
htmlH1 = { fg = group.headings.h1, style = 'bold' },
htmlH2 = { fg = group.headings.h2, style = 'bold' },
htmlH3 = { fg = group.headings.h3, style = 'bold' },
htmlH4 = { fg = group.headings.h4, style = 'bold' },
htmlH5 = { fg = group.headings.h5, style = 'bold' },
htmlItalic = { style = maybe_italic },
htmlLink = { fg = group.link },
htmlTag = { fg = palette.subtle },
htmlTagN = { fg = palette.text },
htmlTagName = { fg = palette.foam },
markdownDelimiter = { fg = palette.subtle },
markdownH1 = { fg = group.headings.h1, style = 'bold' },
markdownH1Delimiter = { link = 'markdownH1' },
markdownH2 = { fg = group.headings.h2, style = 'bold' },
markdownH2Delimiter = { link = 'markdownH2' },
markdownH3 = { fg = group.headings.h3, style = 'bold' },
markdownH3Delimiter = { link = 'markdownH3' },
markdownH4 = { fg = group.headings.h4, style = 'bold' },
markdownH4Delimiter = { link = 'markdownH4' },
markdownH5 = { fg = group.headings.h5, style = 'bold' },
markdownH5Delimiter = { link = 'markdownH5' },
markdownH6 = { fg = group.headings.h6, style = 'bold' },
markdownH6Delimiter = { link = 'markdownH6' },
markdownLinkText = { fg = group.link, style = 'underline' },
markdownUrl = { link = 'markdownLinkText' },
mkdCode = { fg = palette.foam, style = maybe_italic },
mkdCodeDelimiter = { fg = palette.rose },
mkdCodeEnd = { fg = palette.foam },
mkdCodeStart = { fg = palette.foam },
mkdFootnotes = { fg = palette.foam },
mkdID = { fg = palette.foam, style = 'underline' },
mkdInlineURL = { fg = group.link, style = 'underline' },
mkdLink = { link = 'mkdInlineURL' },
mkdLinkDef = { link = 'mkdInlineURL' },
mkdListItemLine = { fg = palette.text },
mkdRule = { fg = palette.subtle },
mkdURL = { link = 'mkdInlineURL' },
DiagnosticError = { fg = group.error },
DiagnosticHint = { fg = group.hint },
DiagnosticInfo = { fg = group.info },
DiagnosticWarn = { fg = group.warn },
DiagnosticDefaultError = { fg = group.error },
DiagnosticDefaultHint = { fg = group.hint },
DiagnosticDefaultInfo = { fg = group.info },
DiagnosticDefaultWarn = { fg = group.warn },
DiagnosticFloatingError = { fg = group.error },
DiagnosticFloatingHint = { fg = group.hint },
DiagnosticFloatingInfo = { fg = group.info },
DiagnosticFloatingWarn = { fg = group.warn },
DiagnosticSignError = { fg = group.error },
DiagnosticSignHint = { fg = group.hint },
DiagnosticSignInfo = { fg = group.info },
DiagnosticSignWarn = { fg = group.warn },
DiagnosticUnderlineError = { sp = group.error, style = 'undercurl' },
DiagnosticUnderlineHint = { sp = group.hint, style = 'undercurl' },
DiagnosticUnderlineInfo = { sp = group.info, style = 'undercurl' },
DiagnosticUnderlineWarn = { sp = group.warn, style = 'undercurl' },
DiagnosticVirtualTextError = { fg = group.error },
DiagnosticVirtualTextHint = { fg = group.hint },
DiagnosticVirtualTextInfo = { fg = group.info },
DiagnosticVirtualTextWarn = { fg = group.warn },
LspReferenceText = { fg = palette.rose, bg = palette.highlight_med },
LspReferenceRead = { fg = palette.rose, bg = palette.highlight_med },
LspReferenceWrite = { fg = palette.rose, bg = palette.highlight_med },
-- TODO: Deprecate in favour of 0.6.0 groups
LspDiagnosticsSignWarning = { link = 'DiagnosticSignWarn' },
LspDiagnosticsDefaultWarning = { link = 'DiagnosticDefaultWarn' },
LspDiagnosticsFloatingWarning = { link = 'DiagnosticFloatingWarn' },
LspDiagnosticsVirtualTextWarning = { link = 'DiagnosticVirtualTextWarn' },
LspDiagnosticsUnderlineWarning = { link = 'DiagnosticUnderlineWarn' },
LspDiagnosticsSignHint = { link = 'DiagnosticSignHint' },
LspDiagnosticsDefaultHint = { link = 'DiagnosticDefaultHint' },
LspDiagnosticsVirtualTextHint = { link = 'DiagnosticFloatingHint' },
LspDiagnosticsFloatingHint = { link = 'DiagnosticVirtualTextHint' },
LspDiagnosticsUnderlineHint = { link = 'DiagnosticUnderlineHint' },
LspDiagnosticsSignError = { link = 'DiagnosticSignError' },
LspDiagnosticsDefaultError = { link = 'DiagnosticDefaultError' },
LspDiagnosticsFloatingError = { link = 'DiagnosticFloatingError' },
LspDiagnosticsVirtualTextError = { link = 'DiagnosticVirtualTextError' },
LspDiagnosticsUnderlineError = { link = 'DiagnosticUnderlineError' },
LspDiagnosticsSignInformation = { link = 'DiagnosticSignInfo' },
LspDiagnosticsDefaultInformation = { link = 'DiagnosticDefaultInfo' },
LspDiagnosticsFloatingInformation = { link = 'DiagnosticFloatingInfo' },
LspDiagnosticsVirtualTextInformation = { link = 'DiagnosticVirtualTextInfo' },
LspDiagnosticsUnderlineInformation = { link = 'DiagnosticUnderlineInfo' },
-- TSAttribute = {},
TSBoolean = { link = 'Boolean' },
TSCharacter = { link = 'Character' },
TSComment = { link = 'Comment' },
TSConditional = { link = 'Conditional' },
TSConstBuiltin = { fg = palette.love },
-- TSConstMacro = {},
TSConstant = { fg = palette.foam },
TSConstructor = { fg = palette.foam },
-- TSEmphasis = {},
-- TSError = {},
-- TSException = {},
TSField = { fg = palette.foam },
-- TSFloat = {},
TSFuncBuiltin = { fg = palette.love },
-- TSFuncMacro = {},
TSFunction = { fg = palette.rose },
TSInclude = { fg = palette.pine },
TSKeyword = { fg = palette.pine },
-- TSKeywordFunction = {},
TSKeywordOperator = { fg = palette.subtle },
TSLabel = { fg = palette.foam },
-- TSLiteral = {},
-- TSMethod = {},
-- TSNamespace = {},
-- TSNone = {},
TSNumber = { link = 'Number' },
TSOperator = { fg = palette.subtle },
TSParameter = { fg = palette.iris, style = maybe_italic },
-- TSParameterReference = {},
TSProperty = { fg = palette.iris, style = maybe_italic },
TSPunctBracket = { fg = group.punctuation },
TSPunctDelimiter = { fg = group.punctuation },
TSPunctSpecial = { fg = group.punctuation },
-- TSRepeat = {},
-- TSStrike = {},
TSString = { link = 'String' },
TSStringEscape = { fg = palette.pine },
-- TSStringRegex = {},
TSStringSpecial = { link = 'TSString' },
-- TSSymbol = {},
TSTag = { fg = palette.foam },
TSTagDelimiter = { fg = palette.subtle },
TSText = { fg = palette.text },
TSTitle = { fg = group.headings.h1, style = 'bold' },
TSType = { link = 'Type' },
-- TSTypeBuiltin = {},
TSURI = { fg = group.link },
-- TSUnderline = {},
TSVariable = { fg = palette.text, style = maybe_italic },
TSVariableBuiltin = { fg = palette.love },
-- 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 = palette.base, bg = palette.base },
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 = group.git_add },
GitSignsChange = { fg = group.git_change },
GitSignsDelete = { fg = group.git_delete },
SignAdd = { link = 'GitSignsAdd' },
SignChange = { link = 'GitSignsChange' },
SignDelete = { link = 'GitSignsDelete' },
-- mvllow/modes.nvim
ModesCopy = { bg = palette.gold },
ModesDelete = { bg = palette.love },
ModesInsert = { bg = palette.foam },
ModesVisual = { bg = palette.iris },
-- kyazdani42/nvim-tree.lua
NvimTreeEmptyFolderName = { fg = palette.muted },
NvimTreeFileDeleted = { fg = palette.love },
NvimTreeFileDirty = { fg = palette.rose },
NvimTreeFileMerge = { fg = palette.iris },
NvimTreeFileNew = { fg = palette.foam },
NvimTreeFileRenamed = { fg = palette.pine },
NvimTreeFileStaged = { fg = palette.iris },
NvimTreeFolderIcon = { fg = palette.subtle },
NvimTreeFolderName = { fg = palette.foam },
NvimTreeGitDeleted = { fg = group.git_delete },
NvimTreeGitDirty = { fg = group.git_dirty },
NvimTreeGitIgnored = { fg = group.git_ignore },
NvimTreeGitMerge = { fg = group.git_merge },
NvimTreeGitNew = { fg = group.git_add },
NvimTreeGitRenamed = { fg = group.git_rename },
NvimTreeGitStaged = { fg = group.git_stage },
NvimTreeImageFile = { fg = palette.text },
NvimTreeNormal = { fg = palette.text },
NvimTreeOpenedFile = { fg = palette.text, bg = palette.highlight_med },
NvimTreeOpenedFolderName = { fg = palette.foam },
NvimTreeRootFolder = { fg = palette.iris },
NvimTreeSpecialFile = { link = 'NvimTreeNormal' },
NvimTreeWindowPicker = { fg = palette.base, bg = palette.iris },
-- folke/which-key.nvim
WhichKey = { fg = palette.iris },
WhichKeyGroup = { fg = palette.foam },
WhichKeySeparator = { fg = palette.subtle },
WhichKeyDesc = { fg = palette.gold },
WhichKeyFloat = { bg = palette.surface },
WhichKeyValue = { fg = palette.rose },
-- luka-reineke/indent-blankline.nvim
IndentBlanklineChar = { fg = palette.muted },
-- hrsh7th/nvim-cmp
CmpItemAbbr = { fg = palette.subtle },
CmpItemAbbrDeprecated = { fg = palette.subtle, style = 'strikethrough' },
CmpItemAbbrMatch = { fg = palette.text, style = 'bold' },
CmpItemAbbrMatchFuzzy = { fg = palette.text, style = 'bold' },
CmpItemKind = { fg = palette.iris },
CmpItemKindClass = { fg = palette.gold },
CmpItemKindFunction = { fg = palette.iris },
CmpItemKindInterface = { fg = palette.gold },
CmpItemKindMethod = { fg = palette.iris },
CmpItemKindSnippet = { fg = palette.iris },
CmpItemKindVariable = { fg = palette.foam },
-- TimUntersberger/neogit
NeogitDiffAddHighlight = { fg = palette.foam, bg = palette.highlight_med },
NeogitDiffContextHighlight = { bg = palette.highlight_low },
NeogitDiffDeleteHighlight = { fg = palette.love, bg = palette.highlight_med },
NeogitHunkHeader = { bg = palette.highlight_low },
NeogitHunkHeaderHighlight = { bg = palette.highlight_low },
-- vimwiki/vimwiki
VimwikiHR = { fg = palette.subtle },
VimwikiHeader1 = { fg = group.headings.h1, style = 'bold' },
VimwikiHeader2 = { fg = group.headings.h2, style = 'bold' },
VimwikiHeader3 = { fg = group.headings.h3, style = 'bold' },
VimwikiHeader4 = { fg = group.headings.h4, style = 'bold' },
VimwikiHeader5 = { fg = group.headings.h5, style = 'bold' },
VimwikiHeader6 = { fg = group.headings.h6, style = 'bold' },
VimwikiHeaderChar = { fg = palette.pine },
VimwikiLink = { fg = group.link, style = 'underline' },
VimwikiList = { fg = palette.iris },
VimwikiNoExistsLink = { fg = palette.love },
-- nvim-neorg/neorg
NeorgHeading1Prefix = { fg = group.headings.h1, style = 'bold' },
NeorgHeading1Title = { link = 'NeorgHeading1Prefix' },
NeorgHeading2Prefix = { fg = group.headings.h2, style = 'bold' },
NeorgHeading2Title = { link = 'NeorgHeading2Prefix' },
NeorgHeading3Prefix = { fg = group.headings.h3, style = 'bold' },
NeorgHeading3Title = { link = 'NeorgHeading3Prefix' },
NeorgHeading4Prefix = { fg = group.headings.h4, style = 'bold' },
NeorgHeading4Title = { link = 'NeorgHeading4Prefix' },
NeorgHeading5Prefix = { fg = group.headings.h5, style = 'bold' },
NeorgHeading5Title = { link = 'NeorgHeading5Prefix' },
NeorgHeading6Prefix = { fg = group.headings.h6, style = 'bold' },
NeorgHeading6Title = { link = 'NeorgHeading6Prefix' },
NeorgMarkerTitle = { fg = palette.text, style = 'bold' },
-- tami5/lspsaga.nvim (fork of glepnir/lspsaga.nvim)
DefinitionCount = { fg = palette.rose },
DefinitionIcon = { fg = palette.rose },
DefintionPreviewTitle = { fg = palette.rose, style = 'bold' },
LspFloatWinBorder = { fg = group.border },
LspFloatWinNormal = { bg = palette.base },
LspSagaAutoPreview = { fg = palette.subtle },
LspSagaCodeActionBorder = { fg = group.border },
LspSagaCodeActionContent = { fg = palette.foam },
LspSagaCodeActionTitle = { fg = palette.gold, style = 'bold' },
LspSagaCodeActionTruncateLine = { link = 'LspSagaCodeActionBorder' },
LspSagaDefPreviewBorder = { fg = group.border },
LspSagaDiagnosticBorder = { fg = group.border },
LspSagaDiagnosticHeader = { fg = palette.gold, style = 'bold' },
LspSagaDiagnosticTruncateLine = { link = 'LspSagaDiagnosticBorder' },
LspSagaDocTruncateLine = { link = 'LspSagaHoverBorder' },
LspSagaFinderSelection = { fg = palette.gold },
LspSagaHoverBorder = { fg = group.border },
LspSagaLspFinderBorder = { fg = group.border },
LspSagaRenameBorder = { fg = palette.pine },
LspSagaRenamePromptPrefix = { fg = palette.love },
LspSagaShTruncateLine = { link = 'LspSagaSignatureHelpBorder' },
LspSagaSignatureHelpBorder = { fg = palette.pine },
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.highlight_high },
PounceAcceptBest = { fg = palette.base, bg = palette.gold },
PounceGap = { link = 'Search' },
PounceMatch = { link = 'Search' },
-- nvim-telescope/telescope.nvim
TelescopeBorder = { fg = group.border },
TelescopeMatching = { fg = palette.rose },
TelescopeNormal = { fg = palette.subtle },
TelescopePromptNormal = { fg = palette.text },
TelescopePromptPrefix = { fg = palette.subtle },
TelescopeSelection = { fg = palette.text, bg = palette.overlay },
TelescopeSelectionCaret = { fg = palette.rose, bg = palette.overlay },
TelescopeTitle = { fg = palette.subtle },
-- rcarriga/nvim-notify
NotifyINFOBorder = { fg = palette.foam },
NotifyINFOTitle = { link = 'NotifyINFOBorder' },
NotifyINFOIcon = { link = 'NotifyINFOBorder' },
NotifyWARNBorder = { fg = palette.gold },
NotifyWARNTitle = { link = 'NotifyWARNBorder' },
NotifyWARNIcon = { link = 'NotifyWARNBorder' },
NotifyDEBUGBorder = { fg = palette.muted },
NotifyDEBUGTitle = { link = 'NotifyDEBUGBorder' },
NotifyDEBUGIcon = { link = 'NotifyDEBUGBorder' },
NotifyTRACEBorder = { fg = palette.iris },
NotifyTRACETitle = { link = 'NotifyTRACEBorder' },
NotifyTRACEIcon = { link = 'NotifyTRACEBorder' },
NotifyERRORBorder = { fg = palette.love },
NotifyERRORTitle = { link = 'NotifyERRORBorder' },
NotifyERRORIcon = { link = 'NotifyERRORBorder' },
}
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
return theme
return M

View file

@ -17,7 +17,7 @@
use({
'rose-pine/neovim',
as = 'rose-pine',
tag = 'v0.*',
tag = 'v1.*',
config = function()
vim.cmd('colorscheme rose-pine')
end
@ -47,7 +47,7 @@ use({
```lua
use({
'nvim-lualine/lualine.nvim',
-- Fix mismatch palette between variants
-- fix mismatch palette between variants
event = 'ColorScheme',
config = function()
require('lualine').setup({
@ -85,68 +85,43 @@ local colors = require("galaxyline.themes.colors")["rose-pine"]
> Options should be set **before** colorscheme
```lua
-- set theme variant, matching terminal theme if unset
-- @usage 'main' | 'moon' | 'dawn'
vim.g.rose_pine_variant = ''
require('rose-pine').setup({
---@usage 'main'|'moon'
dark_variant = 'main',
bold_vert_split = false,
dim_nc_background = false,
disable_background = false,
disable_float_background = false,
disable_italics = false,
---@usage string hex value or named color from rosepinetheme.com/palette
groups = {
border = 'highlight_med',
comment = 'muted',
link = 'iris',
punctuation = 'subtle',
vim.g.rose_pine_bold_vertical_split_line = false
vim.g.rose_pine_disable_background = false
vim.g.rose_pine_disable_float_background = false
vim.g.rose_pine_disable_italics = false
vim.g.rose_pine_inactive_background = false
error = 'love',
hint = 'iris',
info = 'foam',
warn = 'gold',
local palette = require('rose-pine.palette')
vim.g.rose_pine_colors = {
border = palette.highlight_med,
comment = palette.muted,
link = palette.iris,
punctuation = palette.subtle,
headings = {
h1 = 'iris',
h2 = 'foam',
h3 = 'rose',
h4 = 'gold',
h5 = 'pine',
h6 = 'foam',
}
-- or set all headings at once
-- headings = 'subtle'
}
})
error = palette.love,
hint = palette.iris,
info = palette.foam,
warn = palette.gold,
git_add = palette.foam,
git_change = palette.rose,
git_delete = palette.love,
git_dirty = palette.rose,
git_ignore = palette.muted,
git_merge = palette.iris,
git_rename = palette.pine,
git_stage = palette.iris,
git_text = palette.rose,
-- or set all headings to one colour: `headings = palette.text`
headings = {
h1 = palette.iris,
h2 = palette.foam,
h3 = palette.rose,
h4 = palette.gold,
h5 = palette.pine,
h6 = palette.foam,
},
}
-- Set colorscheme after options
-- set colorscheme after options
vim.cmd('colorscheme rose-pine')
```
## Suggested keymaps
```lua
-- toggle between all variants
vim.keymap.set('n', '<leader>tt', require('rose-pine').toggle)
-- or toggle between some variants
vim.keymap.set('n', '<leader>tt', function() return require('rose-pine').toggle({'moon', 'dawn'}) end)
-- set variant
vim.keymap.set('n', '<leader>t1', function() return require('rose-pine').set('main') end)
vim.keymap.set('n', '<leader>t2', function() return require('rose-pine').set('moon') end)
vim.keymap.set('n', '<leader>t3', function() return require('rose-pine').set('dawn') end)
```
## Contributing
We welcome and appreciate any help in creating a lovely experience for all.