Skip to content
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

Custom skim action from library #537

Open
AlexanderMGrindel opened this issue Aug 25, 2023 · 1 comment
Open

Custom skim action from library #537

AlexanderMGrindel opened this issue Aug 25, 2023 · 1 comment

Comments

@AlexanderMGrindel
Copy link

I'm trying to bind a few custom keys from a skim selector. I'm new to the skim library crate, and relatively new to Rust in general. I found how to bind internal actions in skim, with something like:

let options = SkimOptionsBuilder::default()
    .height(Some("50%"))
    .multi(false)
    .bind(vec!["alt-a:accept"])
    .build()
    .unwrap();

That works fine. However, I want to bind keys to functions external to skim. Given the function other_skim_action(), I'd like to be able to

    .bind(vec!["alt-a:other_skim_action"])

or something similar. If there's a way to pass arguments that would be even better, but if not just being able to call a function would be sufficient. Does skim's library provide a way to accomplish this? Thanks!!

@LoricAndre
Copy link
Contributor

What would you want to achieve ? We could think about implementing this, but you'd need access to quite a lot of components inside skim, which is not easy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants