neovim: rewrite config

This commit is contained in:
2023-08-29 00:42:44 +03:00
parent fd67c6c242
commit 7221b8a04b
26 changed files with 106 additions and 872 deletions

View File

@@ -0,0 +1,22 @@
local actions = require("gitsigns.actions")
require("gitsigns").setup({
signcolumn = true,
attach_to_untracked = false,
current_line_blame = true,
current_line_blame_opts = {
delay = 1000,
},
current_line_blame_formatter_opts = {
relative_time = true,
},
on_attach = function(bufnr)
vim.keymap.set("n", "gn", actions.next_hunk)
vim.keymap.set("n", "gN", actions.prev_hunk)
vim.keymap.set("n", "gr", actions.reset_hunk)
end,
})
vim.keymap.set("n", "<leader>gg", ":Git<CR>")
vim.keymap.set("n", "gh", ":diffget //2<CR>")
vim.keymap.set("n", "gl", ":diffget //3<CR>")