echasnovski / mini.nvim

Library of 40+ independent Lua modules improving overall Neovim (version 0.8 and higher) experience with minimal effort
MIT License
4.45k stars 171 forks source link

Add git conflict resolution #985

Closed RaafatTurki closed 1 week ago

RaafatTurki commented 1 week ago

Contributing guidelines

Module(s)

mini.git, mini.diff

Description

This is a very deep rabbit hole but some users (myself included) resolve their conflicts without multi-pane diffing using the bare git markers only.

My proposition here is giving mini.diff the ability to use git merge as a diffing reference for its extmarks (it would be nice to have a couple new markers such as ours, theirs if not then the same add, change, delete markers could be reused)

Furthermore mini.git could get a a keymap that accepts the hunk the curser is currently within (either the ours hunk or the theirs hunk)

similar plugins: 1 2 3 4 5 6

echasnovski commented 1 week ago

Thanks for the suggestion!

I don't see a usable/helpful way of integrating conflict resolution/visualization into 'mini.diff'. Conflict markers are searchable and quite visible text, so that working with them is as straightforward as possible.

Generally speaking, this feels like a job either for a general purpose text editing mapping or a full featured Git client (if there are some tricky edge cases I am not aware of). There is a suggested approach for the first one in 'mini.bracketed'.

Closing as not planned.