aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/nvim
diff options
context:
space:
mode:
authorToby Vincent <tobyv13@gmail.com>2023-02-06 15:05:30 -0600
committerToby Vincent <tobyv13@gmail.com>2023-02-06 15:51:27 -0600
commit003c48a44a1696167e20622f7e9dca395f3ba437 (patch)
tree6fcccdd3f646101b9a1ec2f8f0a67078dbec65d9 /nvim
parent874db1495c690008e766349f2440ae775071822e (diff)
refactor(nvim): improve gruvbox and lualine theming
Diffstat (limited to 'nvim')
-rw-r--r--nvim/.config/nvim/lua/lualine/themes/gruvbox.lua15
-rw-r--r--nvim/.config/nvim/lua/tobyvin/plugins/gruvbox.lua73
-rw-r--r--nvim/.config/nvim/lua/tobyvin/plugins/indent_blankline.lua28
3 files changed, 62 insertions, 54 deletions
diff --git a/nvim/.config/nvim/lua/lualine/themes/gruvbox.lua b/nvim/.config/nvim/lua/lualine/themes/gruvbox.lua
index 1ac7b02..b139f9b 100644
--- a/nvim/.config/nvim/lua/lualine/themes/gruvbox.lua
+++ b/nvim/.config/nvim/lua/lualine/themes/gruvbox.lua
@@ -1,31 +1,32 @@
-local background = vim.opt.background:get()
-local theme = require("lualine.themes.gruvbox_" .. background)
-
-theme = vim.tbl_deep_extend("force", theme, {
+return {
normal = {
+ a = "StatusLineNormal",
b = "StatusLine",
c = "StatusLineNC",
},
insert = {
+ a = "StatusLineInsert",
b = "StatusLine",
c = "StatusLineNC",
},
visual = {
+ a = "StatusLineVisual",
b = "StatusLine",
c = "StatusLineNC",
},
replace = {
+ a = "StatusLineReplace",
b = "StatusLine",
c = "StatusLineNC",
},
command = {
+ a = "StatusLineCommand",
b = "StatusLine",
c = "StatusLineNC",
},
inactive = {
+ a = "StatusLineCommand",
b = "StatusLineNC",
c = "StatusLineNC",
},
-})
-
-return theme
+}
diff --git a/nvim/.config/nvim/lua/tobyvin/plugins/gruvbox.lua b/nvim/.config/nvim/lua/tobyvin/plugins/gruvbox.lua
index 9d515ed..90fe839 100644
--- a/nvim/.config/nvim/lua/tobyvin/plugins/gruvbox.lua
+++ b/nvim/.config/nvim/lua/tobyvin/plugins/gruvbox.lua
@@ -6,45 +6,52 @@ local M = {
contrast = "hard",
transparent_mode = true,
inverse = false,
- overrides = {
- GruvboxRedSign = { bg = "" },
- GruvboxGreenSign = { bg = "" },
- GruvboxYellowSign = { bg = "" },
- GruvboxBlueSign = { bg = "" },
- GruvboxPurpleSign = { bg = "" },
- GruvboxAquaSign = { bg = "" },
- GruvboxOrangeSign = { bg = "" },
- NormalFloat = { bg = "" },
- FloatBorder = { bg = "" },
- ColorColumn = { bg = "" },
- CursorLine = { bg = "" },
- CursorLineNr = { bg = "" },
- SignColumn = { bg = "" },
- QuickFixLine = { fg = "", bg = "" },
- StatusLine = { link = "Pmenu" },
- StatusLineNC = { link = "GruvboxNC" },
- WinBar = { link = "GruvboxNC" },
- WinBarNC = { link = "GruvboxFg4" },
- IndentBlanklineContext1 = { link = "GruvboxRed" },
- IndentBlanklineContext2 = { link = "GruvboxOrange" },
- IndentBlanklineContext3 = { link = "GruvboxYellow" },
- IndentBlanklineContext4 = { link = "GruvboxGreen" },
- IndentBlanklineContext5 = { link = "GruvboxAqua" },
- IndentBlanklineContext6 = { link = "GruvboxBlue" },
- IndentBlanklineContext7 = { link = "GruvboxViolet" },
- },
},
}
function M.config(_, opts)
- local colors = require("gruvbox.palette").get_base_colors(opts.bg, opts.contrast)
+ require("gruvbox").setup(opts)
- vim.api.nvim_set_hl(0, "GruvboxNC", {
- fg = colors.fg4,
- bg = colors.bg1,
- })
+ local config = require("gruvbox").config
+ local colors = require("gruvbox.palette").get_base_colors(config.bg, config.contrast)
- require("gruvbox").setup(opts)
+ config.overrides = {
+ GruvboxNC = { fg = colors.fg4, bg = colors.bg1 },
+ NormalFloat = { bg = "" },
+ FloatBorder = { bg = "" },
+ ColorColumn = { bg = "" },
+ CursorLine = { bg = "" },
+ CursorLineNr = { bg = "" },
+ QuickFixLine = { fg = "", bg = "" },
+ StatusLine = { link = "Pmenu" },
+ StatusLineNC = { link = "GruvboxNC" },
+ StatusLineNCB = { fg = colors.fg4, bg = colors.bg1, bold = config.bold },
+ StatusLineNormal = { fg = colors.bg0, bg = colors.fg4, bold = config.bold },
+ StatusLineOperator = { link = "StatusLineNormal" },
+ StatusLineVisual = { fg = colors.bg0, bg = colors.orange, bold = config.bold },
+ StatusLineVLine = { link = "StatusLineVisual" },
+ StatusLineVBlock = { link = "StatusLineVisual" },
+ StatusLineSelect = { link = "StatusLineVisual" },
+ StatusLineSLine = { link = "StatusLineVisual" },
+ StatusLineSBlock = { link = "StatusLineVisual" },
+ StatusLineInsert = { fg = colors.bg0, bg = colors.blue, bold = config.bold },
+ StatusLineReplace = { fg = colors.bg0, bg = colors.aqua, bold = config.bold },
+ StatusLineCommand = { fg = colors.bg0, bg = colors.green, bold = config.bold },
+ StatusLinePrompt = { link = "StatusLineCommand" },
+ StatusLineConfirm = { link = "StatusLinePrompt" },
+ StatusLineMore = { link = "StatusLinePrompt" },
+ StatusLineEx = { link = "StatusLineCommand" },
+ StatusLineTerminal = { link = "StatusLineEx" },
+ WinBar = { link = "GruvboxNC" },
+ WinBarNC = { link = "GruvboxFg4" },
+ IndentContext1 = { link = "GruvboxRed" },
+ IndentContext2 = { link = "GruvboxOrange" },
+ IndentContext3 = { link = "GruvboxYellow" },
+ IndentContext4 = { link = "GruvboxGreen" },
+ IndentContext5 = { link = "GruvboxAqua" },
+ IndentContext6 = { link = "GruvboxBlue" },
+ IndentContext7 = { link = "GruvboxViolet" },
+ }
vim.cmd.colorscheme("gruvbox")
end
diff --git a/nvim/.config/nvim/lua/tobyvin/plugins/indent_blankline.lua b/nvim/.config/nvim/lua/tobyvin/plugins/indent_blankline.lua
index ae2ab0c..ed3c328 100644
--- a/nvim/.config/nvim/lua/tobyvin/plugins/indent_blankline.lua
+++ b/nvim/.config/nvim/lua/tobyvin/plugins/indent_blankline.lua
@@ -5,13 +5,13 @@ local M = {
}
function M.init()
- vim.api.nvim_set_hl(0, "IndentBlanklineContext1", { fg = "Red", default = true })
- vim.api.nvim_set_hl(0, "IndentBlanklineContext2", { fg = "Brown", default = true })
- vim.api.nvim_set_hl(0, "IndentBlanklineContext3", { fg = "Yellow", default = true })
- vim.api.nvim_set_hl(0, "IndentBlanklineContext4", { fg = "Green", default = true })
- vim.api.nvim_set_hl(0, "IndentBlanklineContext5", { fg = "Cyan", default = true })
- vim.api.nvim_set_hl(0, "IndentBlanklineContext6", { fg = "Blue", default = true })
- vim.api.nvim_set_hl(0, "IndentBlanklineContext7", { fg = "Magenta", default = true })
+ vim.api.nvim_set_hl(0, "IndentContext1", { fg = "Red", default = true })
+ vim.api.nvim_set_hl(0, "IndentContext2", { fg = "Brown", default = true })
+ vim.api.nvim_set_hl(0, "IndentContext3", { fg = "Yellow", default = true })
+ vim.api.nvim_set_hl(0, "IndentContext4", { fg = "Green", default = true })
+ vim.api.nvim_set_hl(0, "IndentContext5", { fg = "Cyan", default = true })
+ vim.api.nvim_set_hl(0, "IndentContext6", { fg = "Blue", default = true })
+ vim.api.nvim_set_hl(0, "IndentContext7", { fg = "Magenta", default = true })
end
function M.config()
@@ -19,13 +19,13 @@ function M.config()
indent_blankline.setup({
context_highlight_list = {
- "IndentBlanklineContext1",
- "IndentBlanklineContext2",
- "IndentBlanklineContext3",
- "IndentBlanklineContext4",
- "IndentBlanklineContext5",
- "IndentBlanklineContext6",
- "IndentBlanklineContext7",
+ "IndentContext1",
+ "IndentContext2",
+ "IndentContext3",
+ "IndentContext4",
+ "IndentContext5",
+ "IndentContext6",
+ "IndentContext7",
},
space_char_blankline = " ",
show_end_of_line = true,