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

Add option to add command output to quickfix list #2

Open
Hubro opened this issue Nov 27, 2023 · 0 comments
Open

Add option to add command output to quickfix list #2

Hubro opened this issue Nov 27, 2023 · 0 comments

Comments

@Hubro
Copy link
Owner

Hubro commented Nov 27, 2023

It might be nice to add the output of a command to the quickfix list.

It seems like this should be very simple with the setqflist function. Very nice example here, using the configured 'errorformat':

https://phelipetls.github.io/posts/async-make-in-nvim-with-lua/

There are probably challenges here:

  • Considering that the command is run in a proper terminal, how are ANSI escape codes handled? Would it be a good idea to pipe commands through cat if this option is enabled?

  • How to set this option? It would be a pain to create a new user command for every possible permutation of options. Perhaps I can add a system of flags prefixing the command, something like:

    :Splitrun (new) (quickfix) make test
    

    This would force a new split and flag that the output should be added to the quickfix list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant