SuperBo / fugit2.nvim

Neovim git GUI powered by libgit2
MIT License
352 stars 7 forks source link

feature: Use the git repository of the current buffer instead of the cwd. #26

Closed Kraust closed 4 months ago

Kraust commented 4 months ago

Did you check the docs?

Is your feature request related to a problem? Please describe.

I open up many git repositories in my instance of vim, to the point where using cd and lcd is not a viable solution (but can be used if absolutely necessary). Other git plugins derive the git repo from the open buffer's path and this is a workflow that works better for me.

Describe the solution you'd like

I assume it has something to do with swapping out cwd here: https://github.com/SuperBo/fugit2.nvim/blob/55f3a90521f1f40c88afb2af2173567dc01d294b/lua/fugit2/init.lua#L39.

Describe alternatives you've considered

Just using cd and lcd can solve the problem.

Additional context

No response

SuperBo commented 4 months ago

Hi @Kraust, this should be fixed in https://github.com/SuperBo/fugit2.nvim/pull/27. Please let me know if this fix your problem.

Kraust commented 4 months ago

@SuperBo quick check and it looks like it works.

Thank you for the fast reply.