dandavison / delta

A syntax-highlighting pager for git, diff, grep, and blame output
https://dandavison.github.io/delta/
MIT License
24.59k stars 395 forks source link

🐛 No way to style hunk-header syntax with raw option? #728

Open ourigen opened 3 years ago

ourigen commented 3 years ago

Hey there, thank you for this great program! I want to style my pager output similar to Github's, but I can't seem to find a way to style this portion below to be gray italic. I've searched through the docs and issues, but maybe I'm missing something.

My guess is that because I also passed in raw to hunk-header-style in addition to syntax, any styling after that is not taking effect. The relevant part of my gitconfig is below

[delta]
  theme = base16
  syntax-theme = base16
  file-decoration-style = "#414868" ul ol
  hunk-header-style = raw syntax "#414868" italic
  hunk-header-decoration-style = none
  line-numbers = true
  line-numbers-left-format = "{nm:^4}⁞{np:^4}│"
  line-numbers-left-style = "#414868"
  line-numbers-right-format = " "
  line-numbers-right-style = "#414868"
  line-numbers-zero-style = "#414868"
  line-numbers-plus-style = "#164846"
  line-numbers-minus-style = "#823c41"
  side-by-side = true

[color "diff"]
  frag = "#414868" italic
dandavison commented 3 years ago

Thanks @ourigen! And sorry to be slow. I can reproduce this -- as you say, it looks like hunk-header-style=raw doesn't apply to the "frag" in the way one might expect and that's making it impossible/non-obvious to replicate something like github's style, with the hunk-header metadata, and the frag, styled the same.