diff --git a/nvim/lua/plugins/snacks.lua b/nvim/lua/plugins/snacks.lua index d604fdf..30b46cb 100644 --- a/nvim/lua/plugins/snacks.lua +++ b/nvim/lua/plugins/snacks.lua @@ -96,8 +96,8 @@ return { [""] = { "close", mode = { "n", "i" } }, [""] = { "preview_scroll_up", mode = { "i", "n" } }, [""] = { "preview_scroll_down", mode = { "i", "n" } }, - [""] = function() vim.cmd "normal! I" end, - [""] = function() vim.cmd "startinsert!" end, + [""] = function() vim.cmd "normal! I" end, + [""] = function() vim.cmd "startinsert!" end, }, }, }, @@ -106,7 +106,7 @@ return { hidden = true, }, grep = { - layout = "ivy", + layout = "bottom", hidden = true, }, git_branches = { @@ -114,9 +114,23 @@ return { }, git_log = { confirm = "git_show", + win = { + input = { + keys = { + [""] = { "git_fixup", mode = { "i", "n" } }, + }, + }, + }, }, git_log_file = { confirm = "git_show", + win = { + input = { + keys = { + [""] = { "git_fixup", mode = { "i", "n" } }, + }, + }, + }, }, }, actions = { @@ -124,6 +138,10 @@ return { picker:close() git_show(item.commit) end, + git_fixup = function(picker, item) + picker:close() + vim.cmd("G commit --fixup=" .. item.commit) + end }, layouts = { default = { @@ -187,7 +205,6 @@ return { width = 0, height = 0.5, border = "none", - position = "bottom", { box = "vertical", border = "none",