From b742c50bf119d7c442a553cc52e8afde0086ae02 Mon Sep 17 00:00:00 2001 From: Joel Palmer Date: Thu, 29 Jul 2021 16:16:45 -0500 Subject: feat: add git reset action for git commits picker (#999) --- lua/telescope/builtin/git.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lua/telescope/builtin/git.lua') diff --git a/lua/telescope/builtin/git.lua b/lua/telescope/builtin/git.lua index 4bf0283..513dbed 100644 --- a/lua/telescope/builtin/git.lua +++ b/lua/telescope/builtin/git.lua @@ -65,8 +65,14 @@ git.commits = function(opts) previewers.git_commit_message.new(opts), }, sorter = conf.file_sorter(opts), - attach_mappings = function() + attach_mappings = function(_, map) actions.select_default:replace(actions.git_checkout) + map("i", "m", actions.git_reset_mixed) + map("n", "m", actions.git_reset_mixed) + map("i", "s", actions.git_reset_soft) + map("n", "s", actions.git_reset_soft) + map("i", "h", actions.git_reset_hard) + map("n", "h", actions.git_reset_hard) return true end, }):find() -- cgit v1.2.3