mirror of
https://github.com/nix-community/home-manager
synced 2024-12-25 03:09:47 +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.
|
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 = {
|
delta = {
|
||||||
|
@ -476,8 +486,12 @@ in {
|
||||||
home.packages = [ pkgs.difftastic ];
|
home.packages = [ pkgs.difftastic ];
|
||||||
|
|
||||||
programs.git.iniContent = let
|
programs.git.iniContent = let
|
||||||
difftCommand =
|
difftCommand = concatStringsSep " " [
|
||||||
"${pkgs.difftastic}/bin/difft --color ${cfg.difftastic.color} --background ${cfg.difftastic.background}";
|
"${pkgs.difftastic}/bin/difft"
|
||||||
|
"--color ${cfg.difftastic.color}"
|
||||||
|
"--background ${cfg.difftastic.background}"
|
||||||
|
"--display ${cfg.difftastic.display}"
|
||||||
|
];
|
||||||
in {
|
in {
|
||||||
diff.external = difftCommand;
|
diff.external = difftCommand;
|
||||||
core.pager = "${pkgs.less}/bin/less -XF";
|
core.pager = "${pkgs.less}/bin/less -XF";
|
||||||
|
|
Loading…
Reference in a new issue