mirror of
https://github.com/srid/nixos-config.git
synced 2026-05-11 17:36:07 +08:00
use delta as git diff view
This commit is contained in:
parent
294bca352e
commit
ffb5e3f8ed
2 changed files with 20 additions and 0 deletions
|
|
@ -1,5 +1,7 @@
|
|||
{ pkgs, config, flake, ... }:
|
||||
{
|
||||
imports = [ ./git_delta.nix ];
|
||||
|
||||
home.packages = [ pkgs.git-lfs ];
|
||||
|
||||
programs.git = {
|
||||
|
|
|
|||
18
home/git_delta.nix
Normal file
18
home/git_delta.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ pkgs, lib, ... }:
|
||||
|
||||
# https://github.com/dandavison/delta#get-started
|
||||
# https://dandavison.github.io/delta/configuration.html
|
||||
{
|
||||
programs.git.extraConfig = {
|
||||
core.pager = lib.getExe pkgs.delta;
|
||||
interactive.diffFilter = "${lib.getExe pkgs.delta} --color-only --features=interactive";
|
||||
delta = {
|
||||
features = "decorations";
|
||||
navigate = true;
|
||||
light = false;
|
||||
side-by-side = true;
|
||||
};
|
||||
merge.conflictstyle = "diff3";
|
||||
diff.colorMoved = "default";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue