From a336884e856be910ec7a9612eea01ae27b01c36d Mon Sep 17 00:00:00 2001 From: Jesper Liljegren Date: Mon, 23 Mar 2026 10:57:51 +0100 Subject: [PATCH] feat: add dankcolors base16 theme plugin with auto-reload support --- lua/plugins/dankcolors.lua | 91 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 lua/plugins/dankcolors.lua diff --git a/lua/plugins/dankcolors.lua b/lua/plugins/dankcolors.lua new file mode 100644 index 00000000..f819a8f5 --- /dev/null +++ b/lua/plugins/dankcolors.lua @@ -0,0 +1,91 @@ +return { + { + "RRethy/base16-nvim", + priority = 1000, + config = function() + require('base16-colorscheme').setup({ + base00 = '#141218', + base01 = '#141218', + base02 = '#9d99a5', + base03 = '#9d99a5', + base04 = '#f4efff', + base05 = '#faf8ff', + base06 = '#faf8ff', + base07 = '#faf8ff', + base08 = '#ff9fb2', + base09 = '#ff9fb2', + base0A = '#d7c6ff', + base0B = '#a5ffb8', + base0C = '#e9e0ff', + base0D = '#d7c6ff', + base0E = '#ded0ff', + base0F = '#ded0ff', + }) + + vim.api.nvim_set_hl(0, 'Visual', { + bg = '#9d99a5', + fg = '#faf8ff', + bold = true + }) + vim.api.nvim_set_hl(0, 'Statusline', { + bg = '#d7c6ff', + fg = '#141218', + }) + vim.api.nvim_set_hl(0, 'LineNr', { fg = '#9d99a5' }) + vim.api.nvim_set_hl(0, 'CursorLineNr', { fg = '#e9e0ff', bold = true }) + + vim.api.nvim_set_hl(0, 'Statement', { + fg = '#ded0ff', + bold = true + }) + vim.api.nvim_set_hl(0, 'Keyword', { link = 'Statement' }) + vim.api.nvim_set_hl(0, 'Repeat', { link = 'Statement' }) + vim.api.nvim_set_hl(0, 'Conditional', { link = 'Statement' }) + + vim.api.nvim_set_hl(0, 'Function', { + fg = '#d7c6ff', + bold = true + }) + vim.api.nvim_set_hl(0, 'Macro', { + fg = '#d7c6ff', + italic = true + }) + vim.api.nvim_set_hl(0, '@function.macro', { link = 'Macro' }) + + vim.api.nvim_set_hl(0, 'Type', { + fg = '#e9e0ff', + bold = true, + italic = true + }) + vim.api.nvim_set_hl(0, 'Structure', { link = 'Type' }) + + vim.api.nvim_set_hl(0, 'String', { + fg = '#a5ffb8', + italic = true + }) + + vim.api.nvim_set_hl(0, 'Operator', { fg = '#f4efff' }) + vim.api.nvim_set_hl(0, 'Delimiter', { fg = '#f4efff' }) + vim.api.nvim_set_hl(0, '@punctuation.bracket', { link = 'Delimiter' }) + vim.api.nvim_set_hl(0, '@punctuation.delimiter', { link = 'Delimiter' }) + + vim.api.nvim_set_hl(0, 'Comment', { + fg = '#9d99a5', + italic = true + }) + + local current_file_path = vim.fn.stdpath("config") .. "/lua/plugins/dankcolors.lua" + if not _G._matugen_theme_watcher then + local uv = vim.uv or vim.loop + _G._matugen_theme_watcher = uv.new_fs_event() + _G._matugen_theme_watcher:start(current_file_path, {}, vim.schedule_wrap(function() + local new_spec = dofile(current_file_path) + if new_spec and new_spec[1] and new_spec[1].config then + new_spec[1].config() + print("Theme reload") + end + end)) + end + end + } +}