-
-
Notifications
You must be signed in to change notification settings - Fork 856
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Telescope should make use of the quickfix list stack #1739
Comments
I tried this last night and it works as expected. I'll send it as a PR shortly. As a follow up I might also write a picker for searching through the stack entries (ie a picker for Not entirely sure if this would constitute a BC change. It appears Telescope has abstracted around the quickfix list as a single list instead of a stack, and that users of any |
…vim-telescope#1739) Changes functions that use `setqflist` in `r` mode to instead use ` ` mode. This makes the Telescope quickfix list action send results to a new list in the quickfix stack instead of overwriting the entries in the current stack. Doing so enables `:chistory`, `:colder` and `:cnewer` functions to review results of previous Telescope queries. The location list uses a similar API and is updated in this PR also (ie this also enables `:lhistory`, `:lolder` and `:lnewer`).
…vim-telescope#1739) Changes functions that use `setqflist` in `r` mode to instead use ` ` mode. This makes the Telescope quickfix list action send results to a new list in the quickfix stack instead of overwriting the entries in the current list. Doing so enables `:chistory`, `:colder` and `:cnewer` functions to review results of previous Telescope queries. The location list uses a similar API and is updated in this PR also (ie this also enables `:lhistory`, `:lolder` and `:lnewer`).
The first PR which enables Telescope using the quickfix list stack has landed. Nice! I'm going to keep this open as I plan to hack on this a little more. As I mentioned previously I think having a picker for the quickfix list stack would be a nice feature. We may also be able to leverage the |
we are currently not looking for new pickers. See #1228 We can expose the local function |
Ah okay, I won't bother adding it then. Thanks for all your work on Telescope, it's great! |
DON'T EXPECT THIS TO BE UPSTREAMED due to: * nvim-telescope#1228 * https://github.com/nvim-telescope/telescope.nvim/blob/master/CONTRIBUTING.md THIS IS MY PERSONAL changes. port original patch for quickfixhistory picker while considering file name changes etc. * 8d1841b ("feat: quickfixhistory picker (nvim-telescope#1878)", 2022-05-04) * 0621c1c ("break: prefix internal files and add deprecation messages (nvim-telescope#2032)", 2022-07-01) Related: * nvim-telescope#1739 * nvim-telescope#1742 * https://github.com/cgsheeh/telescope.nvim (forked repo) TODO: make this external https://github.com/nvim-telescope/telescope.nvim/blob/master/developers.md Signed-off-by: Osamu Aoki <osamu@debian.org>
Is your feature request related to a problem? Please describe.
Sometimes I make a search for A and send it to the quickfix list. Then I work a little more, and make another search for B, which I also send to the quickfix list. After that, I realize I need to see the results of my search for A again. Since I searched for B already, the quickfix list is overwritten and I need to re-open Telescope, search for A and re-send to the quickfix list.
I looked online for some extension that might solve this issue for me, but as it turns out this is already a feature of the quickfix list in Vim/Neovim! See this page and search for "Using more than one list of errors" (sorry, I can't figure out how to permalink the exact section). Neovim supports a stack of up to 10 quickfix lists, which can be moved between using
:colder
,:cnewer
in a similar fashion to:cnext
and:cprev
.Describe the solution you'd like
So the feature request (bug?) is that Telescope should be sending results to new quickfix lists instead of replacing all entries in the current quickfix list.
Describe alternatives you've considered
Alternatively we could create a new mapping that specifically sends results to a new quickfix list, keeping "overwrite all existing entries in the current list" as the default.
Additional context
I'm a relative newbie to Neovim and its rapidly evolving ecosystem, so it's possible there is a better solution that I haven't considered. I've never actually used the quickfix stack before so I might also be wrong about it's usefulness here. If I'm way off the mark here or there's a much better workflow I haven't been made aware of, please point me in the right direction!
I took a brief look at the code and it seems when Telescope calls
setqflist
it always passes'r'
as the mode on "send to qf list", when it should probably pass''
to create a new list. I'd be interested in taking this on as a contribution if it would be accepted into the codebase.The text was updated successfully, but these errors were encountered: