Merge pull request #214 from barrettruth/feat/highlights

use default neovim group highlights
This commit is contained in:
Barrett Ruth 2026-01-27 13:33:01 -06:00 committed by GitHub
commit 7dafb7ea43
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 17 additions and 16 deletions

View file

@ -784,12 +784,15 @@ HIGHLIGHT GROUPS *cp-highlights*
Test Status Groups ~
CpTestAC Green foreground for AC status
CpTestWA Red foreground for WA status
CpTestTLE Orange foreground for TLE status
CpTestMLE Orange foreground for MLE status
CpTestRTE Purple foreground for RTE status
CpTestNA Gray foreground for remaining state
All test status groups link to builtin highlight groups, automatically adapting
to your colorscheme:
CpTestAC Links to DiagnosticOk (AC status)
CpTestWA Links to DiagnosticError (WA status)
CpTestTLE Links to DiagnosticWarn (TLE status)
CpTestMLE Links to DiagnosticWarn (MLE status)
CpTestRTE Links to DiagnosticHint (RTE status)
CpTestNA Links to Comment (pending/unknown status)
ANSI Color Groups ~

View file

@ -367,14 +367,12 @@ end
---@return table<string, table>
function M.get_highlight_groups()
return {
CpTestAC = { fg = '#10b981' },
CpTestWA = { fg = '#ef4444' },
CpTestTLE = { fg = '#f59e0b' },
CpTestMLE = { fg = '#f59e0b' },
CpTestRTE = { fg = '#8b5cf6' },
CpTestNA = { fg = '#6b7280' },
CpDiffRemoved = { fg = '#ef4444', bg = '#1f1f1f' },
CpDiffAdded = { fg = '#10b981', bg = '#1f1f1f' },
CpTestAC = { link = 'DiagnosticOk' },
CpTestWA = { link = 'DiagnosticError' },
CpTestTLE = { link = 'DiagnosticWarn' },
CpTestMLE = { link = 'DiagnosticWarn' },
CpTestRTE = { link = 'DiagnosticHint' },
CpTestNA = { link = 'Comment' },
}
end

View file

@ -26,7 +26,7 @@ local function parse_diff_line(text)
line = 0,
col_start = highlight_start,
col_end = #result_text,
highlight_group = 'CpDiffRemoved',
highlight_group = 'DiffDelete',
})
pos = removed_end + 1
else
@ -38,7 +38,7 @@ local function parse_diff_line(text)
line = 0,
col_start = highlight_start,
col_end = #result_text,
highlight_group = 'CpDiffAdded',
highlight_group = 'DiffAdd',
})
pos = added_end + 1
else