Adding a commit binding in the git status telescope

This commit is contained in:
Zoe Roux
2022-04-13 10:58:45 +02:00
parent f9804e97e9
commit 68946a6dfe
2 changed files with 14 additions and 1 deletions
@@ -4,7 +4,7 @@ if not status_ok then
end
configs.setup({
ensure_installed = "maintained",
ensure_installed = "all",
sync_install = false,
highlight = {
enable = true,
@@ -4,6 +4,12 @@ if not status_ok then
end
local actions = require "telescope.actions"
local transform_mod = require('telescope.actions.mt').transform_mod
local local_actions = transform_mod({
commit = function()
vim.cmd(":Git commit")
end,
})
telescope.setup({
defaults = {
@@ -38,6 +44,13 @@ telescope.setup({
hidden = true,
find_command = { "fd", "--type", "f", "--strip-cwd-prefix", "-E", ".git" },
},
git_status = {
mappings = {
i = {
["<c-c>"] = local_actions.commit,
},
},
},
},
})