diff options
| author | Thomas Vanbesien <tvanbesi@proton.me> | 2026-05-21 16:16:23 +0200 |
|---|---|---|
| committer | Thomas Vanbesien <tvanbesi@proton.me> | 2026-05-21 16:16:23 +0200 |
| commit | ac87610c0cf8b76094aae3695194e0ceca74c07b (patch) | |
| tree | 30b8e1126c88c25ff4ec194793c20d9e91f4ef5d /plugin | |
| parent | c56cbe03f69d456a221ef80a9c50f258e0675c19 (diff) | |
| download | nvim-config-ac87610c0cf8b76094aae3695194e0ceca74c07b.tar.gz nvim-config-ac87610c0cf8b76094aae3695194e0ceca74c07b.zip | |
misc(nvim): add keymaps for GitGutter functions
Diffstat (limited to 'plugin')
| -rw-r--r-- | plugin/50-git.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/plugin/50-git.lua b/plugin/50-git.lua index ee5da46..8a8a634 100644 --- a/plugin/50-git.lua +++ b/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", |
