Skip to content

feat: add OctoReviewDiffDelete and OctoReviewDiffAdd highlights - #1562

Merged
williambdean merged 1 commit into
pwntester:masterfrom
Danthewaann:add-more-diff-highlights
Oct 9, 2026
Merged

williambdean merged 1 commit into
pwntester:masterfrom
Danthewaann:add-more-diff-highlights

Conversation

@Danthewaann

Copy link
Copy Markdown
Contributor

Describe what this PR does / why we need it

Adds new OctoReviewDiffDelete and OctoReviewDiffAdd highlights so users can better customise the colours that are used in the diff view. This follows up on #1500. These new highlights default to DiffDelete and DiffAdd so nothing changes for existing users.

Does this pull request fix one issue?

NONE

Describe how to verify it

Adjust the OctoReviewDiffDelete OctoReviewDiffAdd highlights via vim.api.nvim_set_hl e.g. vim.api.nvim_set_hl(0, "OctoReviewDiffDelete", {bg = "#172a3a"}). Then open up a review with some changes and you should see the deleted lines now have #172a3a as their background colour.

Checklist

  • Passing tests and linting standards
  • Documentation updates in README.md and doc/octo.txt

@Danthewaann
Danthewaann force-pushed the add-more-diff-highlights branch from d37df55 to 63f5678 Compare September 12, 2026 06:57
@disrupted

Copy link
Copy Markdown
Contributor

I would very much appreciate this getting merged as it would enable the use of custom colorschemes.

the current way is a non-starter. for reference, the complicated workaround that's currently necessary

local constants = require 'octo.constants'
for _, ns in ipairs {
    constants.OCTO_REVIEW_LEFT_HIGHLIGHT_NS,
    constants.OCTO_REVIEW_RIGHT_HIGHLIGHT_NS,
} do
    vim.api.nvim_set_hl(ns, 'DiffAdd', { bg = '#abc' }) -- custom color
    vim.api.nvim_set_hl(ns, 'DiffDelete', { bg = '#eee' })
end

@williambdean
williambdean merged commit 259bc3f into pwntester:master Oct 9, 2026
6 checks passed
@williambdean

Copy link
Copy Markdown
Collaborator

Thanks @Danthewaann !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants