users/foo-dogsquared/programs/vs-code: integrate as Git merge and diff tool

This commit is contained in:
Gabriel Arazas 2024-11-19 20:24:41 +08:00
parent e910c1d389
commit 523998dbba
No known key found for this signature in database
GPG Key ID: 62104B43D00AA360

View File

@ -33,5 +33,16 @@ in
"extensions.ignoreRecommendations" = true;
};
};
# We're using Visual Studio Code as a git difftool and mergetool which is
# surprisingly good compared to the competition (which is not much).
programs.git.extraConfig = {
diff.tool = lib.mkDefault "vscode";
difftool.vscode.cmd = "code --wait --diff $LOCAL $REMOTE";
# It has a three-way merge.
merge.tool = lib.mkDefault "vscode";
mergetool.vscode.cmd = "code --wait --merge $REMOTE $LOCAL $BASE $MERGED";
};
};
}