echasnovski / mini.nvim

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

mini.git alternative to vim-fugitive #139

Closed adastx closed 4 months ago

adastx commented 2 years ago

Contributing guidelines

Module(s)

None

Description

I think another valuable addition would be port of tpope/vim-fugitive to neovim.

echasnovski commented 2 years ago

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.

unansweredocd commented 1 year ago

Always looked for this but never found it, if it ever makes it to Mini that would be incredible!

wookayin commented 1 year ago

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"?

echasnovski commented 1 year ago

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.

unansweredocd commented 1 year ago

I'm sure requirements are different for everyone but git commit, pull, push and log would be a great starting point.

adastx commented 1 year ago

git grep to quickfix list is basically my only requirement, personally.

echasnovski commented 1 year ago

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.

diogob commented 1 year ago

Honest question, what would be the advantage of porting vim-fugitive instead of using it as is?

echasnovski commented 1 year ago

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.

diogob commented 1 year ago

@echasnovski thanks for the reply and for all your work on mini.nvim :heart: (and for your nvim setup which I have shamelessly lifted)

bzub commented 7 months ago

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'
clason commented 7 months ago

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...)

echasnovski commented 7 months ago

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).

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.

echasnovski commented 4 months ago

With the release of mini.git I consider this issue (finally) resolved. Check out the new module and possibly leave feedback in #898. Thanks!