Closed kevintraver closed 5 months ago
The proposed addition doesn't scale well. There are already 4 different actions for behavior that could be parameterized (send_to_qflist
, add_to_qflist
, send_to_loclist
, add_to_loclist
). If we add another boolean open
then logically we would need to double this number to add a _and_open
variant to each. Arguably I shouldn't have even split it as much as it currently is, but I definitely don't want to split it out further. The preferred way of doing this would be to define your own keymap that leverages the built-in action. Something like:
require("oil").setup({
keymaps = {
["<C-q>"] = {
callback = function()
require("oil.actions").send_to_qflist.callback()
vim.cmd.copen()
end,
desc = "Send items to quickfix and open the quickfix"
}
}
})
That makes sense. Thank you for the explanation and keymap example!
Add action which also opens the quickfix list after sending items to it.