feat: can selectively add entries to quickfix (#564)

* bugfix: fix to enable adding or replacing of quickfix entries

* feat: added option to send only matched files to the quickfix list
This commit is contained in:
Anton Janshagen 2025-01-26 18:18:37 +01:00 committed by GitHub
parent a3fc6623fa
commit b594b9a905
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 32 additions and 8 deletions

View file

@ -504,10 +504,12 @@ M.send_to_qflist = {
opts = vim.tbl_deep_extend("keep", opts or {}, {
target = "qflist",
action = "r",
only_matching_search = false,
})
util.send_to_quickfix({
target = opts.target,
action = opts.action,
only_matching_search = opts.only_matching_search,
})
end,
parameters = {
@ -519,6 +521,10 @@ M.send_to_qflist = {
type = '"r"|"a"',
desc = "Replace or add to current quickfix list (see |setqflist-action|)",
},
only_matching_search = {
type = "boolean",
desc = "Whether to only add the files that matches the last search. This option only applies when search highlighting is active",
},
},
}