Closed bassamsdata closed 2 months ago
Thanks for the suggestion!
I don't think I see autocommand picker as sufficiently useful (and used) to be included in 'mini.extra'. Also because it would require quite a lot of testing because there are many filtering options to autocommands available.
Closing as not planned.
Here is a rough outline of how this can be implemented manually:
vim.api.nvim_get_autocmds({})
to get an array of autocommand data. Replace {}
with filtering options it accepts (group
, event
, pattern
, buffer
).debug.getinfo()
on the callback
field (similar to how it is done in MiniExtra.pickers.keymaps()
).No problem, thanks for the prompt response and the info.
Contributing guidelines
Module(s)
mini.pick, mini.extra
Description
Hey,
I'd like to suggest adding a picker for autocommands, which would help in searching for autocommands scattered throughout our configurations.
Here's why I'm suggesting this:
Searching through the name or description of autocommands can be more effective, especially during debugging. While the
:autocmd
command exists, it's not always sufficient due to its appearance and limited search terms beyond the event itself. Additionally, it's worth noting that FZF-lua and Telescope already offer this feature. though it's not a reason by itself :)I believe this would be a nice addition, but I understand if it's not a top priority. and If it's not straightforward to implement, no pressure.
Thanks!