Merge pull request #214 from barrettruth/feat/highlights
use default neovim group highlights
This commit is contained in:
commit
7dafb7ea43
3 changed files with 17 additions and 16 deletions
|
|
@ -784,12 +784,15 @@ HIGHLIGHT GROUPS *cp-highlights*
|
||||||
|
|
||||||
Test Status Groups ~
|
Test Status Groups ~
|
||||||
|
|
||||||
CpTestAC Green foreground for AC status
|
All test status groups link to builtin highlight groups, automatically adapting
|
||||||
CpTestWA Red foreground for WA status
|
to your colorscheme:
|
||||||
CpTestTLE Orange foreground for TLE status
|
|
||||||
CpTestMLE Orange foreground for MLE status
|
CpTestAC Links to DiagnosticOk (AC status)
|
||||||
CpTestRTE Purple foreground for RTE status
|
CpTestWA Links to DiagnosticError (WA status)
|
||||||
CpTestNA Gray foreground for remaining state
|
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 ~
|
ANSI Color Groups ~
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -367,14 +367,12 @@ end
|
||||||
---@return table<string, table>
|
---@return table<string, table>
|
||||||
function M.get_highlight_groups()
|
function M.get_highlight_groups()
|
||||||
return {
|
return {
|
||||||
CpTestAC = { fg = '#10b981' },
|
CpTestAC = { link = 'DiagnosticOk' },
|
||||||
CpTestWA = { fg = '#ef4444' },
|
CpTestWA = { link = 'DiagnosticError' },
|
||||||
CpTestTLE = { fg = '#f59e0b' },
|
CpTestTLE = { link = 'DiagnosticWarn' },
|
||||||
CpTestMLE = { fg = '#f59e0b' },
|
CpTestMLE = { link = 'DiagnosticWarn' },
|
||||||
CpTestRTE = { fg = '#8b5cf6' },
|
CpTestRTE = { link = 'DiagnosticHint' },
|
||||||
CpTestNA = { fg = '#6b7280' },
|
CpTestNA = { link = 'Comment' },
|
||||||
CpDiffRemoved = { fg = '#ef4444', bg = '#1f1f1f' },
|
|
||||||
CpDiffAdded = { fg = '#10b981', bg = '#1f1f1f' },
|
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ local function parse_diff_line(text)
|
||||||
line = 0,
|
line = 0,
|
||||||
col_start = highlight_start,
|
col_start = highlight_start,
|
||||||
col_end = #result_text,
|
col_end = #result_text,
|
||||||
highlight_group = 'CpDiffRemoved',
|
highlight_group = 'DiffDelete',
|
||||||
})
|
})
|
||||||
pos = removed_end + 1
|
pos = removed_end + 1
|
||||||
else
|
else
|
||||||
|
|
@ -38,7 +38,7 @@ local function parse_diff_line(text)
|
||||||
line = 0,
|
line = 0,
|
||||||
col_start = highlight_start,
|
col_start = highlight_start,
|
||||||
col_end = #result_text,
|
col_end = #result_text,
|
||||||
highlight_group = 'CpDiffAdded',
|
highlight_group = 'DiffAdd',
|
||||||
})
|
})
|
||||||
pos = added_end + 1
|
pos = added_end + 1
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue