More recent Vim patches have setbufline() and deletebufline() functions for modifying buffers other than the current one. These functions can be used to fix buffers which are not in view straight away, instead of waiting for the user to switch to them again. These functions do not exist in NeoVim, but it does offer nvim_buf_set_lines in some versions. I am not sure if that function supports deleting lines or not.
I have implemented this now. I tested out supporting nvim_buf_set_lines for NeoVim, but I decided against that because it causes the cursor to move around, and so it isn't usable.
Getting errors on neovim with this....
Error detected while processing function <SNR>171_NeoVimCallback[29]..<lambda>68[1]..<SNR>166_ExitCallback[28]..<SNR>164_HandleExit[41]..<SNR>164_RunFixer[6]..
ale#fix#ApplyFixes[26]..ale#fix#ApplyQueuedFixes:
line 20:
E117: Unknown function: setbufline
It seems https://github.com/neovim/neovim/pull/10059 introduced deletebufline to neovim head, but did not include setbufline, kind of annoying for this :/
@dsifford Now fixed thanks to @jwkvam.
Most helpful comment
Getting errors on neovim with this....