use { "milennik/gitdiff.nvim" }
-
Pass the reference branch name as parameter to compare HEAD with it. This key map can be used to compare HEAD with a default reference branch:
map('n', '<C-y>', ":lua require('gitdiff').diff('master')<cr>") -
If we don't pass any parameter, the
promtwill be shown, and we can enter any branch to compare to:map('n', '<C-[>', ":lua require('gitdiff').diff()<cr>") -
git diffvertical split:map('n', '<C-p>', ":Gvdiffsplit master<cr>") -
Swap windows:
C+w, x