-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
quickfix vs location list #696
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
Comments
Hi @bhcleek I would be happy to merge it. I was thinking of having a switch, that changes the functions in Or we don't provide an option (it's going to be hidden) and the |
The first option (having a g:go_list_type option) would make me very happy 😉 |
@fatih, I would be happy with either of your proposals. A strong argument can be made that a combination of the two proposals is the correct thing to do: some commands unconditionally use the location list, and other commands populate one list or the other based on a switch. Before we decide, though, can you expand on the second proposal? Wouldn't using the quickfix unconditionally be subject to the race condition in NeoVim that you mentioned in #626? |
Yes, the reason my second proposal was to avoid these kind of things. For example even though we would use quickfix for |
Thank you for the clarification. I prefer the second option. |
Can the two approaches be combined? I think this could be phased relatively simply: introduce an option now that supports three values: always use the location list, always use the global list, and vary the lists by command. Simultaneously, introduce a new parameter to the I'm happy to help with this in any way if you want. |
That sounds a good plan to attack the problem 👍 . Just the type names should be consistent, such as |
I agree fully on the consistency; I only threw out some proposed names to give us a starting point of discussion. The details always come later 👍 |
After reading you comments, I guess the second option would make me just a happy 👍 |
I have a branch that I believe is just about ready. I'll test it tomorrow, resolve any problems I find, and then submit a PR. |
The most recent release, 1.4, changed lists to use the location list instead of the quickfix list. This is a useful improvement for functions that operate on a single buffer (e.g. GoCallers). But for functions that operate on a package instead of the buffer (e.g GoBuild), I strongly prefer the quickfix list, (e.g. GoBuild).
I'm not certain, but I think the difference in my mind is that the location list is most appropriate for lists of locations that are the result of a search (e.g. GoImplements), while the quickfix list is appropriate for lists of locations that communicate needed user action (e.g. GoTest).
I've read your comments on #626. Would you consider a pull request that introduces a new option to allow the quickfix list to be used for functions that generate a list of errors that require action if the new option's default is to preserve the 1.4 behavior?
The text was updated successfully, but these errors were encountered: