Replies: 1 comment 1 reply
-
Assuming you have gitsigns installed, I have: local gitActions = {
actions = {
["open_file"] = function(picker)
local currentCommit = picker:current().commit
picker:close()
vim.cmd("Gitsigns show " .. currentCommit)
end,
["diffview"] = function(picker)
local currentCommit = picker:current().commit
picker:close()
vim.cmd("DiffviewOpen HEAD " .. currentCommit)
end,
},
win = {
input = {
keys = {
["<CR>"] = {
"open_file",
desc = "Open File",
mode = { "n", "i" },
},
["<c-d>"] = {
"diffview",
desc = "Diffview",
mode = { "n", "i" },
},
},
},
},
}
And picker = {
sources = {
git_log_file = gitActions,
git_log = gitActions,
}
}
Hitting Enter will open the file in a new buffer/window and in a diffview window |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I used it in
fzf-lua
.Example
Screen.Recording.2025-01-24.at.11.27.12.mov
Lua code:
Beta Was this translation helpful? Give feedback.
All reactions