Skip to content

Commit d1b2b7f

Browse files
authored
Merge pull request #140 from ful1e5/main
Link common highlights for `diff` group
2 parents 87106dd + d5f39b6 commit d1b2b7f

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3838
- enhance: `StatusLine` foreground & `StatusLineNC` background colors are customizable ( related to #11 )
3939
- feat: vscode like lspkind highlighting inside `nvim-cmp` #137
4040
- enhance: highlight all lspkind list in `nvim-cmp` #137
41+
- Link common highlights for `diff` group
4142

4243
### Fixes
4344

lua/github-theme/theme.lua

+12-12
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,22 @@ function M.setup(config)
1919
ColorColumn = {bg = c.bg_visual}, -- used for the columns set with 'colorcolumn'
2020
Conceal = {fg = c.fg_gutter}, -- placeholder characters substituted for concealed text (see 'conceallevel')
2121
Cursor = {fg = c.bg, bg = c.fg}, -- character under the cursor
22-
lCursor = {fg = c.bg, bg = c.fg}, -- the character under the cursor when |language-mapping| is used (see 'guicursor')
23-
CursorIM = {fg = c.bg, bg = c.fg}, -- like Cursor, but used when in IME mode |CursorIM|
22+
lCursor = {link = "Cursor"}, -- the character under the cursor when |language-mapping| is used (see 'guicursor')
23+
CursorIM = {link = "Cursor"}, -- like Cursor, but used when in IME mode |CursorIM|
2424
CursorColumn = {bg = c.bg_highlight}, -- Screen-column at the cursor, when 'cursorcolumn' is set.
25-
CursorLine = {bg = c.bg_highlight}, -- Screen-line at the cursor, when 'cursorline' is set. Low-priority if foreground (ctermfg OR guifg) is not set.
25+
CursorLine = {link = "CursorColumn"}, -- Screen-line at the cursor, when 'cursorline' is set. Low-priority if foreground (ctermfg OR guifg) is not set.
2626
Directory = {fg = c.blue}, -- directory names (and other special names in listings)
27-
DiffAdd = {bg = c.diff.add}, -- diff mode: Added line |diff.txt|
28-
DiffChange = {bg = c.diff.change}, -- diff mode: Changed line |diff.txt|
29-
DiffDelete = {bg = c.diff.delete}, -- diff mode: Deleted line |diff.txt|
27+
DiffAdd = {fg = c.diff.add_fg, bg = c.diff.add}, -- diff mode: Added line |diff.txt|
28+
DiffChange = {fg = c.diff.change_fg, bg = c.diff.change}, -- diff mode: Changed line |diff.txt|
29+
DiffDelete = {fg = c.diff.delete_fg, bg = c.diff.delete}, -- diff mode: Deleted line |diff.txt|
3030
DiffText = {fg = c.fg_gutter}, -- diff mode: Changed text within a changed line |diff.txt|
3131
EndOfBuffer = {fg = c.eob}, -- filler lines (~) after the end of the buffer. By default, this is highlighted like |hl-NonText|.
3232
-- TermCursor = { }, -- cursor in a focused terminal
3333
-- TermCursorNC= { }, -- cursor in an unfocused terminal
3434
ErrorMsg = {fg = c.error}, -- error messages on the command line
3535
VertSplit = {fg = c.bg_visual, bg = c.bg}, -- the column separating vertically split windows
3636
Folded = {fg = c.fg_folded, bg = c.bg_folded}, -- line used for closed folds
37-
FoldColumn = {fg = c.fg_folded, bg = c.bg_folded}, -- 'foldcolumn'
37+
FoldColumn = {link = "Folded"}, -- 'foldcolumn'
3838
SignColumn = {bg = config.transparent and c.none or c.bg, fg = c.fg_gutter}, -- column where |signs| are displayed
3939
SignColumnSB = {bg = c.bg_sidebar, fg = c.fg_gutter}, -- column where |signs| are displayed
4040
Substitute = {bg = c.red, fg = c.black}, -- |:substitute| replacement text highlighting
@@ -350,9 +350,9 @@ function M.setup(config)
350350
illuminatedCurWord = {bg = c.lsp.referenceText},
351351

352352
-- diff
353-
diffAdded = {bg = c.diff.add, fg = c.diff.add_fg},
354-
diffRemoved = {bg = c.diff.delete, fg = c.diff.delete_fg},
355-
diffChanged = {bg = c.diff.change, fg = c.diff.change_fg},
353+
diffAdded = {link = "DiffAdd"},
354+
diffChanged = {link = "DiffChange"},
355+
diffRemoved = {link = "DiffDelete"},
356356
diffOldFile = {fg = c.yellow},
357357
diffNewFile = {fg = c.orange},
358358
diffFile = {fg = c.blue},
@@ -365,8 +365,8 @@ function M.setup(config)
365365
NeogitHunkHeader = {bg = c.bg_highlight, fg = c.fg},
366366
NeogitHunkHeaderHighlight = {bg = c.bg_highlight, fg = c.blue, style = "italic"},
367367
NeogitDiffContextHighlight = {bg = c.bg, fg = c.fg},
368-
NeogitDiffDeleteHighlight = {fg = c.diff.delete_fg, bg = c.diff.delete},
369-
NeogitDiffAddHighlight = {fg = c.diff.add_fg, bg = c.diff.add},
368+
NeogitDiffAddHighlight = {link = "DiffAdd"},
369+
NeogitDiffDeleteHighlight = {link = "DiffDelete"},
370370

371371
-- GitGutter
372372
GitGutterAdd = {fg = c.git_signs.add}, -- diff mode: Added line |diff.txt|

0 commit comments

Comments
 (0)