danielfm / smudge

Control the Spotify app from within Emacs.
https://asciinema.org/a/218654
GNU General Public License v3.0
313 stars 47 forks source link

Integration with ivy/helm #24

Open arnavsharma93 opened 5 years ago

arnavsharma93 commented 5 years ago

First of all, thank you for the feature rich package.

I was curious if you had integration with ivy/helm in the future roadmap. It would be possible to do away with the buffers and power the package through actions.

danielfm commented 5 years ago

I'm not particularly familiar with ivy nor helm, so can you give a more detailed explanation of how such integration would work?

Thanks for the suggestion.

arnavsharma93 commented 5 years ago

Ivy/Swiper/Counsel is like a completion UI where object at point can be an argument to an action. Action is a function mostly. Completion can be done using regex, fuzzy matching etc. Helm is something similar.

Here, instead of putting the search result in a buffer, it can be fed to Ivy as candidates. Actions can be configured on candidates like select artist, select album, select song, add to queue etc. The queue itself can be powered through occur - allowing rearranging, removal, addition etc. Ivy can be configured to use virtual buffers removing the need to create search result buffers.

danielfm commented 5 years ago

Sounds nice. I don't promise anything, but I'll take a look at ivy when I get the chance.

jkdufair commented 5 years ago

@danielfm @arnavsharma93 I'm an ivy/counsel/swiper user. I've been digging around how to do ivy integration. Would it be best to have this package offer ivy completion instead of the existing buffers? As an alternative via configuration?

cole-brown commented 5 years ago

Definitely don't force it, @jkdufair. Not everyone uses ivy/counsel/swiper, helm, or whatever. I'm currently using helm instead of ivy myself.

So I'd vote it as an alternative via configuration. Or some do it via another package that hooks into the original and alters it to work with ivy/helm.

vilst3r commented 4 years ago

@arnavsharma93 I've managed to get a working implementation of this feature in the PR referenced.

@cole-brown Thank you for your input to this issue, in my PR I've integrated helm through configuration of a flag variable after reading your comment.

As for Ivy, I'm not particularly familiar with it so I didn't attempt to integrate it but if someone out there is & willing to contribute to this change then that'd be a great addition to this package.