2024-06-05 07:03:16 +00:00
|
|
|
local hsl = require("dieter.hsl").hslToHex
|
|
|
|
|
2024-06-03 07:47:45 +00:00
|
|
|
local colors = {
|
|
|
|
light = {
|
2024-06-07 17:29:51 +00:00
|
|
|
background = hsl(240, 100, 100),
|
|
|
|
foreground = hsl(0, 0, 13),
|
2024-06-07 15:46:35 +00:00
|
|
|
|
|
|
|
string = hsl(96, 50, 33),
|
|
|
|
comment = hsl(230, 66, 40),
|
|
|
|
comment_error = hsl(2, 85, 40),
|
|
|
|
|
|
|
|
diagnostic_error = hsl(347, 80, 45),
|
|
|
|
diagnostic_warning = hsl(30, 100, 50),
|
|
|
|
diagnostic_info = hsl(145, 80, 30),
|
|
|
|
diagnostic_hint = hsl(145, 80, 30),
|
|
|
|
|
|
|
|
popup_error_bg = hsl(0, 90, 99),
|
|
|
|
popup_warning_bg = hsl(27, 90, 99),
|
|
|
|
popup_info_bg = hsl(112, 90, 99),
|
|
|
|
popup_hint_bg = hsl(112, 90, 99),
|
|
|
|
|
|
|
|
add = hsl(84, 50, 80),
|
2024-06-05 07:03:16 +00:00
|
|
|
add_quarter = hsl(84, 80, 95),
|
2024-06-07 15:46:35 +00:00
|
|
|
change = hsl(41, 80, 80),
|
2024-06-05 07:03:16 +00:00
|
|
|
change_quarter = hsl(224, 100, 85),
|
|
|
|
delete = hsl(350, 100, 40),
|
|
|
|
delete_quarter = hsl(350, 100, 85),
|
|
|
|
|
2024-06-07 15:46:35 +00:00
|
|
|
dialog_bg = hsl(224, 5, 92),
|
|
|
|
selection = hsl(270, 75, 92),
|
2024-06-07 17:29:51 +00:00
|
|
|
highlight_subtle = hsl(0, 0, 94),
|
2024-06-07 20:40:12 +00:00
|
|
|
highlight_intense = hsl(42, 100, 30),
|
2024-06-07 17:29:51 +00:00
|
|
|
dimmed = hsl(0, 0, 80),
|
2024-06-07 20:40:12 +00:00
|
|
|
dimmed_subtle = hsl(0, 0, 20),
|
2024-06-03 07:47:45 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
dark = {
|
2024-06-07 17:29:51 +00:00
|
|
|
background = hsl(216, 28, 7),
|
|
|
|
foreground = hsl(0, 0, 80),
|
2024-06-08 22:30:05 +00:00
|
|
|
dimmed = hsl(0, 0, 25),
|
2024-06-07 20:40:12 +00:00
|
|
|
dimmed_subtle = hsl(0, 0, 70),
|
2024-06-07 17:29:51 +00:00
|
|
|
highlight_subtle = hsl(0, 0, 6),
|
2024-06-07 20:40:12 +00:00
|
|
|
highlight_intense = hsl(58, 100, 60),
|
2024-06-07 17:29:51 +00:00
|
|
|
|
2024-06-07 20:40:12 +00:00
|
|
|
string = hsl(96, 50, 70),
|
|
|
|
comment = hsl(220, 50, 60),
|
|
|
|
comment_error = hsl(2, 85, 50),
|
2024-06-07 17:29:51 +00:00
|
|
|
|
2024-06-07 20:40:12 +00:00
|
|
|
diagnostic_error = hsl(353, 100, 45),
|
2024-06-07 17:29:51 +00:00
|
|
|
diagnostic_warning = hsl(30, 100, 50),
|
|
|
|
diagnostic_info = hsl(176, 80, 60),
|
|
|
|
diagnostic_hint = hsl(176, 80, 60),
|
|
|
|
|
|
|
|
popup_error_bg = hsl(0, 95, 7),
|
|
|
|
popup_warning_bg = hsl(27, 95, 7),
|
|
|
|
popup_info_bg = hsl(112, 95, 7),
|
|
|
|
popup_hint_bg = hsl(112, 95, 7),
|
|
|
|
|
2024-06-07 20:40:12 +00:00
|
|
|
add = hsl(100, 100, 12),
|
|
|
|
add_quarter = hsl(84, 80, 15),
|
|
|
|
change = hsl(41, 100, 15),
|
|
|
|
change_quarter = hsl(224, 100, 15),
|
2024-06-07 17:29:51 +00:00
|
|
|
delete = hsl(350, 100, 40),
|
2024-06-07 20:40:12 +00:00
|
|
|
delete_quarter = hsl(350, 100, 15),
|
2024-06-07 17:29:51 +00:00
|
|
|
|
2024-06-07 20:40:12 +00:00
|
|
|
dialog_bg = hsl(224, 5, 12),
|
2024-06-07 17:29:51 +00:00
|
|
|
|
|
|
|
selection = hsl(270, 50, 33),
|
2024-06-03 07:47:45 +00:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
local c = colors[vim.o.background]
|
|
|
|
|
|
|
|
local theme = {
|
2024-06-04 19:57:51 +00:00
|
|
|
Normal = { fg = c.foreground, bg = c.background },
|
2024-06-07 15:46:35 +00:00
|
|
|
|
|
|
|
Constant = { link = "NormalNC" },
|
|
|
|
Delimiter = { link = "NormalNC" },
|
|
|
|
Identifier = { link = "NormalNC" },
|
2024-06-03 07:47:45 +00:00
|
|
|
Keyword = { fg = c.foreground, bold = true },
|
2024-06-07 15:46:35 +00:00
|
|
|
Operator = { link = "NormalNC" },
|
|
|
|
Special = { link = "NormalNC" },
|
|
|
|
Type = { link = "NormalNC" },
|
|
|
|
|
|
|
|
String = { fg = c.string },
|
|
|
|
|
|
|
|
Comment = { fg = c.comment, italic = true, bold = true },
|
|
|
|
CommentError = { fg = c.comment_error, italic = true, bold = true },
|
|
|
|
["@comment.note"] = { link = "Comment" },
|
|
|
|
["@comment.todo"] = { link = "CommentError" },
|
|
|
|
["@comment.error"] = { link = "CommentError" },
|
|
|
|
["@comment.warning"] = { link = "CommentError" },
|
2024-06-04 19:57:51 +00:00
|
|
|
|
2024-06-05 07:03:16 +00:00
|
|
|
DiffAdd = { fg = c.add, bg = c.add_quarter },
|
|
|
|
GitSignsAdd = { fg = c.add, bg = c.background },
|
|
|
|
GitSignsAddNr = { link = "DiffAdd" },
|
|
|
|
DiffChange = { fg = c.change, bg = c.change_quarter },
|
|
|
|
GitSignsChange = { fg = c.change, bg = c.background },
|
|
|
|
GitSignsChangeNr = { link = "DiffChange" },
|
|
|
|
DiffDelete = { fg = c.delete, bg = c.delete_quarter },
|
|
|
|
GitSignsDelete = { fg = c.delete, bg = c.background },
|
|
|
|
GitSignsDeleteNr = { link = "DiffDelete" },
|
|
|
|
|
2024-06-04 19:57:51 +00:00
|
|
|
-- Treesitter
|
2024-06-07 15:46:35 +00:00
|
|
|
["@function"] = { link = "NormalNC" },
|
|
|
|
["@special"] = { link = "NormalNC" },
|
|
|
|
["@variable"] = { link = "NormalNC" },
|
2024-06-07 20:40:12 +00:00
|
|
|
["@lsp.type.variable"] = { fg = c.dimmed_subtle },
|
2024-06-03 07:47:45 +00:00
|
|
|
|
|
|
|
-- UI Elements
|
|
|
|
CursorLine = { bg = c.highlight_subtle },
|
2024-06-07 15:46:35 +00:00
|
|
|
|
|
|
|
DiagnosticError = { fg = c.diagnostic_error, italic = true },
|
|
|
|
DiagnosticFloatingError = { fg = c.diagnostic_error, bg = c.popup_error_bg },
|
|
|
|
DiagnosticFloatingWarn = { fg = c.diagnostic_warning, bg = c.popup_warning_bg },
|
|
|
|
DiagnosticFloatingInfo = { fg = c.diagnostic_info, bg = c.popup_info_bg },
|
|
|
|
DiagnosticFloatingHint = { fg = c.diagnostic_hint, bg = c.popup_hint_bg },
|
2024-06-07 20:40:12 +00:00
|
|
|
DiagnosticUnderlineError = { fg = c.diagnostic_error, undercurl = true },
|
|
|
|
DiagnosticUnderlineWarn = { fg = c.diagnostic_warn, undercurl = true },
|
|
|
|
DiagnosticUnderlineInfo = { fg = c.diagnostic_info, undercurl = true },
|
|
|
|
DiagnosticUnderlinehint = { fg = c.diagnostic_hint, undercurl = true },
|
2024-06-07 15:46:35 +00:00
|
|
|
|
2024-06-04 19:57:51 +00:00
|
|
|
DiagnosticSignError = { fg = c.diagnostic_error },
|
|
|
|
DiagnosticSignHint = { fg = c.diagnostic_hint },
|
|
|
|
DiagnosticSignInfo = { fg = c.diagnostic_info },
|
|
|
|
DiagnosticSignWarn = { fg = c.diagnostic_warning },
|
2024-06-03 07:47:45 +00:00
|
|
|
LineNr = { fg = c.dimmed, italic = true },
|
2024-06-07 20:40:12 +00:00
|
|
|
IndentLine = { fg = c.background },
|
2024-06-03 18:57:09 +00:00
|
|
|
IndentLineCurrent = { fg = c.dimmed },
|
2024-06-03 18:57:19 +00:00
|
|
|
TreesitterContext = { reverse = true },
|
|
|
|
TreesitterContextLineNumber = { bg = c.dimmed, reverse = true, italic = true },
|
2024-06-07 15:46:35 +00:00
|
|
|
InclineNormal = { bg = c.background },
|
|
|
|
InclineNormalNC = { bg = c.background },
|
|
|
|
|
|
|
|
WinSeparator = { bg = c.dialog_bg },
|
|
|
|
NormalFloat = { bg = c.dialog_bg },
|
|
|
|
Title = { fg = c.foreground, bold = true },
|
|
|
|
|
|
|
|
TelescopeNormal = { fg = c.foreground, bg = c.background },
|
|
|
|
TelescopeBorder = { bold = true },
|
|
|
|
TelescopeSelection = { reverse = true },
|
|
|
|
TelescopeResultsComment = { fg = c.foreground, italic = true },
|
|
|
|
|
|
|
|
Visual = { bg = c.selection },
|
2024-06-07 20:40:12 +00:00
|
|
|
LspReferenceText = { fg = c.highlight_intense, undercurl = true },
|
2024-06-03 07:47:45 +00:00
|
|
|
}
|
|
|
|
|
2024-06-03 18:56:48 +00:00
|
|
|
vim.cmd("hi clear")
|
|
|
|
|
|
|
|
if vim.fn.exists("syntax_on") == 1 then
|
|
|
|
vim.cmd("syntax reset")
|
|
|
|
end
|
|
|
|
|
2024-06-03 07:47:45 +00:00
|
|
|
for group, hl in pairs(theme) do
|
|
|
|
vim.api.nvim_set_hl(0, group, hl)
|
|
|
|
end
|
2024-06-03 18:56:48 +00:00
|
|
|
|
2024-06-04 19:59:59 +00:00
|
|
|
vim.g.colors_name = "dieter"
|