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-04 19:57:51 +00:00
|
|
|
background = "#fefeff",
|
2024-06-03 07:47:45 +00:00
|
|
|
foreground = "#202020",
|
|
|
|
intense = "#000000",
|
|
|
|
primary = "#ff0000",
|
|
|
|
secondary = "#00ff00",
|
|
|
|
diagnostic_error = "#ff0038",
|
2024-06-04 19:57:51 +00:00
|
|
|
diagnostic_warning = "#ffcc00",
|
2024-06-03 07:47:45 +00:00
|
|
|
diagnostic_info = "#47eae0",
|
|
|
|
diagnostic_hint = "#47eae0",
|
|
|
|
diff_add = "#00ff77",
|
|
|
|
diff_change = "#47eae0",
|
|
|
|
diff_delete = "#ff0038",
|
2024-06-05 07:03:16 +00:00
|
|
|
|
|
|
|
add = hsl(84, 75, 67),
|
|
|
|
add_quarter = hsl(84, 80, 95),
|
|
|
|
change = hsl(41, 50, 75),
|
|
|
|
change_quarter = hsl(224, 100, 85),
|
|
|
|
delete = hsl(350, 100, 40),
|
|
|
|
delete_quarter = hsl(350, 100, 85),
|
|
|
|
|
2024-06-03 07:47:45 +00:00
|
|
|
highlight_subtle = "#f0f0f0",
|
|
|
|
dimmed = "#cccccc",
|
|
|
|
},
|
|
|
|
|
|
|
|
dark = {
|
2024-06-04 19:57:51 +00:00
|
|
|
background = "#000000",
|
2024-06-03 07:47:45 +00:00
|
|
|
foreground = "#b2b2b2",
|
|
|
|
intense = "#e7e7e7",
|
|
|
|
primary = "#00ff00",
|
|
|
|
secondary = "#555555",
|
|
|
|
diagnostic_error = "#ff0038",
|
|
|
|
diagnostic_warning = "#ff7700",
|
|
|
|
diagnostic_info = "#47eae0",
|
|
|
|
diagnostic_hint = "#47eae0",
|
|
|
|
diff_add = "#00ff77",
|
|
|
|
diff_change = "#47eae0",
|
|
|
|
diff_delete = "#ff0038",
|
|
|
|
dimmed = "#666666",
|
|
|
|
highlight_subtle = "#101010",
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
local c = colors[vim.o.background]
|
|
|
|
|
|
|
|
local theme = {
|
2024-06-04 19:57:51 +00:00
|
|
|
Constant = { link = "Normal" },
|
|
|
|
Delimiter = { link = "Normal" },
|
|
|
|
Identifier = { link = "Normal" },
|
|
|
|
Normal = { fg = c.foreground, bg = c.background },
|
2024-06-03 07:47:45 +00:00
|
|
|
Keyword = { fg = c.foreground, bold = true },
|
2024-06-04 19:57:51 +00:00
|
|
|
Operator = { link = "Normal" },
|
|
|
|
Special = { link = "Normal" },
|
|
|
|
String = { link = "Normal" },
|
|
|
|
Type = { link = "Normal" },
|
|
|
|
|
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
|
|
|
|
["@function"] = { link = "Normal" },
|
|
|
|
["@special"] = { link = "Normal" },
|
|
|
|
["@variable"] = { link = "Normal" },
|
2024-06-03 07:47:45 +00:00
|
|
|
|
|
|
|
-- UI Elements
|
|
|
|
CursorLine = { bg = c.highlight_subtle },
|
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-03 18:57:09 +00:00
|
|
|
IndentLine = { fg = "#ffffff" },
|
|
|
|
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-04 19:57:51 +00:00
|
|
|
InclineNormal = { bg = "bg" },
|
|
|
|
InclineNormalNC = { bg = "bg" },
|
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"
|