neovim: Show deleted code in gitsigns mode
This commit is contained in:
parent
51461f4685
commit
1d92d61e26
2 changed files with 9 additions and 4 deletions
|
|
@ -5,7 +5,7 @@
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||||
"context.vim": { "branch": "master", "commit": "108644e146c864995288dee7dacf219267917ac1" },
|
"context.vim": { "branch": "master", "commit": "108644e146c864995288dee7dacf219267917ac1" },
|
||||||
"fzf": { "branch": "master", "commit": "db01e7dab65423cd1d14e15f5b15dfaabe760283" },
|
"fzf": { "branch": "master", "commit": "db01e7dab65423cd1d14e15f5b15dfaabe760283" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "8df63f2ddc615feb71fd4aee45a4cee022876df1" },
|
"gitsigns.nvim": { "branch": "main", "commit": "220446c8c86a280180d852efac60991eaf1a21d4" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "bc620783663ab09d16bff9fdecc07da65b2a1528" },
|
"lazy.nvim": { "branch": "main", "commit": "bc620783663ab09d16bff9fdecc07da65b2a1528" },
|
||||||
"lush.nvim": { "branch": "main", "commit": "7c0e27f50901481fe83b974493c4ea67a4296aeb" },
|
"lush.nvim": { "branch": "main", "commit": "7c0e27f50901481fe83b974493c4ea67a4296aeb" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "37a336b653f8594df75c827ed589f1c91d91ff6c" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "37a336b653f8594df75c827ed589f1c91d91ff6c" },
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ return {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lewis6991/gitsigns.nvim",
|
"lewis6991/gitsigns.nvim",
|
||||||
|
commit = "220446c8c86a280180d852efac60991eaf1a21d4",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
init = function()
|
init = function()
|
||||||
local gitsigns = require("gitsigns")
|
local gitsigns = require("gitsigns")
|
||||||
|
|
@ -38,16 +39,20 @@ return {
|
||||||
-- enter a race with cursor movement and leave a ghost blame in
|
-- enter a race with cursor movement and leave a ghost blame in
|
||||||
-- the buffer.
|
-- the buffer.
|
||||||
|
|
||||||
gitsigns.toggle_current_line_blame(value)
|
show = not show
|
||||||
gitsigns.toggle_signs(value)
|
gitsigns.toggle_current_line_blame(show)
|
||||||
|
gitsigns.toggle_deleted(show)
|
||||||
|
gitsigns.toggle_signs(show)
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>g", toggle)
|
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.prev_hunk)
|
||||||
|
vim.keymap.set("n", "]h", gitsigns.next_hunk)
|
||||||
end,
|
end,
|
||||||
opts = {
|
opts = {
|
||||||
signcolumn = false,
|
signcolumn = false,
|
||||||
|
show_deleted = false,
|
||||||
|
current_line_blame = false,
|
||||||
current_line_blame_formatter = ' <author> <author_time:%Y-%m-%d> <summary>',
|
current_line_blame_formatter = ' <author> <author_time:%Y-%m-%d> <summary>',
|
||||||
current_line_blame_opts = {
|
current_line_blame_opts = {
|
||||||
virt_text = true,
|
virt_text = true,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue