summaryrefslogtreecommitdiff
path: root/lua/telescope/builtin
diff options
context:
space:
mode:
authorthibthib18 <37300147+thibthib18@users.noreply.github.com>2021-09-10 08:50:58 +0200
committerGitHub <noreply@github.com>2021-09-10 08:50:58 +0200
commitb4d6eb9a232dab48ce658470a980e7a15edb500f (patch)
tree84a5febeb7c2315deba9e74457e770a3840c4ab1 /lua/telescope/builtin
parentd2b768983cc7be755d255649cfd0d998b11bd203 (diff)
feat: git merge branch action (#1220)
Diffstat (limited to 'lua/telescope/builtin')
-rw-r--r--lua/telescope/builtin/git.lua3
-rw-r--r--lua/telescope/builtin/init.lua1
2 files changed, 4 insertions, 0 deletions
diff --git a/lua/telescope/builtin/git.lua b/lua/telescope/builtin/git.lua
index a2be2fb..a4da679 100644
--- a/lua/telescope/builtin/git.lua
+++ b/lua/telescope/builtin/git.lua
@@ -297,6 +297,9 @@ git.branches = function(opts)
map("i", "<c-d>", actions.git_delete_branch)
map("n", "<c-d>", actions.git_delete_branch)
+
+ map("i", "<c-y>", actions.git_merge_branch)
+ map("n", "<c-y>", actions.git_merge_branch)
return true
end,
}):find()
diff --git a/lua/telescope/builtin/init.lua b/lua/telescope/builtin/init.lua
index a3ea4c6..e790700 100644
--- a/lua/telescope/builtin/init.lua
+++ b/lua/telescope/builtin/init.lua
@@ -186,6 +186,7 @@ builtin.git_bcommits = require_on_exported_call("telescope.builtin.git").bcommit
--- - `<C-r>`: rebases currently selected branch
--- - `<C-a>`: creates a new branch, with confirmation prompt before creation
--- - `<C-d>`: deletes the currently selected branch, with confirmation prompt before deletion
+--- - `<C-y>`: merges the currently selected branch, with confirmation prompt before deletion
---@param opts table: options to pass to the picker
builtin.git_branches = require_on_exported_call("telescope.builtin.git").branches