feat: actions for sending oil entries to quickfix (#249)
* Implement actions for sending oil entries to quickfix/location-list * Use vim.notify instead of vim.notify_once in util quickfix function * Remove redundant files/directories options for sending to qf always send just files * set qflist/loclist with a single call * Add type annotations and default values for send_to_quickfix * In visual mode, send only selected items to qf
This commit is contained in:
parent
b3c24f4b3b
commit
3ffb8309e6
3 changed files with 105 additions and 11 deletions
|
|
@ -337,6 +337,46 @@ M.toggle_trash = {
|
|||
end,
|
||||
}
|
||||
|
||||
M.send_to_qflist = {
|
||||
desc = "Sends files in the current oil directory to the quickfix list, replacing the previous entries.",
|
||||
callback = function()
|
||||
util.send_to_quickfix({
|
||||
target = "qflist",
|
||||
mode = "r",
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
M.add_to_qflist = {
|
||||
desc = "Adds files in the current oil directory to the quickfix list, keeping the previous entries.",
|
||||
callback = function()
|
||||
util.send_to_quickfix({
|
||||
target = "qflist",
|
||||
mode = "a",
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
M.send_to_loclist = {
|
||||
desc = "Sends files in the current oil directory to the location list, replacing the previous entries.",
|
||||
callback = function()
|
||||
util.send_to_quickfix({
|
||||
target = "loclist",
|
||||
mode = "r",
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
M.add_to_loclist = {
|
||||
desc = "Adds files in the current oil directory to the location list, keeping the previous entries.",
|
||||
callback = function()
|
||||
util.send_to_quickfix({
|
||||
target = "loclist",
|
||||
mode = "a",
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
---List actions for documentation generation
|
||||
---@private
|
||||
M._get_actions = function()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue