AckslD / nvim-neoclip.lua

Clipboard manager neovim plugin with telescope integration
931 stars 19 forks source link

feat: allow to edit and entry #93

Closed Jeansidharta closed 1 year ago

Jeansidharta commented 1 year ago

Closes #91.

This allows the user to edit an entry in telescope. To edit an entry, you have to open telescope, use the edit mapping (default in insert mode), edit the new buffer however you want, then close the buffer (:q) to save the changes. Here are some screenshots:

Jeansidharta commented 1 year ago

Hey, I noticed this and this todos could possibly be solved with this new function that I just wrote. Instead of trying to actions these functions on the buffer "behind" telescope, we could close telescope, apply the actions, and reopen telescope. What do you think? I'd be willing to open another PR, after this one is merged.

AckslD commented 1 year ago

Hey, I noticed this and this todos could possibly be solved with this new function that I just wrote. Instead of trying to actions these functions on the buffer "behind" telescope, we could close telescope, apply the actions, and reopen telescope. What do you think? I'd be willing to open another PR, after this one is merged.

I think that would be very nice, I think especially for the paste command it could be nice to paste more than one entries before closing the picker which is currently not possible.

Jeansidharta commented 1 year ago
Jeansidharta commented 1 year ago

I think that would be very nice, I think especially for the paste command it could be nice to paste more than one entries before closing the picker which is currently not possible.

Cool. I'll wait for this to be merged and open another PR, just to separate both changes

Jeansidharta commented 1 year ago

Hey @AckslD I just added some integration tests to this feature here. Let me know if this is sufficient.

Also, I'll rename this PR to feat: allow to edit and entry for it to be more descriptive on what this is actually adding, and I'll rewrite it's description.

Jeansidharta commented 1 year ago

Also, this should probably be marked as a breaking change, since it'd break the configs o users that were previously using the <c-e> mapping in telescope. But I have no idea how to mark this as such

AckslD commented 1 year ago

Looks great @Jeansidharta! I think at least for packer and lazy, if you make a commit start with feat!: it will be flagged as a breaking change.

AckslD commented 1 year ago

Could you maybe rebase/squash to make at least one of the commits have feat!:? Then I think this is ready to be merged :)

Jeansidharta commented 1 year ago

Could you maybe rebase/squash to make at least one of the commits have feat!:? Then I think this is ready to be merged :)

Awesome! I've squashed the commits, and added a proper commit message. I hope this is enough for users to know what's going on

AckslD commented 1 year ago

Thanks! This is very nice! Maybe fun to announce this on reddit and/or twin. Maybe you'd like to do that since it's your addition :) Otherwise I can also do it if you want.

Jeansidharta commented 1 year ago

Great Thank you a lot for your time and consideration. I know it must've taken you a while to review my code and answer my questions. I'm glad you liked the contribution.

I'll make a PR to TWiN announcing the changes, and will give a try at announcing it on Reddit. Though I'd like to run it by you before posting. I'll link it here for you to take a look :)