mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-12 01:59:37 +08:00
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:
@@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user