feat(jj): configure to use hunk.nvim if available #472

Merged
jalil merged 1 commit from push-vuzrslssuqnq into main 2025-05-13 00:33:41 +02:00
Showing only changes of commit 77c73c2ea9 - Show all commits

View file

@ -123,9 +123,21 @@ in
# Jujutsu (alternative DVCS (git-compatible)) # Jujutsu (alternative DVCS (git-compatible))
jujutsu = { jujutsu = {
enable = true; enable = true;
# Use the more up to date version of jj
package = pkgs.unstable.jujutsu; package = pkgs.unstable.jujutsu;
settings = { settings = {
ui.pager = "bat"; ui = lib.mkMerge [
# If `bat` is available use it as the pager
(lib.mkIf config.programs.bat.enable { pager = "bat"; })
# if hunk.nvim is enabled use it as a diff editor
(lib.mkIf config.programs.nixvim.plugins.hunk.enable {
diff-editor = [
"nvim"
"-c"
"DiffEditor $left $right $output"
];
})
];
fix.tools = builtins.mapAttrs (tool: cmd: jjFormatters.${tool} cmd) nvimFormatters; fix.tools = builtins.mapAttrs (tool: cmd: jjFormatters.${tool} cmd) nvimFormatters;
# mimic git commit --verbose by adding a diff # mimic git commit --verbose by adding a diff
templates.draft_commit_description = '' templates.draft_commit_description = ''