mirror of
https://github.com/nix-community/home-manager
synced 2024-12-24 02:39:48 +01:00
git: add option to set difftastic display setting
This commit is contained in:
parent
c645cc9f82
commit
0639aa34f1
1 changed files with 16 additions and 2 deletions
|
@ -265,6 +265,16 @@ in {
|
|||
Determines when difftastic should color its output.
|
||||
'';
|
||||
};
|
||||
|
||||
display = mkOption {
|
||||
type =
|
||||
types.enum [ "side-by-side" "side-by-side-show-both" "inline" ];
|
||||
default = "side-by-side";
|
||||
example = "inline";
|
||||
description = ''
|
||||
Determines how the output displays - in one column or two columns.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
delta = {
|
||||
|
@ -476,8 +486,12 @@ in {
|
|||
home.packages = [ pkgs.difftastic ];
|
||||
|
||||
programs.git.iniContent = let
|
||||
difftCommand =
|
||||
"${pkgs.difftastic}/bin/difft --color ${cfg.difftastic.color} --background ${cfg.difftastic.background}";
|
||||
difftCommand = concatStringsSep " " [
|
||||
"${pkgs.difftastic}/bin/difft"
|
||||
"--color ${cfg.difftastic.color}"
|
||||
"--background ${cfg.difftastic.background}"
|
||||
"--display ${cfg.difftastic.display}"
|
||||
];
|
||||
in {
|
||||
diff.external = difftCommand;
|
||||
core.pager = "${pkgs.less}/bin/less -XF";
|
||||
|
|
Loading…
Reference in a new issue