Skip to content
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

Picker for multiple quickfix lists #1877

Closed
timsofteng opened this issue Apr 24, 2022 · 2 comments · Fixed by #1878
Closed

Picker for multiple quickfix lists #1877

timsofteng opened this issue Apr 24, 2022 · 2 comments · Fixed by #1878
Labels
enhancement Enhancement to performance, inner workings or existent features

Comments

@timsofteng
Copy link

timsofteng commented Apr 24, 2022

Is your feature request related to a problem? Please describe.
I've found quickfix lists in (neo)vim is very powerful solution. Especially it shines with cdo. If I get correctly cdo works on current qflist. With cdo undo it is very flexible feature. Would be nice to pick some previous qflist to do something on that items or make undo.

*Describe the solution you'd like
Just plain telescope picker which will contain all quickfix lists per session with their names and items in preview window and pick opens one.

Describe alternatives you've considered
Now I type :cold and cnew but it's slightly annoying.

Additional context
Nothing

@timsofteng timsofteng added the enhancement Enhancement to performance, inner workings or existent features label Apr 24, 2022
@timsofteng
Copy link
Author

timsofteng commented May 5, 2022

@fdschmidt93 @Conni2461
thanks for pr!
Just one note. Is it possible to restore list into the native quickfix list? Not into telescope picker.
Like second option Not to create new one but just restore it.

@fdschmidt93
Copy link
Member

You are very free to write your own custom actions for this picker. Please consider contributing as opposed to requesting features that are very individual to your workflow.

That said,

-- in telescope setup
    quickfixhistory = {
      mappings = {
        i = {
          ["<C-s>"] = function(prompt_buf)
            local entry = action_state.get_selected_entry()
            actions.close(prompt_buf)
            vim.cmd(string.format("%schistory | copen", entry.nr))
          end
        }
      }

seems to do the job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to performance, inner workings or existent features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants