ray-x / go.nvim

G'day Nvimer, Joyful Gopher: Discover the Feature-Rich Go Plugin for Neovim
MIT License
1.9k stars 119 forks source link

[change request] quickfix behavior when running :GoBuild #453

Closed kkrime closed 1 month ago

kkrime commented 2 months ago

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?

ray-x commented 1 month ago

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.

kkrime commented 1 month ago

@ray-x does 1 work for you?