Skip to content

Commit 73f4eed

Browse files
committed
chore(git): messing around with conflict highlight
Based on sindrets/diffview.nvim#546 at the very moment there's no way to customize the diffs especially in conflicted files. Yes, there's plugin called https://github.com/akinsho/git-conflict.nvim to help highlighting conflict blocks but it superseeded by the `diffview.nvim`
1 parent e04b312 commit 73f4eed

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

lua/plugins/git.lua

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,21 @@ return {
3535
},
3636
},
3737

38+
{
39+
'akinsho/git-conflict.nvim',
40+
version = '*',
41+
---@module 'git-conflict'
42+
---@type GitConflictConfig
43+
opts = {
44+
disable_diagnostics = true,
45+
highlights = {
46+
ancestor = 'DiffText',
47+
current = 'DiffChange',
48+
incoming = 'DiffAdd',
49+
},
50+
},
51+
},
52+
3853
{
3954
'sindrets/diffview.nvim',
4055
dependencies = {

lua/plugins/init.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ return {
5353
WinBarNC = { bg = 'none' },
5454
WinSeparator = { fg = colors.guide_normal, bg = 'none' },
5555

56-
DiffText = { link = 'DiffChange' },
56+
-- DiffText = { link = 'DiffChange' },
5757
-- DiffAdd = { fg = colors.vcs_added },
5858
-- DiffChange = { bg = colors.selection_inactive },
59-
DiffDelete = { fg = colors.vcs_removed },
59+
-- DiffDelete = { fg = colors.vcs_removed },
6060

6161
-- DiffviewDiffAdd = { fg = colors.vcs_added },
6262
DiffviewDiffDelete = { fg = colors.comment },

0 commit comments

Comments
 (0)