Closed gegoune closed 2 years ago
Just browsing their source it seems that they have a Nord syntax. Try delta --syntax-theme=Nord
:)
If that's not what you're after I could take a look at setting something up for you.
Ah, that's amazing! Thanks, I did look at colours from delta --show-syntax-themes
and even searched for nord
! No idea why I didn't find it. Thanks!
Edit: I know why! I used terminal's search option rather than pager's one. Did not notice it was a pager. :)
That solves half of the problem only though.
You can see how very much not nordic are those highlights for diffs.
Stand by... I'll put something together.
The hard part here is to get a neutral background color for those lines, i.e {plus, minus}-style
:sweat_smile:
Try this one and see if its to your liking. If not I'll spend a bit more time tuning that.
[delta "nordic"]
commit-decoration-style = bold
dark = true
file-decoration-style = none
file-style = omit
hunk-header-decoration-style = "#3b4252"
hunk-header-file-style = "#d8dee9"
hunk-header-line-number-style = bold "#a3be8c"
hunk-header-style = file line-number syntax
line-numbers = true
line-numbers-left-style = "#3b4252"
line-numbers-minus-style = "#bf616a"
line-numbers-plus-style = "#a3be8c"
line-numbers-right-style = "#3b4252"
line-numbers-zero-style = "#d8dee9"
minus-emph-style = normal "#bf616a"
minus-style = normal "#4e4252"
plus-emph-style = syntax "#a3be8c"
plus-style = syntax "#3b5952"
syntax-theme = Nord
FYI the nordic vim diff background color is #3b4252
if you don't want the red/green line highlight :)
Oh wow, very nice! Thank you so much!
Only issue I am seeing without digging in too much is plus-style
:
And (that's easy) maybe white line numbers could be tuned down a bit?
I think I like to keep those backgrounds, they really help to see things quickly. This is the part I struggled the most!
Does this improve things ?
[delta "nordic"]
commit-decoration-style = bold
dark = true
file-decoration-style = none
file-style = omit
hunk-header-decoration-style = "#3b4252"
hunk-header-file-style = "#c2cbdb"
hunk-header-line-number-style = bold "#525f46"
hunk-header-style = file line-number syntax
line-numbers = true
line-numbers-left-style = "#3b4252"
line-numbers-minus-style = "#bf616a"
line-numbers-plus-style = "#525f46"
line-numbers-right-style = "#3b4252"
line-numbers-zero-style = "#c2cbdb"
minus-emph-style = normal "#bf616a"
minus-style = normal "#4e4252"
plus-emph-style = syntax "#525f46"
plus-style = syntax "#3b5952"
syntax-theme = Nord
The main issue here is that with syntax enabled and without dynamic coloring options, there's pretty much no way to make this work perfectly purely with the standard terminal/vim palette.
I had a mistake there...
hunk-header-line-number-style = bold "#a3be8c"
line-numbers-plus-style = "#a3be8c"
without dynamic coloring options
I'm stupid... it's obvious that it's possible to disable the syntax, lol. So if you want the OG green color and you can read that with white, then this should do:
plus-emph-style = normal "#a3be8c"
Ah, I see, it makes sense. It's not the prettiest green now but at least can see though background now.
Couldn't read the original one though (Can you? Really?) so opted for dark-on-light plus-emph-style = black "#a3be8c"
For some reason though when doing git add --path
(1) I get nice line colours:
but in git diff
it looks like:
Would there really be different settings for those two scenarios?
Thank you so so much!
1) you would need:
[interactive]
diffFilter = delta --color-only
Couldn't read the original one though (Can you? Really?) so opted for dark-on-light plus-emph-style = black "#a3be8c"
Ah, nice! That's much clearer. And yeah, I could see it just fine. That could change though, because I use different color filters on my monitor based on time :sweat_smile:
Would there really be different settings for those two scenarios?
This was solved with the you woild need
, right ?
Would there really be different settings for those two scenarios?
This was solved with the
you woild need
, right ?
Unfortunately not, it was just a requirement for getting git add --patch
work with delta
.
Oh, okay.
I've been using git diff
the entire time while testing this and this is my entire config:
[delta "nordic"]
commit-decoration-style = bold
dark = true
file-decoration-style = none
file-style = omit
hunk-header-decoration-style = "#3b4252"
hunk-header-file-style = "#c2cbdb"
hunk-header-line-number-style = bold "#a3be8c"
hunk-header-style = file line-number syntax
line-numbers = true
line-numbers-left-style = "#3b4252"
line-numbers-minus-style = "#bf616a"
line-numbers-plus-style = "#a3be8c"
line-numbers-right-style = "#3b4252"
line-numbers-zero-style = "#c2cbdb"
minus-emph-style = normal "#bf616a"
minus-style = normal "#4e4252"
plus-emph-style = black "#a3be8c"
plus-style = syntax "#3b5952"
syntax-theme = Nord
[core]
pager = delta
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true
features = nordic
[merge]
conflictstyle = diff3
[diff]
colorMoved = default
Aha! It's (colours for line numbers) different if you add side-by-side
feature for whatever reason.
I don't see any difference when I add side-by-side
and use git diff
:thinking:
FYI
$ delta --version
delta 0.11.3
You need to activate side-by-side view:
[delta]
navigate = true
features = nordic side-by-side
Shouldn't that be like this though ? That's what I've tested.
[delta]
navigate = true
features = nordic
side-by-side = true
Very interesting! It must have changed in some version with old option still available but not working properly any longer? Or maybe I was setting it wrong for years… Oh well, doesn't matter as it works now just perfectly.
I am so thankful for your time today. You are the best! Tusen takk!
Hey, at least it works now!
Du er velkommen :)
Apologies for it not being anyhow related to this colorscheme. Have spent hours trying to get delta (https://github.com/dandavison/delta) look decent/same as diff in nvim but am failing miserably. Wanted to ask if you do use it by any chance and have some nice nordic configuration for it? It's fine if you just close it without even saying a word, apologies for overstepping!