kitty: add git diff integration (#6855)
Kitty supports a diff tool integration. This allows enabling it easily for a user.
This commit is contained in:
parent
9676e8a52a
commit
20705949f1
1 changed files with 19 additions and 0 deletions
|
|
@ -248,6 +248,8 @@ in
|
|||
);
|
||||
};
|
||||
|
||||
enableGitIntegration = lib.mkEnableOption "git integration";
|
||||
|
||||
extraConfig = mkOption {
|
||||
default = "";
|
||||
type = types.lines;
|
||||
|
|
@ -329,5 +331,22 @@ in
|
|||
programs.fish.interactiveShellInit = mkIf cfg.shellIntegration.enableFishIntegration shellIntegrationInit.fish;
|
||||
|
||||
programs.zsh.initContent = mkIf cfg.shellIntegration.enableZshIntegration shellIntegrationInit.zsh;
|
||||
|
||||
programs.git.iniContent = lib.mkIf cfg.enableGitIntegration {
|
||||
diff = {
|
||||
tool = lib.mkDefault "kitty";
|
||||
guitool = lib.mkDefault "kitty.gui";
|
||||
};
|
||||
difftool = {
|
||||
prompt = lib.mkDefault false;
|
||||
trustExistCode = lib.mkDefault true;
|
||||
kitty = {
|
||||
cmd = "kitten diff $LOCAL $REMOTE";
|
||||
};
|
||||
"kitty.gui" = {
|
||||
cmd = "kitten diff $LOCAL $REMOTE";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue