delta icon indicating copy to clipboard operation
delta copied to clipboard

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

Open ourigen opened this issue 4 years ago • 1 comments

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

ourigen avatar Oct 02 '21 15:10 ourigen

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.

dandavison avatar Nov 02 '21 01:11 dandavison