akinsho / git-conflict.nvim

A plugin to visualise and resolve merge conflicts in neovim
1k stars 35 forks source link

Add conflict_count function #75

Closed daanvdk closed 10 months ago

daanvdk commented 11 months ago

This PR adds a simple function that returns the amount of conflicts in a buffer. This can be useful to for example display the amount of conflicts in your statusline. Since git-conflict is already keeping track of this anyway its nice to be able to reuse that information.

daanvdk commented 11 months ago

I have now added some documentation as well. Please let me know if it is in the format you would want/expect.

daanvdk commented 11 months ago

@akinsho I moved the docs to the readme. Was not really sure how to do the formatting of the function spec in markdown in a way that it would look nice in the vimdoc as well. So I just put it in a vimdoc block for now.

akinsho commented 10 months ago

@daanvdk sorry for the delay on this, I'm not sure how this will behave in the way that you've done the documentation but I'm guessing it might not work too well. I merge it in and see but I think it's quite likely to not come through let's see

EDIT: It worked perfectly 🙌🏾