feat(git): Delta -> Difftastic

This commit is contained in:
punkfairie 2024-11-14 19:01:47 -08:00
parent d184d54b07
commit 84ddc9e3d2
Signed by: punkfairie
GPG key ID: A509E8F77FB9D696
2 changed files with 23 additions and 10 deletions

View file

@ -52,17 +52,28 @@
# ██████╔╝███████╗███████╗██║ ██║ ██║ # ██████╔╝███████╗███████╗██║ ██║ ██║
# ╚═════╝ ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═╝ # ╚═════╝ ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═╝
delta = { # delta = {
enable = true; # enable = true;
#
# options = {
# navigate = true;
# # TODO: Add to rose-pine-nix
# syntax-theme = "rose-pine";
# features = "mellow-barbet";
# true-color = "always";
# hyperlinks = true;
# };
# };
options = { # ██████╗ ██╗███████╗███████╗████████╗ █████╗ ███████╗████████╗██╗ ██████╗
navigate = true; # ██╔══██╗██║██╔════╝██╔════╝╚══██╔══╝██╔══██╗██╔════╝╚══██╔══╝██║██╔════╝
# TODO: Add to rose-pine-nix # ██║ ██║██║█████╗ █████╗ ██║ ███████║███████╗ ██║ ██║██║
syntax-theme = "rose-pine"; # ██║ ██║██║██╔══╝ ██╔══╝ ██║ ██╔══██║╚════██║ ██║ ██║██║
features = "mellow-barbet"; # ██████╔╝██║██║ ██║ ██║ ██║ ██║███████║ ██║ ██║╚██████╗
true-color = "always"; # ╚═════╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═════╝
hyperlinks = true;
}; difftastic = {
enable = true;
}; };
# ██████╗ ██████╗ ███╗ ██╗███████╗██╗ ██████╗ # ██████╗ ██████╗ ███╗ ██╗███████╗██╗ ██████╗

View file

@ -1,6 +1,7 @@
{ config, lib, ... }: { config, lib, ... }:
let let
has-delta = config.programs.git.delta.enable; has-delta = config.programs.git.delta.enable;
has-difftastic = config.programs.git.difftastic.enable;
in in
{ {
programs.lazygit = { programs.lazygit = {
@ -12,6 +13,7 @@ in
git.paging = { git.paging = {
colorArg = "always"; colorArg = "always";
pager = lib.mkIf has-delta "delta --paging=never --features=arctic-fox"; pager = lib.mkIf has-delta "delta --paging=never --features=arctic-fox";
externalDiffCommand = lib.mkIf has-difftastic "difft --color=always --display=inline";
}; };
os.editPreset = "nvim-remote"; os.editPreset = "nvim-remote";