-
Notifications
You must be signed in to change notification settings - Fork 398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No way to disable syntax in hunk header🐛 #1032
Comments
+1 - I'm also annoyed by this as the syntax is often not helpful. |
Hey @washtubs, @deanhouseholder. I agree that it should let you do this! Are you sure it isn't working already though? A quick test:
I'm also able to reproduce that using [delta]
hunk-header-style = line-number |
Oh I don't mean the coloring, I was thinking in your second example, it should just be a box with "21:". That was my understanding of what syntax referred to unless I'm missing something? |
Ah, right! No, We don't currently have a way to say "please hide the hunk header code fragment entirely". However, you could set its foreground color to be equal to your background :) E.g. I have a white background currently:
Of course, that leaves a large box... you could play with
Does anything along those lines achieve what you're looking for, at least as a workaround? |
It is a workaround for sure! I'm not too keen on the invisible text method as it's still gonna be there and still be selectable, not to mention I'm not confident I would be able to programmatically pick the right background color depending on the environment. I did experiment with another setting, because I don't necessarily even need the line number, I tried For example this is with a hunk header. This is without a hunk header. Note that after |
In case it helps, this is exactly the problem I'm having and hoping for a solution to. @washtubs nailed it. |
Adding another "+1" to the list here, I struggled fighting the settings to try and get things working but to no avail. Another thing I noticed with |
I ran into this today and decided to work on a patch to make it configurable. I have not filed a PR yet but you can view/try the branch at my fork (diff view). My one hesitation is that while it technically won't change delta's default behavior, existing "themes" will drop the code fragment unless they are updated. This could be worked around by e.g. using |
#Hi @zmc, I think your design is how it should have been initially. However, I'm not sure it's worth the breaking change today. We do already use the word "omit" with special meaning:
So perhaps we should just call this Internally, I'd be happy for your implementation to use the non-inverted names that you are currently, i.e. |
Agreed - I don't like the idea of breaking anyone's existing configuration.
Ended up doing exactly this :) |
The help menu seems to suggest that I can adjust this
However if I use
--hunk-header-style "line-number"
without specifyingsyntax
I still see the syntax. I would think since I didn't specify syntax it wouldn't show that. I understand changing this might be considered "breaking". Is there any other way to keep the hunk header but not show the syntax? Maybe a newnosyntax
option? Personally I like having the hunk headers clearly visible, but I find the syntax to just be distracting for the files I'm comparing.The text was updated successfully, but these errors were encountered: