feat(user/jj): improve jj configuration

This commit is contained in:
2026-01-25 16:19:09 +01:00
parent 5d9efbb651
commit c8fd643085

View File

@@ -45,9 +45,8 @@ in {
default-command = "st"; default-command = "st";
pager = ":builtin"; pager = ":builtin";
show-cryptographic-signatures = true; show-cryptographic-signatures = true;
conflict-marker-style = "git"; # Support for vc-jj.el
diff-formatter = ":git"; # Support for vc-jj.el
diff-editor = ":builtin"; diff-editor = ":builtin";
merge-editort = ":builtin";
inherit (cfg) editor; inherit (cfg) editor;
}; };
signing = mkIf cfg.signing.enable { signing = mkIf cfg.signing.enable {
@@ -63,24 +62,41 @@ in {
eject = ["squash" "--from" "@" "--into"]; eject = ["squash" "--from" "@" "--into"];
d = ["diff"]; d = ["diff"];
dm = ["desc" "-m"]; dm = ["desc" "-m"];
gc = ["git" "clone"];
gcc = ["git" "clone" "--colocate"];
l = ["log"]; l = ["log"];
la = ["log" "-r" "::"];
lc = ["log" "-r" "(remote_bookmarks()..@)::"]; lc = ["log" "-r" "(remote_bookmarks()..@)::"];
ll = ["log" "-T" "builtin_log_detailed"]; ll = ["log" "-T" "builtin_log_detailed"];
open = ["log" "-r" "open()"]; open = ["log" "-r" "open()"];
n = ["new"]; n = ["new"];
nd = ["new" "dev()"]; nd = ["new" "dev()"];
nt = ["new" "trunk()"]; nt = ["new" "trunk()"];
revlog = ["evolog"];
s = ["show"]; s = ["show"];
tug = ["bookmark" "move" "--from" "heads(::@- & bookmarks())" "--to" "@-"]; tug = ["bookmark" "move" "--from" "heads(::@- & bookmarks())" "--to" "@-"];
}; };
colors.working_copy.underline = true;
git = {
private-commits = "blacklist()";
colocate = true;
subprocess = true;
};
revset-aliases = { revset-aliases = {
"immutable_heads()" = "present(trunk()) | tags()";
# Resolves by default to latest main/master remote bookmarks
"trunk()" = "latest((present(main) | present(master)) & remote_bookmarks())";
# Same as trunk() but for `dev` or `develop` bookmarks
"dev()" = "latest((present(dev) | present(develop)) & remote_bookmarks())";
"user(x)" = "author(x) | committer(x)"; "user(x)" = "author(x) | committer(x)";
"gh_pages()" = "ancestors(remote_bookmarks(exact:\"gh-pages\"))"; "gh_pages()" = "ancestors(remote_bookmarks(exact:\"gh-pages\"))";
"trunk()" = "latest((present(main) | present(master)) & remote_bookmarks())";
"dev()" = "latest((present(dev) | present(develop)) & remote_bookmarks())"; #Private and WIP commits that should never be pushed
"wip()" = "description(glob:\"wip:*\")"; "wip()" = "description(glob:\"wip:*\")";
"private()" = "description(glob:\"private:*\")"; "private()" = "description(glob:\"private:*\")";
"blacklist()" = "wip() | private()"; "blacklist()" = "wip() | private()";
# stack(x, n) is the set of mutable commits reachable from # stack(x, n) is the set of mutable commits reachable from
# 'x', with 'n' parents. 'n' is often useful to customize the # 'x', with 'n' parents. 'n' is often useful to customize the
# display and return set for certain operations. 'x' can be # display and return set for certain operations. 'x' can be
@@ -93,6 +109,7 @@ in {
"open()" = "stack(dev().. & mine(), 1)"; "open()" = "stack(dev().. & mine(), 1)";
"ready()" = "open() ~ blacklist()::"; "ready()" = "open() ~ blacklist()::";
}; };
remotes.origin.auto-track-bookmarks = "*";
}; };
}; };
} }