Needs theme with no background color
Cretezy opened this issue · 8 comments
I use a black background in my terminal, and the "dark" themes aren't really enough. Either having a black theme or one without background color (meaning using the terminal's background) would be ideal.
Great project!
Second this. I use a terminal with a translucent background:
however, git-split-diffs adds an opaque background behind every character on the screen:
It would be great if there were an option to render a theme without any background color on the non-highlighted lines (obviously, the lines highlighted as added or removed need to have a background color)
Makes sense. The reason everything has a background is because I added support for alpha in colors, so that you could say e.g. line deletions are ff000022
which adds a reddish tinge to the background. This is especially useful if you have multiple layers like for highlighting inline changes.
Anyway, will think of a fix. Would you rather have a way to unset background colors in existing themes, or just have a separate theme without backgrounds? I'm guessing the former would be better so you can use any theme
Alternatively, a way to point to a custom .json
theme file, so everyone can be happy 😃
Oh yeah that might be better. You can hackishly do that right now by making theme-name
a relative path, but there should be a better way
I hacked together a quick fix in #8!
I just published v2.2.0 which adds support for using custom themes. The instructions are at https://github.com/banga/git-split-diffs/tree/v2.2.0?tab=readme-ov-file#custom-themes and https://github.com/banga/git-split-diffs/tree/v2.2.0?tab=readme-ov-file#want-to-remove-background-colors-from-a-theme. So far from personal usage, just removing backgroundColor
seems to be enough, but let me know what you all think.
I'm getting the following error when "SYNTAX_HIGHLIGHTING_THEME": "my-custom-theme-name",
is set in my custom theme JSON. I currently use theme names from shikijs to workaround this issue
ShikiError: Theme `my-custom-theme-name` is not included in this bundle. You may want to load it from external source.
Yeah to be clear, I've only added support to use custom themes for git-split-diffs
. Syntax highlighting happens via shikijs which has its own themes. I'll look into it though, should be easy to add. It would actually be nice to have a way to just use a shikijs theme and derive all the colors from it for git-split-diffs
.