Major Palette Changes

This commit is contained in:
Eric Xiao 2022-12-07 16:16:04 -08:00
commit 7fbba55cb2
6 changed files with 233 additions and 234 deletions

View file

@ -1,18 +1,18 @@
local p = require('rose-pine.palette')
local p = require("rose-pine.palette")
return {
normal = {
a = {bg = p.surface, fg = p.rose, gui = 'bold'},
a = {bg = p.surface, fg = p.rose, gui = "bold"},
b = {bg = p.surface, fg = p.text},
c = {bg = p.surface, fg = p.subtle, gui = 'italic'}
c = {bg = p.surface, fg = p.subtle, gui = "italic"}
},
insert = {a = {bg = p.surface, fg = p.foam, gui = 'bold'}},
visual = {a = {bg = p.surface, fg = p.iris, gui = 'bold'}},
replace = {a = {bg = p.surface, fg = p.pine, gui = 'bold'}},
command = {a = {bg = p.surface, fg = p.love, gui = 'bold'}},
insert = {a = {bg = p.surface, fg = p.foam, gui = "bold"}},
visual = {a = {bg = p.surface, fg = p.iris, gui = "bold"}},
replace = {a = {bg = p.surface, fg = p.sand, gui = "bold"}},
command = {a = {bg = p.surface, fg = p.love, gui = "bold"}},
inactive = {
a = {bg = p.base, fg = p.subtle, gui = 'bold'},
a = {bg = p.base, fg = p.subtle, gui = "bold"},
b = {bg = p.base, fg = p.subtle},
c = {bg = p.base, fg = p.subtle, gui = 'italic'}
c = {bg = p.base, fg = p.subtle, gui = "italic"}
}
}

View file

@ -1,33 +1,33 @@
local p = require('rose-pine.palette')
local p = require("rose-pine.palette")
return {
normal = {
a = {bg = p.rose, fg = p.base, gui = 'bold'},
a = {bg = p.rose, fg = p.base, gui = "bold"},
b = {bg = p.overlay, fg = p.rose},
c = {bg = p.base, fg = p.text}
},
insert = {
a = {bg = p.foam, fg = p.base, gui = 'bold'},
a = {bg = p.foam, fg = p.base, gui = "bold"},
b = {bg = p.overlay, fg = p.foam},
c = {bg = p.base, fg = p.text}
},
visual = {
a = {bg = p.iris, fg = p.base, gui = 'bold'},
a = {bg = p.iris, fg = p.base, gui = "bold"},
b = {bg = p.overlay, fg = p.iris},
c = {bg = p.base, fg = p.text}
},
replace = {
a = {bg = p.pine, fg = p.base, gui = 'bold'},
b = {bg = p.overlay, fg = p.pine},
a = {bg = p.sand, fg = p.base, gui = "bold"},
b = {bg = p.overlay, fg = p.sand},
c = {bg = p.base, fg = p.text}
},
command = {
a = {bg = p.cold, fg = p.base, gui = 'bold'},
a = {bg = p.sand, fg = p.base, gui = "bold"},
b = {bg = p.overlay, fg = p.love},
c = {bg = p.base, fg = p.text}
},
inactive = {
a = {bg = p.base, fg = p.muted, gui = 'bold'},
a = {bg = p.base, fg = p.muted, gui = "bold"},
b = {bg = p.base, fg = p.muted},
c = {bg = p.base, fg = p.muted}
}

View file

@ -1,4 +1,4 @@
local util = require('rose-pine.util')
local util = require("rose-pine.util")
local M = {}
@ -6,9 +6,9 @@ function M.colorscheme()
if vim.g.colors_name then vim.cmd('hi clear') end
vim.opt.termguicolors = true
vim.g.colors_name = 'rose-pine'
vim.g.colors_name = "rose-pine"
local theme = require('rose-pine.theme').get()
local theme = require("rose-pine.theme").get_theme()
-- Set theme highlights
for group, color in pairs(theme) do util.highlight(group, color) end

View file

@ -1,28 +1,28 @@
local palette = {
-- base = '#171524',
base = '#10101a',
surface = '#1f1d2e',
overlay = '#26233a',
muted = '#6e6a86',
subtle = '#908caa',
text = '#e0def4',
love = '#e89b9f',
ocean = '#a241d1',
blu = '#8487c7',
crimson = '#fa4678',
gold = '#f69957',
-- rose = '#ebbcba',
-- rose = '#ff79b1',
rose = '#ff82b4',
calm = '#23ff87',
pine = '#cd51d5',
foam = '#9ccfd8',
iris = '#c4a7e7',
cold = '#967de5',
highlight_low = '#21202e',
highlight_med = '#403d52',
highlight_high = '#524f67',
none = 'NONE'
-- base = "#10101a", -- dark dark blue
base = "#181722", -- idk
surface = "#1f1d2e", -- dark blue
overlay = "#26233a", -- dark blue
muted = "#6e6a86", -- gray?
subtle = "#908caa", -- gray?
text = "#e0def4", -- light light blue
-- text = "#dcdcd7", -- light light blue
love = "#e89b9f", -- red?
-- ocean = "#ee4d3c", -- purple?
ocean = "#b2b13c", -- purple?
blu = "#8487c7", -- ???
crimson = "#fa4678", -- red
gold = "#f69957",
rose = "#ff82b4",
calm = "#23ff87", -- green
sand = "#cecda7",
foam = "#7acfd8", -- turquoise
pink = "#ebb9bf", -- pink
iris = "#c4a7e7", --
highlight_low = "#21202e",
highlight_med = "#403d52",
highlight_high = "#524f67",
none = "NONE"
}
return palette

View file

@ -1,47 +1,47 @@
local blend = require('rose-pine.util').blend
local blend = require("rose-pine.util").blend
local M = {}
function M.get()
local p = require('rose-pine.palette')
function M.get_theme()
local p = require("rose-pine.palette")
local theme = {}
local groups = {
background = 'base',
panel = 'surface',
border = 'highlight_med',
comment = 'muted',
link = 'iris',
punctuation = 'muted',
background = "base",
panel = "surface",
border = "highlight_med",
comment = "muted",
link = "iris",
punctuation = "muted",
error = 'crimson',
hint = 'iris',
info = 'foam',
warn = 'gold',
error = "crimson",
hint = "foam",
info = "iris",
warn = "gold",
git_add = 'foam',
git_change = 'rose',
git_delete = 'crimson',
git_dirty = 'rose',
git_ignore = 'muted',
git_merge = 'iris',
git_rename = 'pine',
git_stage = 'iris',
git_text = 'rose',
git_add = "foam",
git_change = "rose",
git_delete = "crimson",
git_dirty = "rose",
git_ignore = "muted",
git_merge = "iris",
git_rename = "sand",
git_stage = "iris",
git_text = "rose",
headings = {
h1 = 'iris',
h2 = 'foam',
h3 = 'rose',
h4 = 'gold',
h5 = 'pine',
h6 = 'foam'
h1 = "iris",
h2 = "foam",
h3 = "rose",
h4 = "gold",
h5 = "sand",
h6 = "foam"
}
}
local styles = {
italic = 'italic',
bold = 'bold',
italic = "italic",
bold = "bold",
vert_split = p.none,
background = groups.background,
float_background = groups.panel
@ -51,7 +51,7 @@ function M.get()
theme = {
ColorColumn = {bg = p.overlay},
Conceal = {bg = p.none},
CurSearch = {link = 'IncSearch'},
CurSearch = {link = "IncSearch"},
-- Cursor = {},
CursorColumn = {bg = p.highlight_low},
-- CursorIM = {},
@ -63,9 +63,9 @@ function M.get()
DiffChange = {bg = p.overlay},
DiffDelete = {bg = blend(groups.git_delete, groups.background, 0.5)},
DiffText = {bg = blend(groups.git_text, groups.background, 0.5)},
diffAdded = {link = 'DiffAdd'},
diffChanged = {link = 'DiffChange'},
diffRemoved = {link = 'DiffDelete'},
diffAdded = {link = "DiffAdd"},
diffChanged = {link = "DiffChange"},
diffRemoved = {link = "DiffDelete"},
Directory = {fg = p.foam, bg = p.none},
-- EndOfBuffer = {},
ErrorMsg = {fg = p.crimson, style = styles.bold},
@ -74,7 +74,6 @@ function M.get()
FoldColumn = {fg = p.muted},
Folded = {fg = p.text, bg = groups.panel},
IncSearch = {fg = p.base, bg = p.rose},
-- LineNr = {fg = p.muted},
LineNr = {fg = p.subtle},
MatchParen = {fg = p.text, bg = p.highlight_med},
ModeMsg = {fg = p.subtle},
@ -83,7 +82,7 @@ function M.get()
Normal = {fg = p.text, bg = styles.background},
NormalFloat = {fg = p.text, bg = styles.float_background},
NormalNC = {fg = p.text, bg = styles.nc_background},
NvimInternalError = {fg = '#ffffff', bg = p.crimson},
NvimInternalError = {fg = "#ffffff", bg = p.crimson},
Pmenu = {fg = p.subtle, bg = styles.float_background},
PmenuSbar = {bg = p.highlight_low},
PmenuSel = {fg = p.text, bg = p.overlay},
@ -91,20 +90,20 @@ function M.get()
Question = {fg = p.gold},
-- QuickFixLine = {},
-- RedrawDebugNormal = {}
RedrawDebugClear = {fg = '#ffffff', bg = p.gold},
RedrawDebugComposed = {fg = '#ffffff', bg = p.pine},
RedrawDebugRecompose = {fg = '#ffffff', bg = p.crimson},
RedrawDebugClear = {fg = "#ffffff", bg = p.gold},
RedrawDebugComposed = {fg = "#ffffff", bg = p.sand},
RedrawDebugRecompose = {fg = "#ffffff", bg = p.crimson},
Search = {bg = p.highlight_med},
SpecialKey = {fg = p.foam},
SpellBad = {sp = p.subtle, style = 'undercurl'},
SpellCap = {sp = p.subtle, style = 'undercurl'},
SpellLocal = {sp = p.subtle, style = 'undercurl'},
SpellRare = {sp = p.subtle, style = 'undercurl'},
SpellBad = {sp = p.subtle, style = "undercurl"},
SpellCap = {sp = p.subtle, style = "undercurl"},
SpellLocal = {sp = p.subtle, style = "undercurl"},
SpellRare = {sp = p.subtle, style = "undercurl"},
SignColumn = {fg = p.text, bg = styles.background},
StatusLine = {fg = p.subtle, bg = styles.float_background},
StatusLineNC = {fg = p.muted, bg = styles.background},
StatusLineTerm = {link = 'StatusLine'},
StatusLineTermNC = {link = 'StatusLineNC'},
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},
@ -114,35 +113,35 @@ function M.get()
-- VisualNOS = {},
WarningMsg = {fg = p.gold},
-- Whitespace = {},
WildMenu = {link = 'IncSearch'},
WildMenu = {link = "IncSearch"},
Boolean = {fg = p.blu, style = styles.italic},
Character = {fg = p.gold},
Comment = {fg = groups.comment, style = styles.italic},
Conditional = {fg = p.pine},
Conditional = {fg = p.sand},
Constant = {fg = p.gold},
Debug = {fg = p.rose},
Define = {fg = p.iris},
Delimiter = {fg = p.subtle},
Error = {fg = p.crimson},
Exception = {fg = p.pine},
Exception = {fg = p.sand},
Float = {fg = p.gold},
Function = {fg = p.ocean},
Identifier = {fg = p.rose},
-- Ignore = {},
Include = {fg = p.iris},
Keyword = {fg = p.pine, style = styles.italic},
Keyword = {fg = p.sand, style = styles.italic},
Label = {fg = p.foam},
Macro = {fg = p.iris},
Number = {fg = p.gold},
Operator = {fg = p.subtle},
PreCondit = {fg = p.iris},
PreProc = {fg = p.iris},
Repeat = {fg = p.pine},
Repeat = {fg = p.sand},
Special = {fg = p.rose},
SpecialChar = {fg = p.rose},
SpecialComment = {fg = p.iris},
Statement = {fg = p.pine},
Statement = {fg = p.sand},
StorageClass = {fg = p.foam},
String = {fg = p.calm},
Structure = {fg = p.foam},
@ -150,7 +149,7 @@ function M.get()
Todo = {fg = p.iris},
Type = {fg = p.foam},
Typedef = {fg = p.foam},
Underlined = {style = 'underline'},
Underlined = {style = "underline"},
htmlArg = {fg = p.iris},
htmlBold = {style = styles.bold},
@ -168,32 +167,32 @@ function M.get()
markdownDelimiter = {fg = p.subtle},
markdownH1 = {fg = groups.headings.h1, style = styles.bold},
markdownH1Delimiter = {link = 'markdownH1'},
markdownH1Delimiter = {link = "markdownH1"},
markdownH2 = {fg = groups.headings.h2, style = styles.bold},
markdownH2Delimiter = {link = 'markdownH2'},
markdownH2Delimiter = {link = "markdownH2"},
markdownH3 = {fg = groups.headings.h3, style = styles.bold},
markdownH3Delimiter = {link = 'markdownH3'},
markdownH3Delimiter = {link = "markdownH3"},
markdownH4 = {fg = groups.headings.h4, style = styles.bold},
markdownH4Delimiter = {link = 'markdownH4'},
markdownH4Delimiter = {link = "markdownH4"},
markdownH5 = {fg = groups.headings.h5, style = styles.bold},
markdownH5Delimiter = {link = 'markdownH5'},
markdownH5Delimiter = {link = "markdownH5"},
markdownH6 = {fg = groups.headings.h6, style = styles.bold},
markdownH6Delimiter = {link = 'markdownH6'},
markdownLinkText = {fg = groups.link, style = 'underline'},
markdownUrl = {link = 'markdownLinkText'},
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'},
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'},
mkdURL = {link = "mkdInlineURL"},
DiagnosticError = {fg = groups.error},
DiagnosticHint = {fg = groups.hint},
@ -215,10 +214,10 @@ function M.get()
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'},
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},
@ -230,10 +229,10 @@ function M.get()
healthWarning = {fg = groups.warn},
-- TSAttribute = {},
TSBoolean = {link = 'Boolean'},
TSCharacter = {link = 'Character'},
TSComment = {link = 'Comment'},
TSConditional = {link = 'Conditional'},
TSBoolean = {link = "Boolean"},
TSCharacter = {link = "Character"},
TSComment = {link = "Comment"},
TSConditional = {link = "Conditional"},
TSConstBuiltin = {fg = p.love},
-- TSConstMacro = {},
TSConstant = {fg = p.foam},
@ -241,13 +240,13 @@ function M.get()
-- TSEmphasis = {},
-- TSError = {},
-- TSException = {},
TSField = {fg = p.foam},
TSField = {fg = p.pink},
-- TSFloat = {},
TSFuncBuiltin = {fg = p.love},
-- TSFuncMacro = {},
TSFunction = {fg = p.ocean},
TSInclude = {fg = p.pine},
TSKeyword = {fg = p.pine},
TSInclude = {fg = p.sand},
TSKeyword = {fg = p.sand},
-- TSKeywordFunction = {},
TSKeywordOperator = {fg = p.subtle},
TSLabel = {fg = p.foam},
@ -255,7 +254,7 @@ function M.get()
-- TSMethod = {},
-- TSNamespace = {},
-- TSNone = {},
TSNumber = {link = 'Number'},
TSNumber = {link = "Number"},
TSOperator = {fg = p.subtle},
TSParameter = {fg = p.iris, style = styles.italic},
-- TSParameterReference = {},
@ -265,16 +264,16 @@ function M.get()
TSPunctSpecial = {fg = groups.punctuation},
-- TSRepeat = {},
-- TSStrike = {},
TSString = {link = 'String'},
TSStringEscape = {fg = p.pine},
TSString = {link = "String"},
TSStringEscape = {fg = p.sand},
-- TSStringRegex = {},
TSStringSpecial = {link = 'TSString'},
TSStringSpecial = {link = "TSString"},
-- TSSymbol = {},
TSTag = {fg = p.foam},
TSTagDelimiter = {fg = p.subtle},
TSText = {fg = p.text},
TSTitle = {fg = groups.headings.h1, style = styles.bold},
TSType = {link = 'Type'},
TSType = {link = "Type"},
-- TSTypeBuiltin = {},
TSURI = {fg = groups.link},
-- TSUnderline = {},
@ -282,54 +281,54 @@ function M.get()
TSVariableBuiltin = {fg = p.love},
-- Treesitter
['@annotation'] = {link = 'PreProc'},
['@attribute'] = {link = 'PreProc'},
['@boolean'] = {link = 'TSBoolean'},
['@character'] = {link = 'TSCharacter'},
['@comment'] = {link = 'TSComment'},
['@conditional'] = {link = 'Conditional'},
['@constant'] = {link = 'TSConstant'},
['@constant.builtin'] = {link = 'TSConstBuiltin'},
['@constructor'] = {link = 'TSConstructor'},
['@field'] = {link = 'TSField'},
['@function'] = {link = 'TSFunction'},
['@function.builtin'] = {link = 'TSFuncBuiltin'},
['@include'] = {link = 'TSInclude'},
['@keyword'] = {link = 'TSKeyword'},
['@keyword.operator'] = {link = 'TSKeywordOperator'},
['@label'] = {link = 'TSLabel'},
['@namespace'] = {link = 'Include'},
['@number'] = {link = 'TSNumber'},
['@operator'] = {link = 'TSOperator'},
['@parameter'] = {link = 'TSParameter'},
['@property'] = {link = 'TSProperty'},
['@punctuation.bracket'] = {fg = groups.punctuation},
['@punctuation.delimiter'] = {fg = groups.punctuation},
['@punctuation.special'] = {fg = groups.punctuation},
['@string'] = {link = 'TSString'},
['@string.escape'] = {link = 'TSStringEscape'},
['@string.special'] = {link = 'TSStringSpecial'},
['@symbol'] = {link = 'Identifier'},
['@tag'] = {link = 'TSTag'},
['@tag.attribute'] = {link = '@property'},
['@tag.delimiter'] = {link = 'TSTagDelimiter'},
['@text'] = {link = 'TSText'},
['@text.strong'] = {bold = true},
['@text.emphasis'] = {italic = true},
['@text.underline'] = {underline = true},
['@text.strike'] = {strikethrough = true},
['@text.math'] = {link = 'Special'},
['@text.environment'] = {link = 'Macro'},
['@text.environment.name'] = {link = 'Type'},
['@text.title'] = {link = 'TSTitle'},
['@text.uri'] = {fg = groups.link},
['@text.note'] = {link = 'SpecialComment'},
['@text.warning'] = {link = 'Todo'},
['@text.danger'] = {link = 'WarningMsg'},
['@todo'] = {link = 'Todo'},
['@type'] = {link = 'Type'},
['@variable'] = {link = 'TSVariable'},
['@variable.builtin'] = {link = 'TSVariableBuiltin'},
["@annotation"] = {link = "PreProc"},
["@attribute"] = {link = "PreProc"},
["@boolean"] = {link = "TSBoolean"},
["@character"] = {link = "TSCharacter"},
["@comment"] = {link = "TSComment"},
["@conditional"] = {link = "Conditional"},
["@constant"] = {link = "TSConstant"},
["@constant.builtin"] = {link = "TSConstBuiltin"},
["@constructor"] = {link = "TSConstructor"},
["@field"] = {link = "TSField"},
["@function"] = {link = "TSFunction"},
["@function.builtin"] = {link = "TSFuncBuiltin"},
["@include"] = {link = "TSInclude"},
["@keyword"] = {link = "TSKeyword"},
["@keyword.operator"] = {link = "TSKeywordOperator"},
["@label"] = {link = "TSLabel"},
["@namespace"] = {link = "Include"},
["@number"] = {link = "TSNumber"},
["@operator"] = {link = "TSOperator"},
["@parameter"] = {link = "TSParameter"},
["@property"] = {link = "TSProperty"},
["@punctuation.bracket"] = {fg = groups.punctuation},
["@punctuation.delimiter"] = {fg = groups.punctuation},
["@punctuation.special"] = {fg = groups.punctuation},
["@string"] = {link = "TSString"},
["@string.escape"] = {link = "TSStringEscape"},
["@string.special"] = {link = "TSStringSpecial"},
["@symbol"] = {link = "Identifier"},
["@tag"] = {link = "TSTag"},
["@tag.attribute"] = {link = "@property"},
["@tag.delimiter"] = {link = "TSTagDelimiter"},
["@text"] = {link = "TSText"},
["@text.strong"] = {bold = true},
["@text.emphasis"] = {italic = true},
["@text.underline"] = {underline = true},
["@text.strike"] = {strikethrough = true},
["@text.math"] = {link = "Special"},
["@text.environment"] = {link = "Macro"},
["@text.environment.name"] = {link = "Type"},
["@text.title"] = {link = "TSTitle"},
["@text.uri"] = {fg = groups.link},
["@text.note"] = {link = "SpecialComment"},
["@text.warning"] = {link = "Todo"},
["@text.danger"] = {link = "WarningMsg"},
["@todo"] = {link = "Todo"},
["@type"] = {link = "Type"},
["@variable"] = {link = "TSVariable"},
["@variable.builtin"] = {link = "TSVariableBuiltin"},
-- vim.lsp.buf.document_highlight()
LspReferenceText = {bg = p.highlight_med},
@ -362,9 +361,9 @@ function M.get()
GitSignsAdd = {fg = groups.git_add},
GitSignsChange = {fg = groups.git_change},
GitSignsDelete = {fg = groups.git_delete},
SignAdd = {link = 'GitSignsAdd'},
SignChange = {link = 'GitSignsChange'},
SignDelete = {link = 'GitSignsDelete'},
SignAdd = {link = "GitSignsAdd"},
SignChange = {link = "GitSignsChange"},
SignDelete = {link = "GitSignsDelete"},
-- mvllow/modes.nvim
ModesCopy = {bg = p.gold},
@ -378,7 +377,7 @@ function M.get()
NvimTreeFileDirty = {fg = p.rose},
NvimTreeFileMerge = {fg = p.iris},
NvimTreeFileNew = {fg = p.foam},
NvimTreeFileRenamed = {fg = p.pine},
NvimTreeFileRenamed = {fg = p.sand},
NvimTreeFileStaged = {fg = p.iris},
NvimTreeFolderIcon = {fg = p.subtle},
NvimTreeFolderName = {fg = p.foam},
@ -392,9 +391,9 @@ function M.get()
NvimTreeImageFile = {fg = p.text},
NvimTreeNormal = {fg = p.text},
NvimTreeOpenedFile = {fg = p.text, bg = p.highlight_med},
NvimTreeOpenedFolderName = {link = 'NvimTreeFolderName'},
NvimTreeOpenedFolderName = {link = "NvimTreeFolderName"},
NvimTreeRootFolder = {fg = p.iris},
NvimTreeSpecialFile = {link = 'NvimTreeNormal'},
NvimTreeSpecialFile = {link = "NvimTreeNormal"},
NvimTreeWindowPicker = {fg = groups.background, bg = p.iris},
-- folke/which-key.nvim
@ -410,7 +409,7 @@ function M.get()
-- hrsh7th/nvim-cmp
CmpItemAbbr = {fg = p.subtle},
CmpItemAbbrDeprecated = {fg = p.subtle, style = 'strikethrough'},
CmpItemAbbrDeprecated = {fg = p.subtle, style = "strikethrough"},
CmpItemAbbrMatch = {fg = p.text, style = styles.bold},
CmpItemAbbrMatchFuzzy = {fg = p.text, style = styles.bold},
CmpItemKind = {fg = p.iris},
@ -436,24 +435,24 @@ function M.get()
VimwikiHeader4 = {fg = groups.headings.h4, style = styles.bold},
VimwikiHeader5 = {fg = groups.headings.h5, style = styles.bold},
VimwikiHeader6 = {fg = groups.headings.h6, style = styles.bold},
VimwikiHeaderChar = {fg = p.pine},
VimwikiLink = {fg = groups.link, style = 'underline'},
VimwikiHeaderChar = {fg = p.sand},
VimwikiLink = {fg = groups.link, style = "underline"},
VimwikiList = {fg = p.iris},
VimwikiNoExistsLink = {fg = p.crimson},
-- nvim-neorg/neorg
NeorgHeading1Prefix = {fg = groups.headings.h1, style = styles.bold},
NeorgHeading1Title = {link = 'NeorgHeading1Prefix'},
NeorgHeading1Title = {link = "NeorgHeading1Prefix"},
NeorgHeading2Prefix = {fg = groups.headings.h2, style = styles.bold},
NeorgHeading2Title = {link = 'NeorgHeading2Prefix'},
NeorgHeading2Title = {link = "NeorgHeading2Prefix"},
NeorgHeading3Prefix = {fg = groups.headings.h3, style = styles.bold},
NeorgHeading3Title = {link = 'NeorgHeading3Prefix'},
NeorgHeading3Title = {link = "NeorgHeading3Prefix"},
NeorgHeading4Prefix = {fg = groups.headings.h4, style = styles.bold},
NeorgHeading4Title = {link = 'NeorgHeading4Prefix'},
NeorgHeading4Title = {link = "NeorgHeading4Prefix"},
NeorgHeading5Prefix = {fg = groups.headings.h5, style = styles.bold},
NeorgHeading5Title = {link = 'NeorgHeading5Prefix'},
NeorgHeading5Title = {link = "NeorgHeading5Prefix"},
NeorgHeading6Prefix = {fg = groups.headings.h6, style = styles.bold},
NeorgHeading6Title = {link = 'NeorgHeading6Prefix'},
NeorgHeading6Title = {link = "NeorgHeading6Prefix"},
NeorgMarkerTitle = {fg = p.text, style = styles.bold},
-- tami5/lspsaga.nvim (fork of glepnir/lspsaga.nvim)
@ -466,19 +465,19 @@ function M.get()
LspSagaCodeActionBorder = {fg = groups.border},
LspSagaCodeActionContent = {fg = p.foam},
LspSagaCodeActionTitle = {fg = p.gold, style = styles.bold},
LspSagaCodeActionTruncateLine = {link = 'LspSagaCodeActionBorder'},
LspSagaCodeActionTruncateLine = {link = "LspSagaCodeActionBorder"},
LspSagaDefPreviewBorder = {fg = groups.border},
LspSagaDiagnosticBorder = {fg = groups.border},
LspSagaDiagnosticHeader = {fg = p.gold, style = styles.bold},
LspSagaDiagnosticTruncateLine = {link = 'LspSagaDiagnosticBorder'},
LspSagaDocTruncateLine = {link = 'LspSagaHoverBorder'},
LspSagaDiagnosticTruncateLine = {link = "LspSagaDiagnosticBorder"},
LspSagaDocTruncateLine = {link = "LspSagaHoverBorder"},
LspSagaFinderSelection = {fg = p.gold},
LspSagaHoverBorder = {fg = groups.border},
LspSagaLspFinderBorder = {fg = groups.border},
LspSagaRenameBorder = {fg = p.pine},
LspSagaRenameBorder = {fg = p.sand},
LspSagaRenamePromptPrefix = {fg = p.love},
LspSagaShTruncateLine = {link = 'LspSagaSignatureHelpBorder'},
LspSagaSignatureHelpBorder = {fg = p.pine},
LspSagaShTruncateLine = {link = "LspSagaSignatureHelpBorder"},
LspSagaSignatureHelpBorder = {fg = p.sand},
ReferencesCount = {fg = p.rose},
ReferencesIcon = {fg = p.rose},
SagaShadow = {bg = p.overlay},
@ -490,8 +489,8 @@ function M.get()
-- rlane/pounce.nvim
PounceAccept = {fg = p.love, bg = p.highlight_high},
PounceAcceptBest = {fg = p.base, bg = p.gold},
PounceGap = {link = 'Search'},
PounceMatch = {link = 'Search'},
PounceGap = {link = "Search"},
PounceMatch = {link = "Search"},
-- nvim-telescope/telescope.nvim
TelescopeBorder = {fg = groups.border},
@ -505,45 +504,45 @@ function M.get()
-- rcarriga/nvim-notify
NotifyINFOBorder = {fg = p.foam},
NotifyINFOTitle = {link = 'NotifyINFOBorder'},
NotifyINFOIcon = {link = 'NotifyINFOBorder'},
NotifyINFOTitle = {link = "NotifyINFOBorder"},
NotifyINFOIcon = {link = "NotifyINFOBorder"},
NotifyWARNBorder = {fg = p.gold},
NotifyWARNTitle = {link = 'NotifyWARNBorder'},
NotifyWARNIcon = {link = 'NotifyWARNBorder'},
NotifyWARNTitle = {link = "NotifyWARNBorder"},
NotifyWARNIcon = {link = "NotifyWARNBorder"},
NotifyDEBUGBorder = {fg = p.muted},
NotifyDEBUGTitle = {link = 'NotifyDEBUGBorder'},
NotifyDEBUGIcon = {link = 'NotifyDEBUGBorder'},
NotifyDEBUGTitle = {link = "NotifyDEBUGBorder"},
NotifyDEBUGIcon = {link = "NotifyDEBUGBorder"},
NotifyTRACEBorder = {fg = p.iris},
NotifyTRACETitle = {link = 'NotifyTRACEBorder'},
NotifyTRACEIcon = {link = 'NotifyTRACEBorder'},
NotifyTRACETitle = {link = "NotifyTRACEBorder"},
NotifyTRACEIcon = {link = "NotifyTRACEBorder"},
NotifyERRORBorder = {fg = p.crimson},
NotifyERRORTitle = {link = 'NotifyERRORBorder'},
NotifyERRORIcon = {link = 'NotifyERRORBorder'},
NotifyERRORTitle = {link = "NotifyERRORBorder"},
NotifyERRORIcon = {link = "NotifyERRORBorder"},
-- rcarriga/nvim-dap-ui
DapUIVariable = {link = 'Normal'},
DapUIValue = {link = 'Normal'},
DapUIFrameName = {link = 'Normal'},
DapUIVariable = {link = "Normal"},
DapUIValue = {link = "Normal"},
DapUIFrameName = {link = "Normal"},
DapUIThread = {fg = p.gold},
DapUIWatchesValue = {link = 'DapUIThread'},
DapUIBreakpointsInfo = {link = 'DapUIThread'},
DapUIWatchesValue = {link = "DapUIThread"},
DapUIBreakpointsInfo = {link = "DapUIThread"},
DapUIBreakpointsCurrentLine = {fg = p.gold, style = styles.bold},
DapUIWatchesEmpty = {fg = p.crimson},
DapUIWatchesError = {link = 'DapUIWatchesEmpty'},
DapUIWatchesError = {link = "DapUIWatchesEmpty"},
DapUIBreakpointsDisabledLine = {fg = p.muted},
DapUISource = {fg = p.iris},
DapUIBreakpointsPath = {fg = p.foam},
DapUIScope = {link = 'DapUIBreakpointsPath'},
DapUILineNumber = {link = 'DapUIBreakpointsPath'},
DapUIBreakpointsLine = {link = 'DapUIBreakpointsPath'},
DapUIFloatBorder = {link = 'DapUIBreakpointsPath'},
DapUIStoppedThread = {link = 'DapUIBreakpointsPath'},
DapUIDecoration = {link = 'DapUIBreakpointsPath'},
DapUIScope = {link = "DapUIBreakpointsPath"},
DapUILineNumber = {link = "DapUIBreakpointsPath"},
DapUIBreakpointsLine = {link = "DapUIBreakpointsPath"},
DapUIFloatBorder = {link = "DapUIBreakpointsPath"},
DapUIStoppedThread = {link = "DapUIBreakpointsPath"},
DapUIDecoration = {link = "DapUIBreakpointsPath"},
DapUIModifiedValue = {fg = p.foam, style = styles.bold},
-- glepnir/dashboard-nvim
DashboardShortcut = {fg = p.love},
DashboardHeader = {fg = p.pine},
DashboardHeader = {fg = p.sand},
DashboardCenter = {fg = p.gold},
DashboardFooter = {fg = p.iris}
}
@ -552,8 +551,8 @@ function M.get()
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_2 = p.sand -- green
vim.g.terminal_color_10 = p.sand -- bright green
vim.g.terminal_color_3 = p.gold -- yellow
vim.g.terminal_color_11 = p.gold -- bright yellow
vim.g.terminal_color_4 = p.foam -- blue

View file

@ -8,19 +8,19 @@ local function rgb(color)
color = vim.api.nvim_get_color_by_name(color)
if color == -1 then
color = vim.opt.background:get() == 'dark' and 000 or 255255255
color = vim.opt.background:get() == "dark" and 000 or 255255255
end
return {byte(color, 16), byte(color, 8), byte(color, 0)}
end
local function parse_color(color)
if color == nil then return print('invalid color') end
if color == nil then return print("invalid color") end
color = color:lower()
if not color:find('#') and color ~= 'none' then
color = require('rose-pine.palette')[color] or
if not color:find("#") and color ~= "none" then
color = require("rose-pine.palette")[color] or
vim.api.nvim_get_color_by_name(color)
end
@ -39,22 +39,22 @@ util.blend = function(fg, bg, alpha)
return math.floor(math.min(math.max(0, ret), 255) + 0.5)
end
return string.format('#%02X%02X%02X', blend_channel(1), blend_channel(2),
return string.format("#%02X%02X%02X", blend_channel(1), blend_channel(2),
blend_channel(3))
end
---@param group string
---@param color table<string, string>
util.highlight = function(group, color)
local style = color.style and 'gui=' .. color.style or 'gui=NONE'
local fg = color.fg and 'guifg=' .. parse_color(color.fg) or 'guifg=NONE'
local bg = color.bg and 'guibg=' .. parse_color(color.bg) or 'guibg=NONE'
local sp = color.sp and 'guisp=' .. parse_color(color.sp) or ''
local style = color.style and "gui=" .. color.style or "gui=NONE"
local fg = color.fg and "guifg=" .. parse_color(color.fg) or "guifg=NONE"
local bg = color.bg and "guibg=" .. parse_color(color.bg) or "guibg=NONE"
local sp = color.sp and "guisp=" .. parse_color(color.sp) or ""
vim.cmd(string.format('highlight %s %s %s %s %s', group, style, fg, bg, sp))
vim.cmd(string.format("highlight %s %s %s %s %s", group, style, fg, bg, sp))
if color.link then
vim.cmd(string.format('highlight! link %s %s', group, color.link))
vim.cmd(string.format("highlight! link %s %s", group, color.link))
end
end