-
Is anyone experiencing their color-scheme is not applied on neogit? I am using kanagawa.nvim, and I update |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Are you setting the colorscheme before calling the neogit setup function? |
Beta Was this translation helpful? Give feedback.
-
I write my config from this return {
"NeogitOrg/neogit",
lazy = true,
dependencies = {
"nvim-lua/plenary.nvim", -- required
"nvim-telescope/telescope.nvim", -- optional
"sindrets/diffview.nvim", -- optional
"ibhagwan/fzf-lua", -- optional
},
opts = {
auto_refresh = false,
console_timeout = 10000,
disable_context_highlighting = true,
disable_commit_confirmation = false,
disable_builtin_notifications = true,
disable_insert_on_commit = false,
signs = {
-- { CLOSED, OPENED }
section = { "", "" },
item = { "", "" },
hunk = { "", "" },
},
commit_editor = {
kind = "vsplit",
show_staged_diff = false,
},
},
init = function()
require("helper").nnoremap("<Leader>gg", "<CMD>Neogit<CR>")
local Color = require("neogit.lib.color").Color
local base_green = Color.from_hex("#a6d189")
local base_red = Color.from_hex("#e78284")
local green = base_green:to_css()
local bg_green = base_green:shade(-0.18):to_css()
local line_green = base_green:shade(-0.72):set_saturation(0.2):to_css()
local red = base_red:to_css()
local bg_red = base_red:shade(-0.18):to_css()
local line_red = base_red:shade(-0.6):set_saturation(0.4):to_css()
vim.api.nvim_set_hl(0, "NeogitDiffAdd", {
bg = line_green,
fg = bg_green,
})
vim.api.nvim_set_hl(0, "NeogitDiffDelete", {
bg = line_red,
fg = bg_red,
})
vim.api.nvim_set_hl(0, "NeogitDiffAddHighlight", {
bg = line_green,
fg = green,
})
vim.api.nvim_set_hl(0, "NeogitDiffDeleteHighlight", {
bg = line_red,
fg = red,
})
end,
} to this return {
"NeogitOrg/neogit",
event = "VeryLazy",
dependencies = {
"nvim-lua/plenary.nvim", -- required
"sindrets/diffview.nvim", -- optional - Diff integration
-- Only one of these is needed, not both.
"nvim-telescope/telescope.nvim", -- optional
-- "ibhagwan/fzf-lua", -- optional
},
config = function()
require("neogit").setup({
auto_refresh = false,
console_timeout = 10000,
disable_context_highlighting = true,
disable_commit_confirmation = false,
disable_builtin_notifications = true,
disable_insert_on_commit = false,
signs = {
-- { CLOSED, OPENED }
section = { "", "" },
item = { "", "" },
hunk = { "", "" },
},
commit_editor = {
kind = "vsplit",
show_staged_diff = false,
},
})
require("helper").nnoremap("<Leader>gg", "<CMD>Neogit<CR>")
local Color = require("neogit.lib.color").Color
local base_green = Color.from_hex("#a6d189")
local base_red = Color.from_hex("#e78284")
local green = base_green:to_css()
local bg_green = base_green:shade(-0.18):to_css()
local line_green = base_green:shade(-0.72):set_saturation(0.2):to_css()
local red = base_red:to_css()
local bg_red = base_red:shade(-0.18):to_css()
local line_red = base_red:shade(-0.6):set_saturation(0.4):to_css()
vim.api.nvim_set_hl(0, "NeogitDiffAdd", {
bg = line_green,
fg = bg_green,
})
vim.api.nvim_set_hl(0, "NeogitDiffDelete", {
bg = line_red,
fg = bg_red,
})
vim.api.nvim_set_hl(0, "NeogitDiffAddHighlight", {
bg = line_green,
fg = green,
})
vim.api.nvim_set_hl(0, "NeogitDiffDeleteHighlight", {
bg = line_red,
fg = red,
})
end,
} |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
I write my config from this