mirror of
https://github.com/LazyVim/starter.git
synced 2026-07-22 20:41:04 +00:00
Better gitsigns
This commit is contained in:
parent
dc3cc00284
commit
590a588378
1 changed files with 15 additions and 0 deletions
15
lua/plugins/gitsigns.lua
Normal file
15
lua/plugins/gitsigns.lua
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
require("gitsigns").setup({
|
||||
current_line_blame = false,
|
||||
on_attach = function(bufnr)
|
||||
local gs = package.loaded.gitsigns
|
||||
|
||||
-- Stage hunk
|
||||
-- vim.keymap.set("n", "<leader>ga", gs.stage_hunk, { buffer = bufnr })
|
||||
vim.keymap.set("v", "<leader>ga", function()
|
||||
gs.stage_hunk({ vim.fn.line("."), vim.fn.line("v") })
|
||||
end, { buffer = bufnr })
|
||||
|
||||
-- Stage buffer
|
||||
vim.keymap.set("n", "<leader>ga", gs.stage_buffer, { buffer = bufnr })
|
||||
end,
|
||||
})
|
||||
Loading…
Add table
Reference in a new issue