SuperBo / fugit2.nvim

Neovim git GUI powered by libgit2
MIT License
386 stars 8 forks source link

feature: Support fzf-lua #38

Closed ryancobb closed 6 months ago

ryancobb commented 6 months ago

Did you check the docs?

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

Viewing branches requires the telescope plugin. I use fzf-lua as an alternative and receive the error Command not found: Telescope when trying to view branches.

Describe the solution you'd like

Support fzf-lua when selecting branches and any other future interaction where telescope might be used

A quick fix could be to change this section to:

      if vim.fn.exists ":Telescope" > 0 then
        self:unmount()
        vim.cmd { cmd = "Telescope", args = { "git_branches" } }
      elseif vim.fn.exists ":FzfLua" > 0 then
        self:unmount()
        vim.cmd { cmd = "FzfLua", args = { "git_branches" } }
      else
        vim.notify "[Fugit2] No telescope or fzf-lua"
      end

Describe alternatives you've considered

I considered switching to telescope, but I prefer fzf-lua.

Additional context

No response

SuperBo commented 6 months ago

@ryancobb , Thank you 🙏 for your idea. You don't need to switch to Telescope anymore.

https://github.com/SuperBo/fugit2.nvim/pull/39

This feature should be implemented natively. Use Telescope or FzfLua is just temporary.

SuperBo commented 6 months ago

Hi @ryancobb , you are right, my mistake with code. New fix is up, https://github.com/SuperBo/fugit2.nvim/pull/40.

Can you test it?

ryancobb commented 6 months ago

Works great! Thanks @SuperBo - big fan of the plugin.

SuperBo commented 6 months ago

Thank you @ryancobb, just report and bug you found or raise any idea, I will try to implement small features and bug fixes asap.