fix: stream stderr for long-running providers, clear errors on success (#40)
Problem: Long-running providers (e.g. `typst watch`) never exit on compile error, so the exit callback never fired and diagnostics/quickfix were never populated. The `typst watch` `reload` command also lacked `--diagnostic-format short`, producing unparseable verbose output. Solution: Add a `stderr` streaming callback to the long-running `vim.system` call that accumulates chunks and re-parses on each new chunk, populating diagnostics or quickfix in real time. When the fs_event fires (successful compile), clear `stderr_acc` and the reported errors. Add `--diagnostic-format short` to the typst `reload` command to match the one-shot `args` format.
This commit is contained in:
parent
239f8a4769
commit
c8e3a88434
2 changed files with 44 additions and 1 deletions
|
|
@ -133,7 +133,7 @@ M.typst = {
|
|||
end,
|
||||
open = true,
|
||||
reload = function(ctx)
|
||||
return { 'typst', 'watch', ctx.file }
|
||||
return { 'typst', 'watch', '--diagnostic-format', 'short', ctx.file }
|
||||
end,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue