feat: Open quickfix list on it's own action (#497)
Given that Telescope has a picker for quickfix items, opening its
window automatically isn't that useful, so this commit removes the call
from send_to_qflist and send_selected_to_qflist. Some users may prefer
the old behaviour though so a new action open_qflist was created.
To open quickfix with one key, you can do this:
```
["<C-q>"] = actions.send_to_qflist + actions.open_qflist,
```
Co-authored-by: Tae Sandoval <tssm@users.noreply.github.com>
This commit is contained in:
@@ -304,7 +304,6 @@ actions.send_selected_to_qflist = function(prompt_bufnr)
|
|||||||
actions.close(prompt_bufnr)
|
actions.close(prompt_bufnr)
|
||||||
|
|
||||||
vim.fn.setqflist(qf_entries, 'r')
|
vim.fn.setqflist(qf_entries, 'r')
|
||||||
vim.cmd [[copen]]
|
|
||||||
end
|
end
|
||||||
|
|
||||||
actions.send_to_qflist = function(prompt_bufnr)
|
actions.send_to_qflist = function(prompt_bufnr)
|
||||||
@@ -319,6 +318,9 @@ actions.send_to_qflist = function(prompt_bufnr)
|
|||||||
actions.close(prompt_bufnr)
|
actions.close(prompt_bufnr)
|
||||||
|
|
||||||
vim.fn.setqflist(qf_entries, 'r')
|
vim.fn.setqflist(qf_entries, 'r')
|
||||||
|
end
|
||||||
|
|
||||||
|
actions.open_qflist = function(_)
|
||||||
vim.cmd [[copen]]
|
vim.cmd [[copen]]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user