1
0
Fork 0

neovim: Show deleted code in gitsigns mode

This commit is contained in:
Jeremy Kaplan 2024-07-08 14:26:28 -04:00
commit 1d92d61e26
2 changed files with 9 additions and 4 deletions

View file

@ -5,7 +5,7 @@
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"context.vim": { "branch": "master", "commit": "108644e146c864995288dee7dacf219267917ac1" },
"fzf": { "branch": "master", "commit": "db01e7dab65423cd1d14e15f5b15dfaabe760283" },
"gitsigns.nvim": { "branch": "main", "commit": "8df63f2ddc615feb71fd4aee45a4cee022876df1" },
"gitsigns.nvim": { "branch": "main", "commit": "220446c8c86a280180d852efac60991eaf1a21d4" },
"lazy.nvim": { "branch": "main", "commit": "bc620783663ab09d16bff9fdecc07da65b2a1528" },
"lush.nvim": { "branch": "main", "commit": "7c0e27f50901481fe83b974493c4ea67a4296aeb" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "37a336b653f8594df75c827ed589f1c91d91ff6c" },

View file

@ -29,6 +29,7 @@ return {
},
{
"lewis6991/gitsigns.nvim",
commit = "220446c8c86a280180d852efac60991eaf1a21d4",
lazy = false,
init = function()
local gitsigns = require("gitsigns")
@ -38,16 +39,20 @@ return {
-- enter a race with cursor movement and leave a ghost blame in
-- the buffer.
gitsigns.toggle_current_line_blame(value)
gitsigns.toggle_signs(value)
show = not show
gitsigns.toggle_current_line_blame(show)
gitsigns.toggle_deleted(show)
gitsigns.toggle_signs(show)
end
vim.keymap.set("n", "<leader>g", toggle)
vim.keymap.set("n", "]h", gitsigns.next_hunk)
vim.keymap.set("n", "[h", gitsigns.prev_hunk)
vim.keymap.set("n", "]h", gitsigns.next_hunk)
end,
opts = {
signcolumn = false,
show_deleted = false,
current_line_blame = false,
current_line_blame_formatter = ' <author> <author_time:%Y-%m-%d> <summary>',
current_line_blame_opts = {
virt_text = true,