diff options
| author | Robert Günzler <r@gnzler.io> | 2026-09-27 17:38:39 +0200 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2026-09-27 17:38:39 +0200 |
| commit | 0860db73ae6fd9a6f6347219d820bf026a6b8b91 (patch) | |
| tree | 11318c3670d1c32c5aa0bf404c22fba3bf63fc53 /.config/nvim/after/ftplugin/gitrebase.lua | |
| parent | 4e34cbf9673aeaba252e01df554a0d204e83c5e2 (diff) | |
| download | dotfiles-0860db73ae6fd9a6f6347219d820bf026a6b8b91.tar.gz | |
Automated-commit-by: dots Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to '')
| -rw-r--r-- | .config/nvim/after/ftplugin/gitrebase.lua | 19 |
1 files changed, 17 insertions, 2 deletions
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('<cword>') - -- require('gitsigns').show_commit(cword, 'aboveleft split') + local commit = vim.fn.expand('<cword>') + + 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 }) |