From 53b8bd0175b4376deb655b686c3328814d175c7f Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 12 Jun 2025 21:39:56 +0200 Subject: [PATCH] jj: Update delta diff settings Remove deprecated 'ui.diff.format' setting and replace with 'ui.diff-formatter'. Use the time to also ONLY set up delta as the diff and show command pager using scopes (since I was perusing the jj discussions anyway). This has the advantage that normal jj paging is done with `-FRX` as far as I understand -- which means after we close out of the pager the content remains on screen (-X). This is not the case with delta. So now, the contents of e.g. the last log command should always stay on screen. --- vcs/jj/config/jj/config.toml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/vcs/jj/config/jj/config.toml b/vcs/jj/config/jj/config.toml index 134f553..05f0890 100644 --- a/vcs/jj/config/jj/config.toml +++ b/vcs/jj/config/jj/config.toml @@ -13,10 +13,14 @@ private-commits = "description(glob-i:'WIP:*') | description(glob-i:'PRIVATE:*') [ui] default-command = "log" diff-editor = ["nvim", "-c", "DiffEditor $left $right $output"] -pager = "delta" -[ui.diff] -format = "git" # for the time being to use delta well +# use delta as formatter but _only_ for diff and show +# see: https://github.com/jj-vcs/jj/discussions/4690#discussioncomment-12388965 +[[--scope]] +--when.commands = ["diff", "show"] +[--scope.ui] +pager = "delta" +diff-formatter = ":git" [aliases] # see: https://shaddy.dev/notes/jj-tug/, update most recent bookmark