feat: render annotations the way github.com does #33
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/github-band"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Checklist
Supersedes #32, which is closed. Two commits: the label, then the band.
Problem
##[error]and##[warning]are markers, not text. The raw byte isThere is no "Error" in the log and no ANSI on the line — the word, the bold, the
red fill and the ordinary-white message are all github.com's rendering of that
marker. We concealed the marker, tinted the whole line one colour, and dropped
the word.
Its blocks also run past the marker. A single Homebrew warning in one
neovim/neovimjob is eighteen lines, only the first of which carries atimestamp; we rendered the other seventeen as unrelated output.
Solution
feat: draw the word …(+19/-6) — the label as inline virtual text wherethe marker was, sharing one extmark with the indent already at that column so
the two cannot fight over ordering. The same substitution
gSmakes when itshows
Mon, 27 Jul 2026 15:14:08 GMTfor the ISO stamp. Bytes untouched, soyanking still gives
##[error]….feat: band annotations …(+79/-4) — everything else:DiagnosticVirtualTextErrorlinks back toDiagnosticError, andErrorMsgis foreground-only — and the foreground is a light tint (
#ffc0b9) unusableas one. Mixed 18% from
Normal.bg:#3e3537and#3e3a31.ColorSchemeandOptionSet backgroundautocommands, since a mixed colouris stale the moment either changes.
Normal.bgis unset, as on a transparent terminal.hl_eoland an explicit priority, so the fill reaches the window edge andsits under the log's own ANSI spans rather than erasing them.
hl_groupdoes not colourvirtual text, so the indent would otherwise leave a two-column hole.
CiBold, because the label is bold on the web.What this costs, plainly
+95/-7 on a 2173-line plugin, so a little over 4%, and
log.luagoes from 468to 521. Four new highlight groups, two of which cannot be links and must be
recomputed. The first place the plugin cares what colour your editor is. A
gotoin the parse loop.And it is still not github.com's red — it is a red mixed from your
colourscheme. Theirs would mean hardcoding their palette and ignoring your
theme.
feat: band annotations the way github.com doesto feat: render annotations the way github.com does