summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorTommaso Negri <tommaso@hey.com>2025-12-05 17:45:48 +0100
committerTommaso Negri <tommaso@hey.com>2025-12-05 17:45:48 +0100
commitb1ea37b455e9541f9b5b41eceed9c0a20e114e8d (patch)
treece3ed77514261b52248eb62e8fae5f9d43a05e87 /lua
parent0fad654f09ab70b7ed11a740fb2cf69c5f67be15 (diff)
downloadvoltage-b1ea37b455e9541f9b5b41eceed9c0a20e114e8d.tar.gz
voltage-b1ea37b455e9541f9b5b41eceed9c0a20e114e8d.zip
Consolidate color palette
Diffstat (limited to 'lua')
-rw-r--r--lua/mycolortheme/init.lua73
1 files changed, 62 insertions, 11 deletions
diff --git a/lua/mycolortheme/init.lua b/lua/mycolortheme/init.lua
index 807a336..09a7783 100644
--- a/lua/mycolortheme/init.lua
+++ b/lua/mycolortheme/init.lua
@@ -1,25 +1,76 @@
local M = {}
-function M.setup()
+function M.setup(config)
vim.cmd("highlight clear")
vim.cmd("syntax reset")
- vim.o.background = "dark"
+ vim.o.background = config.style
vim.g.colors_name = "my color theme"
local colors = {
- bg = "#000000",
- fg = "#ffffff",
- green = { fg = "#3ad070", bg = nil }
+ bg = nil,
+ fg = "#f0f0f0",
+ dimmed = "#707070",
+ inverted = "#000000",
+ -- strings, numbers, etc
+ green = {
+ light = "#99cda3",
+ regular = "#54dd7d",
+ dark = "#1c3e24",
+ darker = "#0c1a0f"
+ },
+ -- constants
+ purple = {
+ light = "#dcabd6",
+ regular = "#fd8ff4",
+ dark = "#472944",
+ darker = "#1e111c"
+ },
+ -- comments
+ yellow = {
+ light = "#d2bc82",
+ regular = "#ebb600",
+ dark = "#41340a",
+ darker = "#1b1505"
+ },
+ -- top-level definitions
+ blue = {
+ light = "#7dccda",
+ regular = "#00d8f5",
+ dark = "#003d46",
+ darker = "#031a1e"
+ },
+ -- errors, spellbad, etc
+ red = {
+ light = "#edaaa4",
+ regular = "#ff2335",
+ dark = "#502825",
+ darker = "#22100f"
+ },
}
- local highlights = {
- Normal = { fg = colors.fg, bg = colors.bg },
- Constant = { fg = colors.green.fg, bg = colors.green.bg }
- }
+ for _, highlight in ipairs({ "editor", "syntax", "treesitter" }) do
+ local mod = require("mycolortheme.highlights." .. highlight)
+
+ for group, opts in pairs(mod.setup(colors, config)) do
+ vim.api.nvim_set_hl(0, group, opts)
+ end
+ end
+
+ for _, highlight in ipairs({ "ruby" }) do
+ local mod = require("mycolortheme.highlights.languages." .. highlight)
+
+ for group, opts in pairs(mod.setup(colors, config)) do
+ vim.api.nvim_set_hl(0, group, opts)
+ end
+ end
+
+ for _, highlight in ipairs({ "netrw", "fzf", "blink", "mini" }) do
+ local mod = require("mycolortheme.highlights.plugins." .. highlight)
- for group, opts in pairs(highlights) do
- vim.api.nvim_set_hl(0, group, opts)
+ for group, opts in pairs(mod.setup(colors, config)) do
+ vim.api.nvim_set_hl(0, group, opts)
+ end
end
end