From 1681414244e44e5aef51daf1cd139acff27b8568 Mon Sep 17 00:00:00 2001 From: Andrew Liu Date: Thu, 22 Feb 2024 19:38:38 -0500 Subject: [PATCH] Add some new gitconfigs https://jvns.ca/blog/2024/02/16/popular-git-config-options/ --- config/nvim/lua/settings.lua | 6 ++++++ home/main.gitconfig | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/config/nvim/lua/settings.lua b/config/nvim/lua/settings.lua index 232c573..a7a30b4 100644 --- a/config/nvim/lua/settings.lua +++ b/config/nvim/lua/settings.lua @@ -20,6 +20,12 @@ vim.api.nvim_create_autocmd("Filetype", { vim.opt.expandtab = false end, }) +vim.filetype.add({ + extension = { + -- Set files like "main.gitconfig" to be gitconfig files. + gitconfig = "gitconfig" + }, +}) vim.cmd([[filetype plugin indent on]]) -- Enable filetype-specific indentation. -- Search settings. diff --git a/home/main.gitconfig b/home/main.gitconfig index 52dee7e..46fb185 100644 --- a/home/main.gitconfig +++ b/home/main.gitconfig @@ -18,7 +18,7 @@ [format] pretty = %C(auto)%h%Creset -%C(auto)%d%Creset %s %C(blue)<%an> %Cgreen(%cr)%Creset [push] - default = simple + default = current [pager] # Disable paging for `git branch`. branch = false @@ -28,3 +28,9 @@ side-by-side = true [interactive] diffFilter = delta --color-only +[merge] + conflictstyle = zdiff3 +[commit] + verbose = true +[diff] + algoritm = histogram