mirror of
https://github.com/zoriya/flake.git
synced 2026-06-08 12:53:13 +00:00
Add git fixup binding on git log
This commit is contained in:
@@ -96,8 +96,8 @@ return {
|
|||||||
["<c-c>"] = { "close", mode = { "n", "i" } },
|
["<c-c>"] = { "close", mode = { "n", "i" } },
|
||||||
["<c-u>"] = { "preview_scroll_up", mode = { "i", "n" } },
|
["<c-u>"] = { "preview_scroll_up", mode = { "i", "n" } },
|
||||||
["<c-d>"] = { "preview_scroll_down", mode = { "i", "n" } },
|
["<c-d>"] = { "preview_scroll_down", mode = { "i", "n" } },
|
||||||
["<C-a>"] = function() vim.cmd "normal! I" end,
|
["<c-a>"] = function() vim.cmd "normal! I" end,
|
||||||
["<C-e>"] = function() vim.cmd "startinsert!" end,
|
["<c-e>"] = function() vim.cmd "startinsert!" end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -106,7 +106,7 @@ return {
|
|||||||
hidden = true,
|
hidden = true,
|
||||||
},
|
},
|
||||||
grep = {
|
grep = {
|
||||||
layout = "ivy",
|
layout = "bottom",
|
||||||
hidden = true,
|
hidden = true,
|
||||||
},
|
},
|
||||||
git_branches = {
|
git_branches = {
|
||||||
@@ -114,9 +114,23 @@ return {
|
|||||||
},
|
},
|
||||||
git_log = {
|
git_log = {
|
||||||
confirm = "git_show",
|
confirm = "git_show",
|
||||||
|
win = {
|
||||||
|
input = {
|
||||||
|
keys = {
|
||||||
|
["<c-f>"] = { "git_fixup", mode = { "i", "n" } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
git_log_file = {
|
git_log_file = {
|
||||||
confirm = "git_show",
|
confirm = "git_show",
|
||||||
|
win = {
|
||||||
|
input = {
|
||||||
|
keys = {
|
||||||
|
["<c-f>"] = { "git_fixup", mode = { "i", "n" } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
actions = {
|
actions = {
|
||||||
@@ -124,6 +138,10 @@ return {
|
|||||||
picker:close()
|
picker:close()
|
||||||
git_show(item.commit)
|
git_show(item.commit)
|
||||||
end,
|
end,
|
||||||
|
git_fixup = function(picker, item)
|
||||||
|
picker:close()
|
||||||
|
vim.cmd("G commit --fixup=" .. item.commit)
|
||||||
|
end
|
||||||
},
|
},
|
||||||
layouts = {
|
layouts = {
|
||||||
default = {
|
default = {
|
||||||
@@ -187,7 +205,6 @@ return {
|
|||||||
width = 0,
|
width = 0,
|
||||||
height = 0.5,
|
height = 0.5,
|
||||||
border = "none",
|
border = "none",
|
||||||
position = "bottom",
|
|
||||||
{
|
{
|
||||||
box = "vertical",
|
box = "vertical",
|
||||||
border = "none",
|
border = "none",
|
||||||
|
|||||||
Reference in New Issue
Block a user