From dfa4933ce23fc60b3bf3542170d7c59177855caa Mon Sep 17 00:00:00 2001 From: JSchrtke <31078741+JSchrtke@users.noreply.github.com> Date: Sun, 2 May 2021 09:24:55 +0200 Subject: [PATCH] Add different highlight color for 'diff text' (#27) When lookin at diffs, it is very useful to not only see if a line changed, but also have a highlight for what exactly changed within the line. --- lua/tokyonight/colors.lua | 2 +- lua/tokyonight/theme.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/tokyonight/colors.lua b/lua/tokyonight/colors.lua index 394d4ad..3c7f1c8 100644 --- a/lua/tokyonight/colors.lua +++ b/lua/tokyonight/colors.lua @@ -39,7 +39,7 @@ function M.setup(config) teal = "#1abc9c", red = "#f7768e", red1 = "#db4b4b", - diff = { change = "#394b70", add = "#164846", delete = "#823c41" }, + diff = { change = "#394b70", add = "#164846", delete = "#823c41", text = '#E0AF68' }, git = { change = "#6183bb", add = "#449dab", delete = "#f7768e" }, } if config.style == "night" or vim.o.background == "light" then colors.bg = "#1a1b26" end diff --git a/lua/tokyonight/theme.lua b/lua/tokyonight/theme.lua index 3c86fd3..870f55b 100644 --- a/lua/tokyonight/theme.lua +++ b/lua/tokyonight/theme.lua @@ -27,7 +27,7 @@ function M.setup(config) DiffAdd = { bg = c.diff.add }, -- diff mode: Added line |diff.txt| DiffChange = { bg = c.diff.change }, -- diff mode: Changed line |diff.txt| DiffDelete = { bg = c.diff.delete }, -- diff mode: Deleted line |diff.txt| - DiffText = { bg = c.diff.change }, -- diff mode: Changed text within a changed line |diff.txt| + DiffText = { bg = c.diff.text, fg = c.diff.change }, -- diff mode: Changed text within a changed line |diff.txt| EndOfBuffer = { fg = c.bg }, -- filler lines (~) after the end of the buffer. By default, this is highlighted like |hl-NonText|. -- TermCursor = { }, -- cursor in a focused terminal -- TermCursorNC= { }, -- cursor in an unfocused terminal