Improve context in diff hunk headings

Inspired by https://protesilaos.com/codelog/2021-01-26-git-diff-hunk-elisp-org/
This commit is contained in:
Henrik Lissner 2021-03-06 22:31:37 -05:00
parent 8a6bf347e9
commit 5d86b2a1a9
3 changed files with 8 additions and 0 deletions

3
config/git/attributes Normal file
View file

@ -0,0 +1,3 @@
*.lisp diff=lisp
*.el diff=lisp
*.org diff=org

View file

@ -36,3 +36,7 @@
insteadOf = bb: insteadOf = bb:
[url "https://git.v0.com"] [url "https://git.v0.com"]
insteadOf = v0: insteadOf = v0:
[diff "lisp"]
xfuncname = "^(((;;;+ )|\\(|([ \t]+\\(((cl-|el-patch-)?def(un|var|macro|method|custom)|gb/))).*)$"
[diff "org"]
xfuncname = "^(\\*+ +.*)$"

View file

@ -21,6 +21,7 @@ in {
home.configFile = { home.configFile = {
"git/config".source = "${configDir}/git/config"; "git/config".source = "${configDir}/git/config";
"git/ignore".source = "${configDir}/git/ignore"; "git/ignore".source = "${configDir}/git/ignore";
"git/attributes".source = "${configDir}/git/attributes";
}; };
modules.shell.zsh.rcFiles = [ "${configDir}/git/aliases.zsh" ]; modules.shell.zsh.rcFiles = [ "${configDir}/git/aliases.zsh" ];