Fix gruvbox diff colors
See: https://github.com/ellisonleao/gruvbox.nvim/issues/105#issuecomment-1480547367
This commit is contained in:
parent
223ae8d81b
commit
a61afc55f6
16
after/plugin/gruvbox.lua
Normal file
16
after/plugin/gruvbox.lua
Normal file
@ -0,0 +1,16 @@
|
||||
local colors = require("gruvbox.palette").colors;
|
||||
|
||||
function FixGruvbox()
|
||||
vim.api.nvim_set_hl(0, 'DiffviewDiffAddAsDelete', { bg = "#431313" })
|
||||
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, 'DiffAdd', { bg = "#142a03" }) -- #122f2f
|
||||
vim.api.nvim_set_hl(0, 'DiffChange', { bg = "#3B3307" })
|
||||
vim.api.nvim_set_hl(0, 'DiffText', { bg = "#4D520D" }) -- #2f3f5c
|
||||
end
|
||||
FixGruvbox()
|
||||
|
||||
vim.api.nvim_create_autocmd(
|
||||
"ColorScheme",
|
||||
{ pattern = { "gruvbox" }, callback = FixGruvbox }
|
||||
)
|
@ -226,12 +226,6 @@ return require('packer').startup(function(use)
|
||||
}
|
||||
use 'nvim-telescope/telescope-ui-select.nvim'
|
||||
use 'nvim-telescope/telescope-project.nvim'
|
||||
use {
|
||||
'ellisonleao/gruvbox.nvim',
|
||||
config = function()
|
||||
require('plugins.gruvbox')
|
||||
end,
|
||||
}
|
||||
use 'NLKNguyen/papercolor-theme'
|
||||
use {
|
||||
'akinsho/toggleterm.nvim',
|
||||
@ -447,7 +441,15 @@ return require('packer').startup(function(use)
|
||||
require('plugins.which-key-nvim')
|
||||
end
|
||||
}
|
||||
use {
|
||||
'ellisonleao/gruvbox.nvim',
|
||||
config = function()
|
||||
require('plugins.gruvbox')
|
||||
end,
|
||||
}
|
||||
use 'eandrju/cellular-automaton.nvim'
|
||||
use 'nyoom-engineering/oxocarbon.nvim'
|
||||
use 'folke/tokyonight.nvim'
|
||||
|
||||
-- Automatically set up your configuration after cloning packer.nvim
|
||||
-- Put this at the end after all plugins
|
||||
|
@ -1,5 +1,3 @@
|
||||
local colors = require("gruvbox.palette").colors;
|
||||
|
||||
require("gruvbox").setup({
|
||||
undercurl = true,
|
||||
underline = true,
|
||||
@ -36,11 +34,3 @@ require("gruvbox").setup({
|
||||
}
|
||||
})
|
||||
vim.o.background = "dark"
|
||||
|
||||
-- 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
|
||||
|
Loading…
Reference in New Issue
Block a user