Skip to content

Commit d2be4e7

Browse files
debarchitobenvinegarclaude
authored
feat(jujutsu): add enableJujutsuIntegration to home-manager options (#482)
Co-authored-by: Ben Vinegar <ben@benv.ca> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent ed8268a commit d2be4e7

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"hunkdiff": minor
3+
---
4+
5+
Add an `enableJujutsuIntegration` home-manager option that sets hunk as the jujutsu pager and switches `ui.diff-formatter` to `:git` so jj emits diffs hunk can render.

nix/home-manager.nix

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ in
4343
description = "Whether to set hunk as the default git pager.";
4444
};
4545

46+
enableJujutsuIntegration = mkOption {
47+
type = types.bool;
48+
default = false;
49+
description = "Whether to set hunk as the default jujutsu pager. Also sets ui.diff-formatter to \":git\" so jj emits git-style diffs hunk can render.";
50+
};
51+
4652
enableClaudeIntegration = mkOption {
4753
type = types.bool;
4854
default = false;
@@ -59,6 +65,13 @@ in
5965

6066
programs.git.settings.core.pager = mkIf cfg.enableGitIntegration "hunk pager";
6167

68+
programs.jujutsu.settings = mkIf cfg.enableJujutsuIntegration {
69+
ui = {
70+
diff-formatter = ":git";
71+
pager = "hunk pager";
72+
};
73+
};
74+
6275
home.file = mkIf cfg.enableClaudeIntegration {
6376
".claude/skills/hunk-review".source = "${cfg.package}/skills/hunk-review";
6477
};

0 commit comments

Comments
 (0)