ms-jpq / sad

CLI search and replace | Space Age seD
MIT License
1.71k stars 22 forks source link

How to set delta theme #231

Closed uloco closed 1 year ago

uloco commented 1 year ago

I'm struggling to find a way to set the delta theme. I have two different delta themes for light and dark mode. My git config looks like this:

[core]
    editor = nvim
    pager = delta --features "$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo dark-mode || echo light-mode)"

[delta "dark-mode"]
    dark = true
    syntax-theme = bluloco-dark
    ; additional theme stuff below
    ; ...
    ; ...

[delta "light-mode"]
    light = true
    syntax-theme = bluloco-light
    ; additional theme stuff below
    ; ...
    ; ...

My delta theme is set correctly in git but I don't know how to theme the output of sad. Is there any way to do this right now?

uloco commented 1 year ago

I needed to set the theme in the GIT_PAGER environment variable, because sad would not use the default from git core.pager config value.