feat: initial commit
- basic config according to spec
This commit is contained in:
commit
9b0446c5f6
36 files changed
+1114
No files matched your search
@@ -0,0 +1,24 @@
|
||||
return {
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
opts = {
|
||||
on_attach = function(buf)
|
||||
local gs = require("gitsigns")
|
||||
local function map(mode, lhs, rhs, desc)
|
||||
vim.keymap.set(mode, lhs, rhs, { buffer = buf, desc = desc })
|
||||
end
|
||||
map("n", "<leader>gs", gs.stage_hunk, "Stage hunk")
|
||||
map("n", "<leader>gr", gs.reset_hunk, "Reset hunk")
|
||||
map("x", "<leader>gs", function()
|
||||
gs.stage_hunk({ vim.fn.line("."), vim.fn.line("v") })
|
||||
end, "Stage selection")
|
||||
map("x", "<leader>gr", function()
|
||||
gs.reset_hunk({ vim.fn.line("."), vim.fn.line("v") })
|
||||
end, "Reset selection")
|
||||
map("n", "<leader>gb", gs.blame_line, "Blame line")
|
||||
map("n", "<leader>gp", gs.preview_hunk, "Preview hunk")
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in new issue
Block a user