telescope: add git bindings

This commit is contained in:
Fabrice Mouhartem 2023-12-24 22:10:28 +01:00
parent bbbd416de5
commit 9edbeeaae4

View File

@ -76,3 +76,9 @@ vim.keymap.set('n', '<leader>sg', require('telescope.builtin').live_grep, { desc
vim.keymap.set('n', '<leader>sG', ':LiveGrepGitRoot<cr>', { desc = '[S]earch by [G]rep on Git Root' })
vim.keymap.set('n', '<leader>sd', require('telescope.builtin').diagnostics, { desc = '[S]earch [D]iagnostics' })
vim.keymap.set('n', '<leader>sr', require('telescope.builtin').resume, { desc = '[S]earch [R]esume' })
-- vim telescope
vim.keymap.set('n', '<leader>gc', require('telescope.builtin').git_commits, { desc = '[G]it [C]ommits' })
vim.keymap.set('n', '<leader>gs', require('telescope.builtin').git_status, { desc = '[G]it [S]tatus' })
vim.keymap.set({'n', 'x'}, '<leader>gB', require('telescope.builtin').git_bcommits, { desc = '[G]it [B]commits' })
vim.keymap.set('n', '<leader>gb', require('telescope.builtin').git_branches, { desc = '[G]it [B]ranches' })