preview.nvim/lua
Barrett Ruth 2edeef478d
fix: stream stderr for long-running providers, clear errors on success
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.
2026-03-04 16:33:02 -05:00
..
preview fix: stream stderr for long-running providers, clear errors on success 2026-03-04 16:33:02 -05:00