diff options
| author | Tae Sandoval <1188977+tssm@users.noreply.github.com> | 2021-02-04 21:03:40 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-04 15:03:40 -0500 |
| commit | d6ce595aba6667ac5b7b5d6fc12545fec24878fd (patch) | |
| tree | cfe91636210bb8bf18f5c31f974a3041800cd2f5 /lua | |
| parent | 779704bf266c38f71e080599798cc4437393ce50 (diff) | |
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>
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/telescope/actions/init.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lua/telescope/actions/init.lua b/lua/telescope/actions/init.lua index 50c7f37..4e82777 100644 --- a/lua/telescope/actions/init.lua +++ b/lua/telescope/actions/init.lua @@ -304,7 +304,6 @@ actions.send_selected_to_qflist = function(prompt_bufnr) actions.close(prompt_bufnr) vim.fn.setqflist(qf_entries, 'r') - vim.cmd [[copen]] end actions.send_to_qflist = function(prompt_bufnr) @@ -319,6 +318,9 @@ actions.send_to_qflist = function(prompt_bufnr) actions.close(prompt_bufnr) vim.fn.setqflist(qf_entries, 'r') +end + +actions.open_qflist = function(_) vim.cmd [[copen]] end |
