diff options
Diffstat (limited to '.config/nvim/plugin/50-git.lua')
| -rw-r--r-- | .config/nvim/plugin/50-git.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/.config/nvim/plugin/50-git.lua b/.config/nvim/plugin/50-git.lua index ee5da46..8a8a634 100644 --- a/.config/nvim/plugin/50-git.lua +++ b/.config/nvim/plugin/50-git.lua @@ -4,6 +4,13 @@ vim.pack.add({ "https://github.com/airblade/vim-gitgutter" }) -- Show git status in the gutter +vim.opt.updatetime = 100 -- How often the git signs in the gutter update in ms + +vim.keymap.set("n", "<Leader>gt", "<Cmd>GitGutterLineHighlightsToggle<CR>", { desc = "Toggle git line highlighting" }) +vim.keymap.set("n", "<Leader>gg", "<Cmd>GitGutter<CR>", { desc = "Refresh GitGutter" }) +vim.keymap.set("n", "<Leader>gq", "<Cmd>GitGutterQuickFix<CR>", { desc = "Git hunks to quickfix list" }) +vim.keymap.set("n", "<Leader>gz", "<Cmd>GitGutterFold<CR>", { desc = "Fold everything except git diff" }) + local function git_blame(file, line) local sys = vim.system({ "bash", |
