From 0860db73ae6fd9a6f6347219d820bf026a6b8b91 Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Sun, 27 Sep 2026 17:38:39 +0200 Subject: * MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated-commit-by: dots Signed-off-by: Robert Günzler --- .config/nvim/after/ftplugin/gitrebase.lua | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to '.config/nvim/after/ftplugin/gitrebase.lua') diff --git a/.config/nvim/after/ftplugin/gitrebase.lua b/.config/nvim/after/ftplugin/gitrebase.lua index f85d3b9..fb64534 100644 --- a/.config/nvim/after/ftplugin/gitrebase.lua +++ b/.config/nvim/after/ftplugin/gitrebase.lua @@ -1,4 +1,19 @@ vim.keymap.set('n', 'K', function() - -- local cword = vim.fn.expand('') - -- require('gitsigns').show_commit(cword, 'aboveleft split') + local commit = vim.fn.expand('') + + local content = nil + require('mod.jobs').start({ + cmd = { 'git', 'show', '--patch', '--stat', commit }, + stdout_buffered = true, + on_stdout = function(_, stdout) + content = stdout + end, + on_exit = function() + require('mod.win').popup( + 'git-show: ' .. commit, + content, + { buf = { filetype = 'gitcommit' } } + ) + end, + }) end, { desc = 'Lookup commit hash', buffer = 0 }) -- cgit 1.4.1