From 517837c9d36c5ab5c4b22e695359f9b9a4ad0879 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Wed, 4 Feb 2026 15:58:07 -0500 Subject: [PATCH] feat: add treesitter highlights for diff files Adds support for treesitter-based diff syntax highlighting: - @diff.minus (red) and @diff.plus (green) for changed lines - @attribute.diff (blue) for hunk headers - @string.special.path and @variable.parameter linked to Normal --- lua/midnight/theme.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/midnight/theme.lua b/lua/midnight/theme.lua index 25a7a15..d4dffb7 100644 --- a/lua/midnight/theme.lua +++ b/lua/midnight/theme.lua @@ -145,7 +145,10 @@ function M.apply() hi('gitCommitSummary', { fg = cs.background }) - hi('@attribute.diff', { fg = cs.background }) + hi('@attribute.diff', { fg = cs.blue }) + hi('@diff.minus', { fg = cs.red }) + hi('@diff.plus', { fg = cs.green }) + link('Normal', { '@string.special.path', '@variable.parameter' }) hi('DiffAdd', { bg = cs.diff_add, fg = cs.green }, { '@text.diff.add', 'diffAdded' }) hi('DiffDelete', { bg = cs.diff_delete, fg = cs.red }, { '@text.diff.delete', 'diffRemoved' }) hi('DiffChange', { bg = cs.diff_change, fg = cs.blue })