Compare commits

...

2 Commits

Author SHA1 Message Date
6beca4a66b
Use nvimdiff for git difftool 2024-06-14 00:56:07 +02:00
8ca75d2ecc
Improved gitsigns settings 2024-06-14 00:55:27 +02:00
3 changed files with 27 additions and 3 deletions

View File

@ -24,5 +24,8 @@
[commit]
gpgsign = true
[diff]
tool = nvimdiff
[includeIf "gitdir:~/Projects/ALTEN/"]
path = ~/.dotfiles/git/gitconfig/ALTEN

View File

@ -8,6 +8,21 @@ return {
delete = { text = "_" },
topdelete = { text = "" },
changedelete = { text = "~" },
untracked = { text = "|" },
},
signs_staged = {
add = { text = "+" },
change = { text = "~" },
delete = { text = "_" },
topdelete = { text = "" },
changedelete = { text = "~" },
untracked = { text = "|" },
},
attach_to_untracked = true,
current_line_blame_opts = {
virt_text_pos = "right_align",
delay = 200,
priority = 9999,
},
},
init = function()
@ -23,11 +38,13 @@ return {
{ desc = "[G]it undo [S]tage hunk" }
)
vim.keymap.set("n", "<leader>gd", require("gitsigns.actions").preview_hunk, { desc = "[G]it [D]iff hunk" })
vim.keymap.set(
"n",
"<leader>gd",
require("gitsigns.actions").preview_hunk_inline,
{ desc = "[G]it [D]iff hunk" }
"<leader>gb",
require("gitsigns.actions").toggle_current_line_blame,
{ desc = "[G]it [B]lame" }
)
vim.keymap.set("n", "<leader>gr", require("gitsigns.actions").reset_hunk, { desc = "[G]it [R]eset hunk" })

View File

@ -42,8 +42,12 @@ return {
TodoCommentTest = { fg = palette.bright_purple },
TodoCommentDefault = { fg = palette.bright_blue },
GitSignsAdd = { link = "GruvboxGreenSign" },
GitSignsStagedAdd = { fg = palette.dark_green, bg = palette.dark1 },
GitSignsChange = { link = "GruvboxAquaSign" },
GitSignsStagedChange = { fg = palette.dark_aqua, bg = palette.dark1 },
GitSignsDelete = { link = "GruvboxRedSign" },
GitSignsStagedDelete = { fg = palette.dark_red, bg = palette.dark1 },
GitSignsCurrentLineBlame = { link = "GruvboxFg4" },
NeoTreeGitAdded = { link = "GruboxGreen" },
NeoTreeGitModified = { link = "GruvboxAqua" },
NeoTreeGitDelete = { link = "GruboxRed" },