-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: git worktrees picker #1646
base: main
Are you sure you want to change the base?
Conversation
TODO: [add/del]-worktree actions to be implemented
Tysm @Atan-D-RP4 for the contribution.
The only issue I have with this is that the picker relies on This has been the paradigm for a while now, if a plugin has a picker than most of them give an option for fuzzy fishing by supporting Telescope, fzf-lua, etc. For example, dressing.nvim, neoclip, Mason’s ctrl-f, etc. I feel the above is a better practice in this case. |
Well yeah, I said as much in my PR. This is my first Open-Source
contribution, like, ever and I'm also new to the codebase and Neovim in
general, so I wanted to prove to myself that I can build something like
this that works at present and not be dismissed out of hand.
I wanted to do it completely with fzf-lua's own utilities that are
available for this at first but like I said, I'm new to all of this and
found it too difficult to understand both the code from
ThePrimeagen/git-worktree.nvim and fzf-lua's own for this(which is not
nearly as straightforward as telescope's but also it is so much more
integrated and cool and wow is that cool but also so difficult to follow
down) to implement the picker that way.
I wanted to write the picker entirely without dependencies anyway which
itself shouldn't be too hard now that I've got some grasp on it but I
wanted your and the project's community's insight into doing it right and
cleanly and putting up a PR and starting a discussion seemed like a good
start for it. So doing that is indeed the next step, but I'd like some
guidance.
Thank you as well, @ibhagwan/fzf-lua, for all of your amazing work on
this project, and your time reviewing my PR and responding here.
…On Thu, Dec 26, 2024 at 9:05 PM ibhagwan ***@***.***> wrote:
Tysm @Atan-D-RP4 <https://github.com/Atan-D-RP4> for the contribution.
But this is more of a proof of concept or proposal kind of thing. Since I
don't know if having this is something that goes along with fzf-lua's
feature set and design philosophy. So for now, it remains basic and fragile
with room for improvement.
The only issue I have with this is that the picker relies on
ThePrimeagen/git-worktree.nvim, I strongly feel that in this case the
responsibility on creating the picker is at the other plugin’s end and I
wouldn’t want to make this exception here nor deal with I can’t switch a
work tree not having written the code.
This has been the paradigm for a while now, if a plugin has a picker than
most of them give an option for fuzzy fishing by supporting Telescope,
fzf-lua, etc. For example, dressing.nvim, neoclip, Mason’s ctrl-f, etc.
I feel the above is a better practice in this case.
—
Reply to this email directly, view it on GitHub
<#1646 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A26QZ6FA63UPS2RRMSJ3PTT2HQO4VAVCNFSM6AAAAABUHHZ3ICVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRSHA4TEOBRG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This is a great contribution regardless!
Fzf-lua has to use some “tricks” since it’s not all contained in lua on the neovim main thread, you’re interacting with an external process via named pipe most of the time.
Ty for your kind words and interest in the project @Atan-D-RP4 :) |
A simple git worktrees picker that uses 'ThePrimeagen/git-worktree.nvim' plugin to create, delete and switch to git worktrees.
It would be better to implement this completely with fzf-lua's own utilities instead of relying on an external plugin like the rest of the git pickers.
But this is more of a proof of concept or proposal kind of thing. Since I don't know if having this is something that goes along with fzf-lua's feature set and design philosophy. So for now, it remains basic and fragile with room for improvement.
Not to mention that I haven't made any updates to the docs for this and that passing any options to this will likely break it.