go.nvim icon indicating copy to clipboard operation
go.nvim copied to clipboard

[change request] quickfix behavior when running :GoBuild

Open kkrime opened this issue 1 year ago • 2 comments

1. After running :GoBuild if there are any errors, the quickfix window will appear listing any errors in the code; If the errors are in the file in the current buffer, then instead of the cursor being focused on the quickfix window, can it be focused on the line where the error is?

2. In the following scenario; :GoBuild is ran, errors are reported -> errors fixed -> :GoBuild is ran successfully and no errors reported

After :GoBuild is ran the second time, would it be possible if the quickfix window would be automatically closed (seeing as the errors are no longer there)

I'm happy to try and implement these changes myself, but would you mind pointing me in the direction to where these changes would need to be made?

kkrime avatar Apr 26 '24 14:04 kkrime

In fact, I will be surprised that 1 does not work for you image

The code to set quickfix is here https://github.com/ray-x/go.nvim/blob/d5e2b8cdd84afdb0c49c42a6e8972acc645e0283/lua/go/asyncmake.lua#L345-L349

If you want to close the quickfix when there is no error. You can put logic there to check the output.

ray-x avatar May 09 '24 12:05 ray-x

@ray-x does 1 work for you?

kkrime avatar May 10 '24 17:05 kkrime