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

Abitrary callbacks for pickers #642

Closed
wd60622 opened this issue Oct 17, 2024 · 0 comments · Fixed by #803
Closed

Abitrary callbacks for pickers #642

wd60622 opened this issue Oct 17, 2024 · 0 comments · Fixed by #803
Labels
enhancement New feature or request

Comments

@wd60622
Copy link
Collaborator

wd60622 commented Oct 17, 2024

Following #609, it would be great to support arbitrary callbacks for the picker selections.

At the moment, the only two actions are defined here:

https://github.com/wd60622/octo.nvim/blob/1d321f1cba761d369bf3c9adb8113bd59d3ea667/lua/octo/pickers/telescope/provider.lua#L138-L143

It would be great to have an API like this:

local picker = require("octo.picker")

picker.issues({
    cb = function(selected)
        vim.fn.setreg("+", selected.obj.number, "c")
        vim.notify("Copied the issue number to the clipboard")
    end,
})

Idea applies to the other pickers as well.

@wd60622 wd60622 added the enhancement New feature or request label Oct 17, 2024
@wd60622 wd60622 mentioned this issue Oct 18, 2024
23 tasks
@wd60622 wd60622 added bug Something isn't working documentation Improvements or additions to documentation duplicate This issue or pull request already exists and removed bug Something isn't working documentation Improvements or additions to documentation duplicate This issue or pull request already exists labels Dec 15, 2024
@wd60622 wd60622 linked a pull request Jan 17, 2025 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant