Right now, running e.g. vim.diagnostic.goto_next() will silently succeed if the file is still processing (and therefore has no diagnostics).
I'm not sure we can fully hook into doing this, but it might be nice if there was an easy way to have things fail until/unless the document is fully processed, as I (and probably others) sometimes use vim.diagnostic.goto_next as a poor-man's "is there anything to fix in this file".
Ok erroring I think is indeed not possible without a wrapper but the obvious solution here is probably to just set a diagnostic at the top of the processing region (and move/remove it as processing continues).
Right now, running e.g.
vim.diagnostic.goto_next()
will silently succeed if the file is still processing (and therefore has no diagnostics).I'm not sure we can fully hook into doing this, but it might be nice if there was an easy way to have things fail until/unless the document is fully processed, as I (and probably others) sometimes use
vim.diagnostic.goto_next
as a poor-man's "is there anything to fix in this file".