akinsho / akinsho/git-conflict.nvim

Introduce a new event GitConflictAborted or fire GitConflictResolved when git merge conflict is aborted

Aperta
#55 3 commenti 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
Lua
Stelle
1.4k
Fork
70
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Hello,

I have been using the `git-conflict.nvim` plugin and it has been a great addition to my development process. However, I have noticed a potential area for improvement concerning the management of aborted git merge conflicts.

Currently, the plugin fires a `User` autocommand `GitConflictDetected` when a conflict is detected, and another autocommand `GitConflictResolved` when it is resolved. This functionality is quite useful and allows users to set specific mappings or processes for these events.

However, there seems to be a gap when a merge conflict is aborted. When the conflict is aborted, no event is dispatched and previously loaded user settings (such as mappings) are not unloaded for the buffer. This can lead to unnecessary mappings and even lingering diagnostic information if the option is enabled, as the plugin uses these events internally.

To address this, I propose that we should fire the `GitConflictResolved` event when a merge conflict is aborted. This would naturally unload the associated settings and clear any lingering diagnostics. However, if this could potentially break compatibility, an alternative could be to introduce a new event like `GitConflictAborted`. This new event could be dispatched whenever a merge conflict is aborted, allowing users to handle this case separately if they desire.

I would be more than happy to contribute and submit a pull request to implement this feature. However, I may need some guidance or hints on where to start. Any assistance would be greatly appreciated.

Thank you for your time and consideration. I look forward to hearing your thoughts on this matter.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.