difftastic: add jujutsu integration
This commit is contained in:
@@ -104,6 +104,16 @@ in
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
jujutsu = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable jujutsu integration for difftastic.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config =
|
||||
@@ -142,5 +152,18 @@ in
|
||||
];
|
||||
};
|
||||
})
|
||||
|
||||
(mkIf (cfg.enable && cfg.jujutsu.enable) {
|
||||
programs.jujutsu.settings.ui.diff-formatter = [
|
||||
(lib.getExe cfg.package)
|
||||
]
|
||||
++ (lib.cli.toCommandLineGNU { } cfg.options)
|
||||
++ [
|
||||
"--color=always"
|
||||
"--sort-paths"
|
||||
"$left"
|
||||
"$right"
|
||||
];
|
||||
})
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user