mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
delta: add jujutsu integration option
This commit is contained in:
parent
a12a837d99
commit
0a3fb53ee2
4 changed files with 56 additions and 0 deletions
|
|
@ -64,6 +64,16 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
enableJujutsuIntegration = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable jujutsu integration for delta.
|
||||
|
||||
When enabled, delta will be configured as jujutsus's pager, diff filter, and merge tool.
|
||||
'';
|
||||
};
|
||||
|
||||
finalPackage = mkOption {
|
||||
type = types.package;
|
||||
readOnly = true;
|
||||
|
|
@ -123,5 +133,18 @@ in
|
|||
delta = cfg.options;
|
||||
};
|
||||
})
|
||||
|
||||
(lib.mkIf (cfg.enable && cfg.enableJujutsuIntegration) {
|
||||
programs.jujutsu.settings = {
|
||||
merge-tools.delta.diff-expected-exit-codes = [
|
||||
0
|
||||
1
|
||||
];
|
||||
ui = {
|
||||
diff-formatter = ":git";
|
||||
pager = "${lib.getExe cfg.package}";
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue