feature(picker): allow `Snacks.picker.grep` `buffers` option to be a list of buffer numbers
Did you check the docs?
- [x] I have read all the snacks.nvim docs
Is your feature request related to a problem? Please describe.
Sometimes I only want to grep for words within a specific set of buffers. It is nice that the option currently lets me say I only want to search open buffers with buffers = true, but it would be very nice if that value could also be an integer|integer[] in which I could specify a single buffer or a list of buffers to search within.
Describe the solution you'd like
Allow buffers to be an integer|integer[]|boolean? in which boolean true/false operates the same as it does currently, an integer searches just that single buffer, and integer[] specifies a list of buffers to search.
Describe alternatives you've considered
Not sure if there are other solutions or ways to do this with Snacks.picker
Additional context
No response
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
Not stale
You can pass into grep something like dirs = { vim.api.nvim_buf_get_name(buf) } to search within that specific buffer. Maybe you can implement a logic to populate opts.dirs according to what you want?
Not 100% sure if that's what you really want.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This isn't stale
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
Not stale
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
not stale
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
Not stale
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
Not stale
Like @dpetka2001 mentions, you can already achieve this by passing the buf names to the dirs option