summaryrefslogtreecommitdiff
path: root/lua/tjk/colorscheme.lua
diff options
context:
space:
mode:
authorTim Keller <tjk@tjkeller.xyz>2026-05-21 22:43:45 -0500
committerTim Keller <tjk@tjkeller.xyz>2026-05-21 22:44:06 -0500
commitb289c88c8af8f35faf16ccc4fbb0af7798d2316a (patch)
treeda9908ca8312cce48863ecd33d8e3e09a64efc5c /lua/tjk/colorscheme.lua
parenta1991e505485abe9425560714d45b1fe1b2a7cfe (diff)
downloadnvim-b289c88c8af8f35faf16ccc4fbb0af7798d2316a.tar.xz
nvim-b289c88c8af8f35faf16ccc4fbb0af7798d2316a.zip
get rid of lazy.nvim in favor of natively installed packages. some general refactoring
Diffstat (limited to 'lua/tjk/colorscheme.lua')
-rw-r--r--lua/tjk/colorscheme.lua63
1 files changed, 63 insertions, 0 deletions
diff --git a/lua/tjk/colorscheme.lua b/lua/tjk/colorscheme.lua
new file mode 100644
index 0000000..e4b9c8e
--- /dev/null
+++ b/lua/tjk/colorscheme.lua
@@ -0,0 +1,63 @@
+-- use another colorscheme if running as root
+if os.getenv "USER" == "root" then
+ vim.cmd.colorscheme "koehler"
+ return
+end
+
+-- use dark gruvbox variant
+vim.o.background = "dark"
+
+-- https://github.com/ellisonleao/gruvbox.nvim
+require("gruvbox").setup {
+ italic = {
+ strings = false,
+ emphasis = true,
+ comments = false,
+ operators = false,
+ folds = true,
+ },
+ invert_selection = true, -- swap fg w/ bg on select
+ contrast = "hard", -- preferred theme variant
+ palette_overrides = {
+ light0 = "#ffffff", -- use white instead of the default off-white for text
+ light1 = "#ffffff",
+ dark2 = "#363636", -- darker whitespace characters
+ },
+ overrides = {
+ CursorLine = { bg = "#282828" }, -- dark0 (non hard)
+ Directory = { link = "GruvboxGreenBold" },
+ -- treesitter overrides (more similar to builtin python syntax highlighting)
+ -- treesitter selectors can be overridden per language using @selector.language
+ ["@variable"] = { link = "GruvboxFg0" },
+ ["@punctuation.bracket"] = { link = "GruvboxFg0" },
+ ["@punctuation.delimiter"] = { link = "GruvboxFg0" },
+ ["@keyword.import"] = { link = "GruvboxBlue" },
+ ["@function"] = { link = "GruvboxAqua" },
+ ["@function.method"] = { link = "GruvboxAqua" },
+ ["@function.method"] = { link = "GruvboxAqua" },
+ ["@attribute.builtin"] = { link = "GruvboxGreenBold" },
+ ["@attribute"] = { link = "GruvboxGreenBold" },
+ ["@operator"] = { link = "GruvboxRed" },
+ ["@variable.member"] = { link = "GruvboxFg0" },
+ ["@variable.parameter"] = { link = "GruvboxFg0" },
+ ["@function.call"] = { link = "GruvboxPurple" },
+ ["@function.method.call"] = { link = "GruvboxPurple" },
+ -- rainbow delimiters colors
+ RainbowDelimiterRed = { fg = "#ff4433" },
+ RainbowDelimiterYellow = { fg = "#ffff22" },
+ RainbowDelimiterBlue = { fg = "#66f3ff" },
+ RainbowDelimiterOrange = { fg = "#ffaa00" },
+ RainbowDelimiterGreen = { fg = "#99ff44" },
+ RainbowDelimiterViolet = { fg = "#aa00ff" },
+ RainbowDelimiterCyan = { fg = "#22ddff" },
+ -- TODO italic string start / end
+ --["@string_start"] = { italic = true },
+ --["@string_end"] = { italic = true },
+ },
+}
+
+-- set colorscheme
+vim.cmd.colorscheme "gruvbox"
+
+-- fix todo comment highlighting (here instead of theme overrides since this replaces the bg w/ default)
+vim.api.nvim_set_hl(0, "Todo", { fg = "#ffffff", bold = true })