Fix gruvbox diff colors

This commit is contained in:
Tyler Hallada 2023-03-22 19:31:28 -04:00
parent 1b8424b0d5
commit 223ae8d81b
3 changed files with 22 additions and 2 deletions

View File

@ -1,6 +1,7 @@
local actions = require("diffview.actions")
require("diffview").setup({
enhanced_diff_hl = true,
keymaps = {
view = {
["gq"] = "<Cmd>DiffviewClose<CR>",

View File

@ -1,3 +1,5 @@
local colors = require("gruvbox.palette").colors;
require("gruvbox").setup({
undercurl = true,
underline = true,
@ -22,8 +24,23 @@ require("gruvbox").setup({
dark1 = '#242424',
},
overrides = {
Pmenu = { bg = '#222222'}
Pmenu = { bg = '#222222'},
GruvboxAquaSign = { bg = "NONE" },
GruvboxBlueSign = { bg = "NONE" },
GruvboxGreenSign = { bg = "NONE" },
GruvboxOrangeSign = { bg = "NONE" },
GruvboxPurpleSign = { bg = "NONE" },
GruvboxRedSign = { bg = "NONE" },
GruvboxYellowSign = { bg = "NONE" },
SignColumn = { bg = "NONE" },
}
})
vim.o.background = "dark"
vim.api.nvim_command([[colorscheme gruvbox]])
-- TODO: how to apply this when colorscheme changes?
vim.api.nvim_set_hl(0, 'DiffDelete', { bg = "none", fg = colors.dark2 })
vim.api.nvim_set_hl(0, 'DiffviewDiffDelete', { bg = "none", fg = colors.dark2 })
vim.api.nvim_set_hl(0, 'DiffviewDiffAddAsDelete', { bg = "#370000" })
vim.api.nvim_set_hl(0, 'DiffAdd', { bg = "#393400" }) -- #122f2f
vim.api.nvim_set_hl(0, 'DiffChange', { bg = "#222a36" })
vim.api.nvim_set_hl(0, 'DiffText', { bg = "#2f3f5c" }) -- #2f3f5c

View File

@ -91,3 +91,5 @@ vim.api.nvim_create_autocmd('TextYankPost', {
})
vim.opt.fillchars:append { diff = "" }
vim.api.nvim_command([[colorscheme gruvbox]])