mini.nvim
mini.nvim copied to clipboard
mini.git alternative to vim-fugitive
Contributing guidelines
- [X] I have read CONTRIBUTING.md
- [X] I have read CODE_OF_CONDUCT.md
Module(s)
None
Description
I think another valuable addition would be port of tpope/vim-fugitive to neovim.
Thanks for the suggestion!
Thought about this did cross my mind. It is a monumental task and there are great alternatives. Personally I use lazygit
in terminal and that is more than enough.
So it is a "maybe", but not in the near future.
Always looked for this but never found it, if it ever makes it to Mini that would be incredible!
I also look forward to a sensible and great lua alternative to fugitive, but in my opinion git integration would have really a lot of and extensive features to write. Wouldn't it be too big for the scope of minimal "mini.vim"?
I also look forward to a sensible and great lua alternative to fugitive, but in my opinion git integration would have really a lot of and extensive features to write. Wouldn't it be too big for the scope of minimal "mini.vim"?
That is my current state of mind on this topic, yes. But you never know, maybe some manageable approach will come to mind here.
A year ago I had the same opinion about Lua replacement of 'targets.vim', an yet 'mini.ai' came just at the limit of what I consider a comfortable module size and scope.
I'm sure requirements are different for everyone but git commit, pull, push and log would be a great starting point.
git grep to quickfix list is basically my only requirement, personally.
I'm sure requirements are different for everyone but git commit, pull, push and log would be a great starting point.
Yep, for me too. Plus partial staging. These are mostly everything I've done with 'vim-fugitive' back when I was using it.
Honest question, what would be the advantage of porting vim-fugitive instead of using it as is?
Honest question, what would be the advantage of porting vim-fugitive instead of using it as is?
No one says about porting the whole 'tpope/vim-fugitive'. And no one says the result will have an advantage.
The whole idea of 'mini.nivm' is to provide all round out of the box experience with relatively comprehensible code base (with strictly one file per full "plugin"). As I consider Git to be an essential part of modern advanced text editor experience, hence 'mini.git' is something I am not against of doing eventually.
@echasnovski thanks for the reply and for all your work on mini.nvim :heart: (and for your nvim setup which I have shamelessly lifted)
git grep to quickfix list is basically my only requirement, personally.
@adastx I have been happy with this so :grep
uses git grep
:
vim.o.grepprg = 'git --no-pager grep --no-color -n $*'
vim.o.grepformat = '%f:%l:%m,%m %f match%ts,%f'
One thing I love about fugitive is :Git
: it allows me to leverage all my CLI git-fu (and vice versa, reinforces it) with -- where meaningful -- Vim integration and the convenience of not having to spam a terminal for one-off commands.
A mini.git
that offers (only) this interface would be very appealing to me. (You could still create custom mappings for often-used commands, of course.) Benefit would be lower-latency vim.system
implementation (fugitive can be quite slow if it has to process a lot of content into a buffer).
(Of course, my pipe dream is https://github.com/libgit2/luagit2 integration in Neovim...)
One thing I love about fugitive is
:Git
: it allows me to leverage all my CLI git-fu (and vice versa, reinforces it) with -- where meaningful -- Vim integration and the convenience of not having to spam a terminal for one-off commands.A
mini.git
that offers (only) this interface would be very appealing to me. (You could still create custom mappings for often-used commands, of course.) Benefit would be lower-latencyvim.system
implementation (fugitive can be quite slow if it has to process a lot of content into a buffer).
Funnily enough, this (having Neovim-tailored :Git
command similar to 'vim-fugitive') is my ballpark goal right now. I think I would also like to see if adding blame/praise is feasible with small amount of code.
(Of course, my pipe dream is https://github.com/libgit2/luagit2 integration in Neovim...)
You and me both.
With the release of mini.git I consider this issue (finally) resolved. Check out the new module and possibly leave feedback in #898. Thanks!